VGlobalMinter

Responsible for minting and distributing VRSW tokens

vGlobalMinter is deployed on Ethereum and is responsible for minting and distributing VRSW tokens

vGlobalMinter supports multi-chain deployment of VirtuSwap DEX, and distribution of protocol rewards between chains. In v1 the distribution between chains is performed manually by the DAO. In the second version, an automated and trustless way will be introduced.

Events

event NewVesting

event NewVesting(
 address vestingWallet,
 address beneficiary,
 uint32 startTs,
 uint32 duration
);

Emitted when a new vVestingWallet contract is created.

State-Changing Functions

function newVesting

function newVesting(
        address beneficiary,
        uint32 startTs,
        uint32 duration,
        uint256 amount
    ) external override onlyOwner returns (address vestingWallet)

Creates a new vVestingWallet contract for the given beneficiary.

✏️Can only be called by the owner

Parameters:

Name
Type
Description

beneficiary

address

Address of the beneficiary of the new wallet

startTs

uint32

The start timestamp of the vesting contract

duration

uint32

Duration of the vesting (in seconds)

amount

uint256

The amount of tokens to be vested

function arbitraryTransfer

function arbitraryTransfer(
    address to, 
    uint256 amount) external override onlyOwner;

This function allows the owner of the contract to transfer a specified amount of unlocked VRSW tokens to a recipient address.

The method is used by the DAO to transfer VRSW tokens to be used in different chains.

✏️ In v1, cross-chain communication is not implemented in VirtuSwap contracts, so the transfers between chains will be done manually by the designated DAO wallet.

The recipient wallet will be responsible to bridge the received VRSW tokens to the target chain.

✏️Can only be called by the owner

Parameters:

Name
Type
Description

to

address

Recipient of the transfer

amount

uint256

Amount to transfer

function setEpochParams

function setEpochParams(
        uint32 _epochDuration,
        uint32 _epochPreparationTime
 ) external override onlyOwner

Changes minting epoch duration and preparation time. A minting epoch is the time period between changes in distribution of rewards between VirtuSwap pools. Default is 4 week.

The Epoch Preparation Time is the time window before the start of the epoch in which it is allowed to transfer the rewards for the upcoming epoch. Default is 1 week.

✏️Can only be called by the owner

Parameters:

Name
Type
Description

_epochDuration

uint32

Epoch duration (in seconds)

_epochPreparationTime

uint32

Amount to transfer

function nextEpochTransfer

function nextEpochTransfer() external override onlyOwner 

Transfers the amount of VRSW tokens minted for the next epoch to the caller (VirtuSwap DAO). The DAO will transfer the tokens to vChainMinter contracts on each supported network. The distribution between networks is decided by the DAO.

✏️ In v1, cross-chain communication is not implemented in VirtuSwap contracts, so the transfers between chains will be done manually by the designated DAO wallet.

✏️Can only be called by the owner

Read-Only Functions

function getAllVestingWallets

function getAllVestingWallets()
        external
        view
        override
returns (address[] memory) 

Returns an array of VVestingWallet instances

function unlockedBalance

function unlockedBalance() public view returns (uint256)

Retuns the total amount of unlocked VRSW tokens.

Last updated