VaultWithdrawHandler
VaultWithdrawHandler
Addresses
Chain | Address |
---|---|
Arbitrum Sepolia | 0x531d73fc438a429f36a8f268c8DcDFcbAD7AF2ac |
Base Sepolia | 0xF6aCcB5ca56FFD7a4Dc8E24296071D56E74bc4C2 |
Base Mainnet | 0x49De707a84Bbb0E511f60435A52D955395AbD18a |
Functions
initialize
function initialize(struct StorageInstance app_) external
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
) public 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
) public 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 |
Events
WithdrawCompleted
event WithdrawCompleted(address caller, address owner, struct IVaultDomain.WithdrawRequest withdrawRequest)