Vault
IVaultDomain
Addresses
Chain | Address |
---|
Types
Signature
EIP-712 signature
struct Signature {
uint8 v;
bytes32 r;
bytes32 s;
}
WithdrawRequest
A request to withdraw or redeem shares
Fields
Name | Type | Description |
---|---|---|
assets | uint256 | The asset value of shares when the request was made. Redemptions will be processed at a rate no better than this. |
shares | Shares | Size of the request |
sharesRedeemed | Shares | Number of shares that have been redeemed using this request |
penalty | uint64 | Seconds of penalty which were applied to this request |
beginsAt | uint64 | Timestamp when this request will become available |
duration | uint64 | Length (after beginsAt ) until 100% of shares can be redeemed |
struct WithdrawRequest {
uint256 assets;
Shares shares;
Shares sharesRedeemed;
uint64 penalty;
uint64 beginsAt;
uint64 duration;
}
IVaultErrors
Addresses
Chain | Address |
---|
Errors
MintRateExceeded
Attempted to mint, but more than maxAssets
would have been
required ($/LP price too high).
error MintRateExceeded(Shares shares, uint256 assetsRequired, uint256 maxAssets)
Parameters
Name | Type | Description |
---|---|---|
shares | Shares | Requested shares to mint |
assetsRequired | uint256 | Assets that were actually required to mint shares |
maxAssets | uint256 | Maximum assets user was willing to spend |
DepositRateExceeded
Attempted to deposit, but less than minShares
would have been
yielded ($/LP price too high).
error DepositRateExceeded(uint256 assets, Shares sharesMinted, Shares minShares)
Parameters
Name | Type | Description |
---|---|---|
assets | uint256 | Requested collateral to deposit |
sharesMinted | Shares | Shares that actually would have been minted |
minShares | Shares | Minimum acceptable shares to mint in exchange for assets |
WithdrawRateUnmet
Attempted to withdraw, but more than maxShares
would have been
required ($/LP price too low).
error WithdrawRateUnmet(uint256 assets, Shares shares, Shares maxShares)
Parameters
Name | Type | Description |
---|---|---|
assets | uint256 | Requested collateral to withdraw |
shares | Shares | Shares that actually would have to have been burnt |
maxShares | Shares | Maximum acceptable shares to burn in exchange for withdraw |
RedeemRateUnmet
Attempted to redeem, but less than maxAssets
would have been
yielded ($/LP price too low).
error RedeemRateUnmet(Shares shares, uint256 assets, uint256 minAssets)
Parameters
Name | Type | Description |
---|---|---|
shares | Shares | Requested shares to redeem |
assets | uint256 | Assets that were actually offered in exchange for shares |
minAssets | uint256 | Minimum acceptable assets to receive for shares |
DepositsDisabled
This action cannot be performed because user deposits and withdraws are disabled
error DepositsDisabled()
ZeroSharesRequested
cannot redeem zero shares
error ZeroSharesRequested()
FeeDistributorOnly
error FeeDistributorOnly()
MaxCollateralExceeded
Attempted donation would have brought balance above maxCollateral
error MaxCollateralExceeded()
DomFiPerpOnly
error DomFiPerpOnly()
NoWithdrawAssets
This request could not be simulated or executed because it would yield 0 assets.
error NoWithdrawAssets()
Overspecified
Internal assertion, should not be encountered in the wild.
error Overspecified()
InsufficientVaultBalance
error InsufficientVaultBalance()
ActiveWithdrawRequest
Transfers are prohibited if they would lower the balance of an address below the remaining part of an active withdraw request.
error ActiveWithdrawRequest(address from, Shares lockedShares, Shares newBalance)
Parameters
Name | Type | Description |
---|---|---|
from | address | Address from which transfer would be made |
lockedShares | Shares | shares still "locked" by the withdraw request |
newBalance | Shares | The share balance of from after the transfer attempt |
PendingPenalty
Transfers are prohibited if the equivalent withdraw request would
be blocked by a penalty. You'll have to wait until penalty
+
penaltyStart
.
error PendingPenalty(address from, Shares amount, uint64 penalty, uint64 penaltyStart)
see _afterTokenTransfer
.
Parameters
Name | Type | Description |
---|---|---|
from | address | Address from which transfer would be made |
amount | Shares | Share size of attempted transfer |
penalty | uint64 | Total penalty that would have been applied to a request this size. That is, if from had made this request, they would have had to wait penalty seconds before beginning to withdraw. |
penaltyStart | uint64 | The timestamp at which the penalty would have started |