LogoLogo
HomeInterface
  • 🏦Welcome to VirtuSwap!
    • 🏠What is VirtuSwap?
    • 🚩Getting Started with VirtuSwap
      • Connect to VirtuSwap
      • How to Trade Tokens
      • Intro to Liquidity Pools Structure on VirtuSwap
      • How to Provide Liquidity
      • How to Withdraw Liquidity
      • How to Disconnect from VirtuSwap
  • VirtuSwap Basics
    • 🤷‍♀️The Problem
    • 🔦Solution Overview
    • 🪙$VRSW Token
      • VRSW Tokenomics
      • VRSW Utility
      • Fees and Incentives
      • Staking Guide
    • 🤖AI agents
    • ❔FAQ
    • 🚀VirtuSwap Technology
      • How Virtual Pools Work
      • Allowed Virtual Reserves
      • Reserve Ratio and Threshold
      • Exchange of Reserves
      • Providing Liquidity on VirtuSwap
    • 🫂VirtuSwapDAO
      • VirtuSwapDAO Design
      • Participation in VirtuSwap Governance
      • Governance Systems
      • Submitting Proposals
      • VirtuSwapDAO Treasuries and Multi-Signature Wallets
      • VirtuSwap Emergency DAO
    • ❤️Mission and Core Principles
  • Technical Reference
    • 🥸Smart Contracts - v1
      • DEX Contracts
        • vPair
        • vPairFactory
        • vRouter 1.1
        • vRouter 1.2
        • vRouter 1.3
        • vExchangeReserves
        • vPoolManager
        • Multicall
        • Structures
        • User Defined Value Types
      • Tokenomics Contracts
        • VGlobalMinter
        • VChainMinter
        • VStaker
        • VTokenomicsParams
        • VVestingWallet
        • Structures
      • Administrative Privileges
    • 📫Deployment Addresses
    • 📦TypeScript SDK
  • 🔐Security
Powered by GitBook
On this page
  • Events
  • State-changing Functions
  • Read-only Functions
  1. Technical Reference
  2. Smart Contracts - v1
  3. Tokenomics Contracts

VVestingWallet

Handles vesting of VRSW tokens

PreviousVTokenomicsParamsNextStructures

Last updated 5 months ago

vVestingWallet is based on OpenZeppelin's contract with minor adjustments

vVestingWallet receives an amount of ERC20 tokens. The tokens are linearly released to the beneficiary over a specified period of time.

Events

event ERC20Released

event ERC20Released(
        address indexed token, 
        uint256 amount)

Emitted when an amount of tokens is released

State-changing Functions

constructor

constructor(
  address beneficiaryAddress,
  address erc20Token,
  uint64 startTimestamp,
  uint64 durationSeconds
)  

Creates a new Vesting Wallet for a beneficiary.

Parameters:

Name
Type
Description

beneficiaryAddress

uint256

Amount to stake

erc20Token

address

Address of the vested token

startTimestamp

uint64

Timestamp when the vesting starts

durationSeconds

uint64

duration of vesting

release

function release() external

Releases all the available vested token to the beneficiary

Name
Type
Description

beneficiaryAddress

uint256

Amount to stake

erc20Token

address

Address of the vested token

startTimestamp

uint64

Timestamp when the vesting starts

durationSeconds

uint64

duration of vesting

function lockVrsw

Read-only Functions

beneficiary

 function beneficiary() public view returns (address)

Returns the beneficiary address

start

 function start() public view returns (uint256)

Returns the timestamp when the vesting starts

duration

 function duration() public view returns (uint256)

Returns the duration of the vesting period

released

 function released() public view returns (uint256)

Returns the amount of tokens that have been transferred to the Beneficiary

releasable

 function releasable() public view returns (uint256)

Returns the amount of tokens that are available to be claimed by the Beneficiary. The amount is the total number of vested tokens minus the number of tokens that have already been released.

vestedAmount

 function vestedAmount() public view returns (uint256)

Returns total amount of tokens that are already vested.

Emits the event

🥸
VestingWallet
ERC20Released