Skip to main content

VaultWithdrawHandler

VaultWithdrawHandler

Addresses

ChainAddress
Arbitrum Sepolia0x531d73fc438a429f36a8f268c8DcDFcbAD7AF2ac
Base Sepolia0xF6aCcB5ca56FFD7a4Dc8E24296071D56E74bc4C2
Base Mainnet0x49De707a84Bbb0E511f60435A52D955395AbD18a

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 least shares available.

See EIP-4626 withdraw().

function withdraw(
uint256 assets,
address receiver,
address account,
Shares maxShares
) public returns (
Shares shares
)

Parameters

NameTypeDescription
assetsuint256Collateral units to withdraw
receiveraddressSend withdrawn collateral to this address
accountaddressAddress from which to burn shares. msg.sender must be that address or its manager
maxSharesSharesSlippage control. Ignored if zero. If nonzero, revert if more than maxShares would be burnt to make this withdrawal

Return Values

NameTypeDescription
sharesSharesdfUSDC 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 least shares available.

See EIP-4626 withdraw().

function redeem(
Shares shares,
address receiver,
address account,
uint256 minAssets
) public returns (
uint256 assets
)

Parameters

NameTypeDescription
sharesSharesdfUSDC to burn from account
receiveraddressSend collateral to this address
accountaddressAddress from which to burn shares. msg.sender must be that address or its manager
minAssetsuint256Slippage control. Ignored if zero. If nonzero, revert unless the redemption yields at least minAssets

Return Values

NameTypeDescription
assetsuint256collateral sent to receiver

Events

WithdrawCompleted

event WithdrawCompleted(address caller, address owner, struct IVaultDomain.WithdrawRequest withdrawRequest)