RewardFacet
RewardFacet
Section titled “RewardFacet”This facet contract provides the external functions related to all claims and rewards of the protocol
Solidity API
Section titled “Solidity API”claimVenus
Section titled “claimVenus”Claim all the xvs accrued by holder in all markets and VAI
function claimVenus(address holder) publicParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| holder | address | The address to claim XVS for |
claimVenus
Section titled “claimVenus”Claim all the xvs accrued by holder in the specified markets
function claimVenus(address holder, contract VToken[] vTokens) publicParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| holder | address | The address to claim XVS for |
| vTokens | contract VToken[] | The list of markets to claim XVS in |
claimVenus
Section titled “claimVenus”Claim all xvs accrued by the holders
function claimVenus(address[] holders, contract VToken[] vTokens, bool borrowers, bool suppliers) publicParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| holders | address[] | The addresses to claim XVS for |
| vTokens | contract VToken[] | The list of markets to claim XVS in |
| borrowers | bool | Whether or not to claim XVS earned by borrowing |
| suppliers | bool | Whether or not to claim XVS earned by supplying |
claimVenusAsCollateral
Section titled “claimVenusAsCollateral”Claim all the xvs accrued by holder in all markets, a shorthand for claimVenus with collateral set to true
function claimVenusAsCollateral(address holder) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| holder | address | The address to claim XVS for |
_grantXVS
Section titled “_grantXVS”Transfer XVS to the recipient
function _grantXVS(address recipient, uint256 amount) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| recipient | address | The address of the recipient to transfer XVS to |
| amount | uint256 | The amount of XVS to (possibly) transfer |
seizeVenus
Section titled “seizeVenus”Seize XVS rewards allocated to holders
function seizeVenus(address[] holders, address recipient) external returns (uint256)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| holders | address[] | Addresses of the XVS holders |
| recipient | address | Address of the XVS token recipient |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| [0] | uint256 | The total amount of XVS tokens seized and transferred to recipient |
claimVenus
Section titled “claimVenus”Claim all xvs accrued by the holders
function claimVenus(address[] holders, contract VToken[] vTokens, bool borrowers, bool suppliers, bool collateral) publicParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| holders | address[] | The addresses to claim XVS for |
| vTokens | contract VToken[] | The list of markets to claim XVS in |
| borrowers | bool | Whether or not to claim XVS earned by borrowing |
| suppliers | bool | Whether or not to claim XVS earned by supplying |
| collateral | bool | Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall |
getXVSVTokenAddress
Section titled “getXVSVTokenAddress”Returns the XVS vToken address
function getXVSVTokenAddress() external view returns (address)Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| [0] | address | The address of XVS vToken |