IVaultWithdrawHandler
IVaultWithdrawHandler
Addresses
Chain | Address |
---|
Functions
withdraw
Withdraw assets
to receiver
by burning shares
from
account
. Reverts unless
- instantWithdrawAvailable() == true
- OR
account
has a WithdrawRequest with at leastshares
available.
See EIP-4626 withdraw().
function withdraw(
uint256 assets,
address receiver,
address account,
Shares maxShares
) external returns (
Shares shares
)
Parameters
Name | Type | Description |
---|---|---|
assets | uint256 | Collateral units to withdraw |
receiver | address | Send withdrawn collateral to this address |
account | address | Address from which to burn shares. msg.sender must be that address or its manager |
maxShares | Shares | Slippage control. Ignored if zero. If nonzero, revert if more than maxShares would be burnt to make this withdrawal |
Return Values
Name | Type | Description |
---|---|---|
shares | Shares | dfUSDC burnt from account to make the withdrawal |
redeem
Redeem shares
from account
, and send the resulting collateral
to receiver
. Reverts unless
- instantWithdrawAvailable() == true
- OR
account
has a WithdrawRequest with at leastshares
available.
See EIP-4626 withdraw().
function redeem(
Shares shares,
address receiver,
address account,
uint256 minAssets
) external returns (
uint256 assets
)
Parameters
Name | Type | Description |
---|---|---|
shares | Shares | dfUSDC to burn from account |
receiver | address | Send collateral to this address |
account | address | Address from which to burn shares. msg.sender must be that address or its manager |
minAssets | uint256 | Slippage control. Ignored if zero. If nonzero, revert unless the redemption yields at least minAssets |
Return Values
Name | Type | Description |
---|---|---|
assets | uint256 | collateral sent to receiver |
VaultWithdrawDelegate
Addresses
Chain | Address |
---|
Functions
withdraw
Withdraw assets
to receiver
by burning shares
from
account
. Reverts unless
- instantWithdrawAvailable() == true
- OR
account
has a WithdrawRequest with at leastshares
available.
See EIP-4626 withdraw().
function withdraw(
contract IVaultWithdrawHandler handler,
uint256 assets,
address receiver,
address account,
Shares maxShares
) internal returns (
Shares shares
)
Parameters
Name | Type | Description |
---|---|---|
handler | contract IVaultWithdrawHandler | |
assets | uint256 | Collateral units to withdraw |
receiver | address | Send withdrawn collateral to this address |
account | address | Address from which to burn shares. msg.sender must be that address or its manager |
maxShares | Shares | Slippage control. Ignored if zero. If nonzero, revert if more than maxShares would be burnt to make this withdrawal |
Return Values
Name | Type | Description |
---|---|---|
shares | Shares | dfUSDC burnt from account to make the withdrawal |
redeem
Redeem shares
from account
, and send the resulting collateral
to receiver
. Reverts unless
- instantWithdrawAvailable() == true
- OR
account
has a WithdrawRequest with at leastshares
available.
See EIP-4626 withdraw().
function redeem(
contract IVaultWithdrawHandler handler,
Shares shares,
address receiver,
address account,
uint256 minAssets
) internal returns (
uint256 assets
)
Parameters
Name | Type | Description |
---|---|---|
handler | contract IVaultWithdrawHandler | |
shares | Shares | dfUSDC to burn from account |
receiver | address | Send collateral to this address |
account | address | Address from which to burn shares. msg.sender must be that address or its manager |
minAssets | uint256 | Slippage control. Ignored if zero. If nonzero, revert unless the redemption yields at least minAssets |
Return Values
Name | Type | Description |
---|---|---|
assets | uint256 | collateral sent to receiver |