XVSVault

XVS Vault

The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.

Solidity API

pause

Pauses vault

function pause() external

resume

Resume vault

function resume() external

poolLength

Returns the number of pools with the specified reward token

function poolLength(address rewardToken) external view returns (uint256)

Parameters

Return Values


add

Add a new token pool

function add(address _rewardToken, uint256 _allocPoint, contract IBEP20 _token, uint256 _rewardPerBlock, uint256 _lockPeriod) external

Parameters


set

Update the given pool's reward allocation point

function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external

Parameters


setRewardAmountPerBlock

Update the given reward token's amount per block

function setRewardAmountPerBlock(address _rewardToken, uint256 _rewardAmount) external

Parameters


setWithdrawalLockingPeriod

Update the lock period after which a requested withdrawal can be executed

function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external

Parameters


deposit

Deposit XVSVault for XVS allocation

function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external

Parameters


claim

Claim rewards for pool

function claim(address _account, address _rewardToken, uint256 _pid) external

Parameters


executeWithdrawal

Execute withdrawal to XVSVault for XVS allocation

function executeWithdrawal(address _rewardToken, uint256 _pid) external

Parameters


requestWithdrawal

Request withdrawal to XVSVault for XVS allocation

function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external

Parameters


getEligibleWithdrawalAmount

Get unlocked withdrawal amount

function getEligibleWithdrawalAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256 withdrawalAmount)

Parameters

Return Values


getRequestedAmount

Get requested amount

function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256)

Parameters

Return Values


getWithdrawalRequests

Returns the array of withdrawal requests that have not been executed yet

function getWithdrawalRequests(address _rewardToken, uint256 _pid, address _user) external view returns (struct XVSVaultStorageV1.WithdrawalRequest[])

Parameters

Return Values


pendingReward

View function to see pending XVSs on frontend

function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256)

Parameters

Return Values


updatePool

Update reward variables of the given pool to be up-to-date

function updatePool(address _rewardToken, uint256 _pid) external

Parameters


getUserInfo

Get user info with reward token address and pid

function getUserInfo(address _rewardToken, uint256 _pid, address _user) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals)

Parameters

Return Values


pendingWithdrawalsBeforeUpgrade

Gets the total pending withdrawal amount of a user before upgrade

function pendingWithdrawalsBeforeUpgrade(address _rewardToken, uint256 _pid, address _user) public view returns (uint256 beforeUpgradeWithdrawalAmount)

Parameters

Return Values


delegate

Delegate votes from msg.sender to delegatee

function delegate(address delegatee) external

Parameters


delegateBySig

Delegates votes from signatory to delegatee

function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external

Parameters


getCurrentVotes

Gets the current votes balance for account

function getCurrentVotes(address account) external view returns (uint96)

Parameters

Return Values


getPriorVotes

Determine the xvs stake balance for an account

function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96)

Parameters

Return Values


_become

  • Admin Functions **

function _become(contract XVSVaultProxy xvsVaultProxy) external

setAccessControl

Sets the address of the access control of this contract

function setAccessControl(address newAccessControlAddress) external

Parameters


Last updated