Pool
\
Constructor
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| |
1 |
|
|
| |
2 |
|
|
| |
3 |
|
|
| |
4 |
|
|
| |
5 |
|
|
| The name of the token. |
6 |
|
|
| The symbol of the token. |
\
Functions
BOOTSTRAP_MINT
BOOTSTRAP_MINT
The amount of shares that will be burned during the first deposit/mint.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
DOMAIN_SEPARATOR
DOMAIN_SEPARATOR
Returns the signature domain separator.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The signature domain separator. |
\
PERMIT_TYPEHASH
PERMIT_TYPEHASH
Returns the permit type hash.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
allowance
allowance
Returns the allowance that one account has given another over their tokens.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` |
|
| |
1 | `` |
|
|
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
approve
approve
Function that allows one account to set the allowance of another account over their tokens. Emits an {Approval} event.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that tokens are approved for. |
1 |
|
|
| Amount of tokens that have been approved. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Boolean indicating whether the operation succeeded. |
\
asset
asset
The address of the underlying asset used by the Vault. MUST be a contract that implements the ERC-20 standard. MUST NOT revert.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
balanceOf
balanceOf
Returns the amount of tokens owned by a given account.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` |
|
|
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
balanceOfAssets
balanceOfAssets
Returns the amount of underlying assets owned by the specified account.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Address of the account. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Amount of assets owned. |
\
convertToAssets
convertToAssets
The amount of `assets_` the `shares_` are currently equivalent to. MUST NOT be inclusive of any fees that are charged against assets in the Vault. MUST NOT reflect slippage or other on-chain conditions when performing the actual exchange. MUST NOT show any variations depending on the caller. MUST NOT revert.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to convert. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of equivalent assets. |
\
convertToExitAssets
convertToExitAssets
Returns the amount of exit assets for the input amount.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to convert to assets. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Amount of assets able to be exited. |
\
convertToExitShares
convertToExitShares
Returns the amount of exit shares for the input amount.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
|
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Amount of shares able to be exited. |
\
convertToShares
convertToShares
The amount of `shares_` the `assets_` are currently equivalent to. MUST NOT be inclusive of any fees that are charged against assets in the Vault. MUST NOT reflect slippage or other on-chain conditions when performing the actual exchange. MUST NOT show any variations depending on the caller. MUST NOT revert.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets to convert. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of equivalent shares. |
\
decimals
decimals
Returns the decimal precision used by the token.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
decreaseAllowance
decreaseAllowance
Function that allows one account to decrease the allowance of another account over their tokens. Emits an {Approval} event.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that tokens are approved for. |
1 |
|
|
| Amount to decrease approval by. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Boolean indicating whether the operation succeeded. |
\
deposit
deposit
Mints `shares_` to `receiver_` by depositing `assets_` into the Vault. MUST emit the {Deposit} event. MUST revert if all of the assets cannot be deposited (due to insufficient approval, deposit limits, slippage, etc).
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets to deposit. |
1 |
|
|
| The receiver of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares minted. |
\
depositWithPermit
depositWithPermit
Does a ERC4626 `deposit` with a ERC-2612 `permit`.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of `asset` to deposit. |
1 |
|
|
| The receiver of the shares. |
2 |
|
|
| The timestamp after which the `permit` signature is no longer valid. |
3 |
|
|
| ECDSA signature v component. |
4 |
|
|
| ECDSA signature r component. |
5 |
|
|
| ECDSA signature s component. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares minted. |
\
increaseAllowance
increaseAllowance
Function that allows one account to increase the allowance of another account over their tokens. Emits an {Approval} event.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that tokens are approved for. |
1 |
|
|
| Amount to increase approval by. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Boolean indicating whether the operation succeeded. |
\
manager
manager
The address of the account that is allowed to update the vesting schedule.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
maxDeposit
maxDeposit
Maximum amount of `assets_` that can be deposited on behalf of the `receiver_` through a `deposit` call. MUST return a limited value if the receiver is subject to any limits, or the maximum value otherwise. MUST NOT revert.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The receiver of the assets. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The maximum amount of assets that can be deposited. |
\
maxMint
maxMint
Maximum amount of `shares_` that can be minted on behalf of the `receiver_` through a `mint` call. MUST return a limited value if the receiver is subject to any limits, or the maximum value otherwise. MUST NOT revert.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The receiver of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The maximum amount of shares that can be minted. |
\
maxRedeem
maxRedeem
Maximum amount of `shares_` that can be redeemed from the `owner_` through a `redeem` call. MUST return a limited value if the owner is subject to any limits, or the total amount of owned shares otherwise. MUST NOT revert.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The owner of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The maximum amount of shares that can be redeemed. |
\
maxWithdraw
maxWithdraw
Maximum amount of `assets_` that can be withdrawn from the `owner_` through a `withdraw` call. MUST return a limited value if the owner is subject to any limits, or the total amount of owned assets otherwise. MUST NOT revert.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The owner of the assets. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The maximum amount of assets that can be withdrawn. |
\
mint
mint
Mints `shares_` to `receiver_` by depositing `assets_` into the Vault. MUST emit the {Deposit} event. MUST revert if all of shares cannot be minted (due to insufficient approval, deposit limits, slippage, etc).
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to mint. |
1 |
|
|
| The receiver of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets deposited. |
\
mintWithPermit
mintWithPermit
Does a ERC4626 `mint` with a ERC-2612 `permit`.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of `shares` to mint. |
1 |
|
|
| The receiver of the shares. |
2 |
|
|
| The maximum amount of assets that can be taken, as per the permit. |
3 |
|
|
| The timestamp after which the `permit` signature is no longer valid. |
4 |
|
|
| ECDSA signature v component. |
5 |
|
|
| ECDSA signature r component. |
6 |
|
|
| ECDSA signature s component. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares deposited. |
\
name
name
Returns the name of the token.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
nonces
nonces
Returns the nonce for the given owner.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` |
|
|
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
permit
permit
Approve by signature.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Owner address that signed the permit. |
1 |
|
|
| Spender of the permit. |
2 |
|
|
| Permit approval spend limit. |
3 |
|
|
| Deadline after which the permit is invalid. |
4 |
|
|
| ECDSA signature v component. |
5 |
|
|
| ECDSA signature r component. |
6 |
|
|
| ECDSA signature s component. |
\
previewDeposit
previewDeposit
Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given current on-chain conditions. MUST return as close to and no more than the exact amount of shares that would be minted in a `deposit` call in the same transaction. MUST NOT account for deposit limits like those returned from `maxDeposit` and should always act as though the deposit would be accepted.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets to deposit. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares that would be minted. |
\
previewMint
previewMint
Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given current on-chain conditions. MUST return as close to and no fewer than the exact amount of assets that would be deposited in a `mint` call in the same transaction. MUST NOT account for mint limits like those returned from `maxMint` and should always act as though the minting would be accepted.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to mint. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets that would be deposited. |
\
previewRedeem
previewRedeem
Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block, given current on-chain conditions. MUST return as close to and no more than the exact amount of assets that would be withdrawn in a `redeem` call in the same transaction. MUST NOT account for redemption limits like those returned from `maxRedeem` and should always act as though the redemption would be accepted.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to redeem. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets that would be withdrawn. |
\
previewWithdraw
previewWithdraw
Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, given current on-chain conditions. MUST return as close to and no fewer than the exact amount of shares that would be burned in a `withdraw` call in the same transaction. MUST NOT account for withdrawal limits like those returned from `maxWithdraw` and should always act as though the withdrawal would be accepted.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets to withdraw. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares that would be redeemed. |
\
redeem
redeem
Burns `shares_` from `owner_` and sends `assets_` to `receiver_`. MUST emit the {Withdraw} event. MUST revert if all of the shares cannot be redeemed (due to insufficient shares, withdrawal limits, slippage, etc).
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to redeem. |
1 |
|
|
| The receiver of the assets. |
2 |
|
|
| The owner of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets sent to the receiver. |
\
removeShares
removeShares
Removes shares from the withdrawal mechanism, can only be called after the beginning of the withdrawal window has passed.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to redeem. |
1 |
|
|
| The owner of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares withdrawn. |
\
requestRedeem
requestRedeem
Requests a redemption of shares from the pool.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares to redeem. |
1 |
|
|
| The owner of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares sent to escrow. |
\
requestWithdraw
requestWithdraw
Requests a withdrawal of assets from the pool.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets to withdraw. |
1 |
|
|
| The owner of the shares. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares sent to escrow. |
\
symbol
symbol
Returns the symbol of the token.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
totalAssets
totalAssets
Total amount of the underlying asset that is managed by the Vault. SHOULD include compounding that occurs from any yields. MUST NOT revert.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The total amount of assets the Vault manages. |
\
totalSupply
totalSupply
Returns the total amount of tokens in existence.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
\
transfer
transfer
Moves an amount of tokens from `msg.sender` to a specified account. Emits a {Transfer} event.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that receives tokens. |
1 |
|
|
| Amount of tokens that are transferred. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Boolean indicating whether the operation succeeded. |
\
transferFrom
transferFrom
Moves a pre-approved amount of tokens from a sender to a specified account. Emits a {Transfer} event. Emits an {Approval} event.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that tokens are moving from. |
1 |
|
|
| Account that receives tokens. |
2 |
|
|
| Amount of tokens that are transferred. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Boolean indicating whether the operation succeeded. |
\
unrealizedLosses
unrealizedLosses
Returns the amount unrealized losses.
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Amount of unrealized losses. |
\
withdraw
withdraw
Burns `shares_` from `owner_` and sends `assets_` to `receiver_`. MUST emit the {Withdraw} event. MUST revert if all of the assets cannot be withdrawn (due to insufficient assets, withdrawal limits, slippage, etc).
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of assets to withdraw. |
1 |
|
|
| The receiver of the assets. |
2 |
|
|
| The owner of the assets. |
Return Values:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The amount of shares burned from the owner. |
\
Events
Approval
Approval
Emitted when one account has set the allowance of another account over their tokens.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that tokens are approved from. |
1 |
|
|
| Account that tokens are approved for. |
2 |
|
|
| Amount of tokens that have been approved. |
\
BootstrapMintPerformed
BootstrapMintPerformed
Initial shares amount was minted to the zero address to prevent the first depositor frontrunning exploit.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The caller of the function that emitted the `BootstrapMintPerformed` event. |
1 |
|
|
| The user that was minted the shares. |
2 |
|
|
| The amount of assets deposited. |
3 |
|
|
| The amount of shares that would have been minted to the user if it was not the first deposit. |
4 |
|
|
| The amount of shares that was minted to the zero address to protect the first depositor. |
\
Deposit
Deposit
`caller_` has exchanged `assets_` for `shares_` and transferred them to `owner_`. MUST be emitted when assets are deposited via the `deposit` or `mint` methods.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The caller of the function that emitted the `Deposit` event. |
1 |
|
|
| The owner of the shares. |
2 |
|
|
| The amount of assets deposited. |
3 |
|
|
| The amount of shares minted. |
\
OwnershipAccepted
OwnershipAccepted
`newOwner_` has accepted the transferral of RDT ownership from `previousOwner_`.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The previous RDT owner. |
1 |
|
|
| The new RDT owner. |
\
PendingOwnerSet
PendingOwnerSet
`owner_` has set the new pending owner of RDT to `pendingOwner_`.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The current RDT owner. |
1 |
|
|
| The new pending RDT owner. |
\
RedemptionRequested
RedemptionRequested
A new redemption request has been made.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The owner of shares. |
1 |
|
|
| The amount of shares requested to redeem. |
2 |
|
|
| The amount of shares actually escrowed for this withdrawal request. |
\
SharesRemoved
SharesRemoved
Shares have been removed.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The owner of shares. |
1 |
|
|
| The amount of shares requested to be removed. |
\
Transfer
Transfer
Emitted when tokens have moved from one account to another.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| Account that tokens have moved from. |
1 |
|
|
| Account that tokens have moved to. |
2 |
|
|
| Amount of tokens that have been transferred. |
\
Withdraw
Withdraw
`caller_` has exchanged `shares_`, owned by `owner_`, for `assets_`, and transferred them to `receiver_`. MUST be emitted when assets are withdrawn via the `withdraw` or `redeem` methods.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The caller of the function that emitted the `Withdraw` event. |
1 |
|
|
| The receiver of the assets. |
2 |
|
|
| The owner of the shares. |
3 |
|
|
| The amount of assets withdrawn. |
4 |
|
|
| The amount of shares burned. |
\
WithdrawRequested
WithdrawRequested
A new withdrawal request has been made.
Parameters:
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 |
|
|
| The owner of shares. |
1 |
|
|
| The amount of assets requested to withdraw. |
2 |
|
|
| The amount of shares actually escrowed for this withdrawal request. |
\
Last updated