Skip to content

RewardFacet

This facet contract provides the external functions related to all claims and rewards of the protocol

Claim all the xvs accrued by holder in all markets and VAI

function claimVenus(address holder) public
NameTypeDescription
holderaddressThe address to claim XVS for

Claim all the xvs accrued by holder in the specified markets

function claimVenus(address holder, contract VToken[] vTokens) public
NameTypeDescription
holderaddressThe address to claim XVS for
vTokenscontract VToken[]The list of markets to claim XVS in

Claim all xvs accrued by the holders

function claimVenus(address[] holders, contract VToken[] vTokens, bool borrowers, bool suppliers) public
NameTypeDescription
holdersaddress[]The addresses to claim XVS for
vTokenscontract VToken[]The list of markets to claim XVS in
borrowersboolWhether or not to claim XVS earned by borrowing
suppliersboolWhether or not to claim XVS earned by supplying

Claim all the xvs accrued by holder in all markets, a shorthand for claimVenus with collateral set to true

function claimVenusAsCollateral(address holder) external
NameTypeDescription
holderaddressThe address to claim XVS for

Transfer XVS to the recipient

function _grantXVS(address recipient, uint256 amount) external
NameTypeDescription
recipientaddressThe address of the recipient to transfer XVS to
amountuint256The amount of XVS to (possibly) transfer

Seize XVS rewards allocated to holders

function seizeVenus(address[] holders, address recipient) external returns (uint256)
NameTypeDescription
holdersaddress[]Addresses of the XVS holders
recipientaddressAddress of the XVS token recipient
NameTypeDescription
[0]uint256The total amount of XVS tokens seized and transferred to recipient

Claim all xvs accrued by the holders

function claimVenus(address[] holders, contract VToken[] vTokens, bool borrowers, bool suppliers, bool collateral) public
NameTypeDescription
holdersaddress[]The addresses to claim XVS for
vTokenscontract VToken[]The list of markets to claim XVS in
borrowersboolWhether or not to claim XVS earned by borrowing
suppliersboolWhether or not to claim XVS earned by supplying
collateralboolWhether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall

Returns the XVS vToken address

function getXVSVTokenAddress() external view returns (address)
NameTypeDescription
[0]addressThe address of XVS vToken