Vault
Functions:
Events:
Modifiers:
Graphs:
Function Definitions:
constructor()
assetsPerShare()
Vault shares are denominated with 18 decimals. Return value units are defined by underlying asset
token.
Return Values:
Return Name | Type | Description |
---|---|---|
Price | per vault share in underlying token. | |
asset()
Return Values:
Return Name | Type | Description |
---|---|---|
Address | of the underlying token used by the vault for accounting, depositing, and withdrawing. |
totalAssets()
This function overrides the parent Yearn vault's totalAssets
to return only assets managed by the vault wrapper, rather than the parent Yearn vault.
Return Values:
Return Name | Type | Description |
---|---|---|
Total | amount of underlying | |
assetsOf()
Parameter Name | Type | Description |
---|---|---|
| address | Address of owner. |
Return Values:
Return Name | Type | Description |
---|---|---|
Balance | address | of |
convertToAssets()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Exact amount of shares |
Return Values:
Return Name | Type | Description |
---|---|---|
Exact | uint256 | amount of assets |
convertToShares()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Exact amount of assets |
Return Values:
Return Name | Type | Description |
---|---|---|
Exact | uint256 | amount of shares |
previewDeposit()
This method accounts for issuance of accrued fee shares.
Parameter Name | Type | Description |
---|---|---|
| uint256 | Exact amount of underlying |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | of the vault issued in exchange to the user for |
previewMint()
This method accounts for issuance of accrued fee shares.
Parameter Name | Type | Description |
---|---|---|
| uint256 | Exact amount of vault shares to mint. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | quantity of underlying needed in exchange to mint |
previewWithdraw()
This method accounts for both issuance of fee shares and withdrawal fee.
Parameter Name | Type | Description |
---|---|---|
| uint256 | Exact amount of |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | to be burned in exchange for |
previewRedeem()
This method accounts for both issuance of fee shares and withdrawal fee.
Parameter Name | Type | Description |
---|---|---|
| uint256 | Exact amount of |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | quantity of underlying returned in exchange for |
accruedManagementFee()
Management fee is annualized per minute, based on 525,600 minutes per year. Total assets are calculated using the average of their current value and the value at the previous fee harvest checkpoint. This method is similar to calculating a definite integral using the trapezoid rule.
Return Values:
Return Name | Type | Description |
---|---|---|
Accrued | management fee in underlying | |
accruedPerformanceFee()
Performance fee is based on a vault share high water mark value. If vault share value has increased above the HWM in a fee period, issue fee shares to the vault equal to the performance fee.
Return Values:
Return Name | Type | Description |
---|---|---|
Accrued | performance fee in underlying | |
maxDeposit()
Return Values:
Return Name | Type | Description |
---|---|---|
Maximum | address | amount of underlying |
maxMint()
Return Values:
Return Name | Type | Description |
---|---|---|
Maximum | address | amount of vault shares that may be minted to given address. |
maxWithdraw()
Return Values:
Return Name | Type | Description |
---|---|---|
Maximum | address | amount of underlying |
maxRedeem()
Return Values:
Return Name | Type | Description |
---|---|---|
Maximum | address | amount of shares that may be redeemed by |
deposit()
This overrides deposit(uint256)
from the parent AffiliateToken
contract. It therefore needs to be public since the AffiliateToken
function is public
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of tokens to deposit. |
Return Values:
Return Name | Type | Description |
---|---|---|
Quantity | uint256 | of vault shares issued to caller. |
deposit()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of tokens to deposit. |
| address | Receiver of issued vault shares. |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | of the vault issued to |
depositAndStake()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of tokens to deposit. |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | of the vault issued to |
depositAndStakeFor()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of tokens to deposit. |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | of the vault issued to |
mint()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of shares to mint. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | of underlying that have been deposited. |
mint()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of shares to mint. |
| address | Receiver of issued vault shares. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | of underlying that have been deposited. |
mintAndStake()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of shares to mint. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | of underlying that have been deposited. |
mintAndStakeFor()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of shares to mint. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | of underlying that have been deposited. |
withdraw()
This overrides withdraw(uint256)
from the parent AffiliateToken
contract.
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of underlying |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | of vault burned in exchange for underlying |
withdraw()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of underlying |
| address | Receiver of underlying token. |
| address | Owner of burned vault shares. |
Return Values:
Return Name | Type | Description |
---|---|---|
shares | uint256 | of vault burned in exchange for underlying |
redeem()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of vault shares to exchange for underlying tokens. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | of underlying sent to |
redeem()
Parameter Name | Type | Description |
---|---|---|
| uint256 | Quantity of vault shares to exchange for underlying tokens. |
| address | Receiver of underlying tokens. |
| address | Owner of burned vault shares. |
Return Values:
Return Name | Type | Description |
---|---|---|
assets | uint256 | of underlying sent to |
takeManagementAndPerformanceFees()
setFees()
Value is in 1e18, e.g. 100% = 1e18 - 1 BPS = 1e12
Parameter Name | Type | Description |
---|---|---|
| struct Vault.FeeStructure | New |
setUseLocalFees()
Parameter Name | Type | Description |
---|---|---|
| bool |
|
setStaking()
Parameter Name | Type | Description |
---|---|---|
| address | Address of the staking contract. |
setRegistry()
Parameter Name | Type | Description |
---|---|---|
| address | The new _registry address. |
withdrawAccruedFees()
we send funds now to the feeRecipient which is set on the feeController. We must make sure that this is not address(0) before withdrawing fees
pauseContract()
unpauseContract()
Events
WithdrawalFee
PerformanceFee
ManagementFee
FeesUpdated
StakingUpdated
RegistryUpdated
UseLocalFees
Modifiers
takeFees()
takeFees()
Graphs
Dependency Graph
Inheritance Graph
Last updated