Vault Intro
VaultWstETH
Contract: 0xE946Dd7d03F6F5C440F68c84808Ca88d26475FC5 The core asset is wstETH.
deposit
see IERC4626.sol
withdraw
see IERC4626.sol
mint
see IERC4626.sol
redeem
see IERC4626.sol
VaultWstETHWrapper
0xF2254b4dA1D68540b855e4D219AaC1EF0eDBA575
deposit
@dev Invest initial assets into the vault using ETH or WETH.
@param _wethAmount The amount of WETH to be invested.Here, the sum of wethAmount and msg.value together constitute the amount that needs to be exchanged for wstETH. This is used to request exchange data from 1inch with calldata, where srcToken is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE and dstToken is 0x5979D7b546E38E414F7E9822514be443A4800529.
@param _swapCalldata The calldata for the 1inch exchange operation.
@param _minWstEthIn The minimum amount of token to be obtained during the 1inch exchange operation.
@param _receiver The recipient of the share tokens.
@return shares_ The amount of share tokens obtained.
withdraw
@dev Withdraw native assets ETH or WETH from the vault.
@param _amount The amount of wstETH to be withdrawn from the vault.
@param _swapCalldata The calldata for the 1inch exchange operation.The calldata used to request an exchange from 1inch, where srcToken is 0x5979D7b546E38E414F7E9822514be443A4800529, and dstToken is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.The src amount consumed is VaultWstETHWrapper.getWithdrawSwapAmount(_amount),because the vault's withdrawal fee needs to be deducted.
@param _minEthOut The minimum amount of token to be obtained during the exchange.
@param _receiver The recipient of the redeemed assets.
@param _isWeth Whether to redeem the assets in the form of WETH.Regardless of whether the asset requested for redemption is WETH or ETH, use the address of ETH as the dstToken when requesting from 1inch.
@return returnEthAmount_ The actual amount of ETH(WETH) redeemed.
Last updated