The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.
Pauses vault
function pause() external
Resume vault
function resume() external
Returns the number of pools with the specified reward token
function poolLength(address rewardToken) external view returns (uint256)
Parameters
Return Values
Number of pools that distribute the specified token as a reward
Add a new token pool
Parameters
Number of allocation points assigned to this pool
Initial reward per block, in terms of _rewardToken
A period between withdrawal request and a moment when it's executable
Update the given pool's reward allocation point
Parameters
Number of allocation points assigned to this pool
setRewardAmountPerBlock
Update the given reward token's amount per block
Parameters
Number of allocation points assigned to this pool
setWithdrawalLockingPeriod
Update the lock period after which a requested withdrawal can be executed
Parameters
Deposit XVSVault for XVS allocation
Parameters
The amount to deposit to vault
Claim rewards for pool
Parameters
The account for which to claim rewards
executeWithdrawal
Execute withdrawal to XVSVault for XVS allocation
Parameters
requestWithdrawal
Request withdrawal to XVSVault for XVS allocation
Parameters
The amount to withdraw from the vault
getEligibleWithdrawalAmount
Get unlocked withdrawal amount
Parameters
Return Values
Amount that the user can withdraw
getRequestedAmount
Get requested amount
Parameters
Return Values
Total amount of requested but not yet executed withdrawals (including both executable and locked ones)
getWithdrawalRequests
Returns the array of withdrawal requests that have not been executed yet
Parameters
Return Values
struct XVSVaultStorageV1.WithdrawalRequest[]
An array of withdrawal requests
View function to see pending XVSs on frontend
Parameters
Return Values
Reward the user is eligible for in this pool, in terms of _rewardToken
Update reward variables of the given pool to be up-to-date
Parameters
Get user info with reward token address and pid
Parameters
Return Values
Reward debt (technical value used to track past payouts)
Requested but not yet executed withdrawals
pendingWithdrawalsBeforeUpgrade
Gets the total pending withdrawal amount of a user before upgrade
Parameters
Return Values
beforeUpgradeWithdrawalAmount
Total pending withdrawal amount in requests made before the vault upgrade
Delegate votes from msg.sender to delegatee
Parameters
The address to delegate votes to
Delegates votes from signatory to delegatee
Parameters
The address to delegate votes to
The contract state required to match the signature
The time at which to expire the signature
The recovery byte of the signature
Half of the ECDSA signature pair
Half of the ECDSA signature pair
getCurrentVotes
Gets the current votes balance for account
Parameters
The address to get votes balance
Return Values
The number of current votes for account
Determine the xvs stake balance for an account
Parameters
The address of the account to check
The block number to get the vote balance at
Return Values
The balance that user staked
setAccessControl
Sets the address of the access control of this contract
Parameters
New address for the access control