Vault abi

VaultStETH

Contract: 0xcDd374F491fBF3f4FcF6E9023c99043774005137 The core asset is stETH.

deposit

function deposit(uint256 _assets, address _receiver)
public
returns (uint256 shares_);

see IERC4626.sol

withdraw

function withdraw(uint256 _assets, address _receiver, address _owner)
public
returns (uint256 shares_);

see IERC4626.sol

mint

function mint(uint256 _shares, address _receiver)
public
returns (uint256 assets_);

see IERC4626.sol

redeem

function redeem(uint256 _shares, address _receiver, address _owner)
public
returns (uint256 assetsAfterFee_);

see IERC4626.sol

VaultStETHWrapper

0x22CdAe94F135b310D2fFb01e8af05f10092a3D0B

deposit

function deposit(uint256 _wethAmount, bytes calldata _swapCalldata, uint256 _minStEthIn, address _receiver)
external
payable
returns (uint256 returnShares_)
  • @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 stETH. This is used to request exchange data from 1inch with calldata, where srcToken is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE and dstToken is 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84.

  • @param _swapCalldata The calldata for the 1inch exchange operation.

  • @param _minStEthIn 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

function withdraw(
uint256 _amount,
bytes calldata _swapCalldata,
uint256 _minEthOut,
address _receiver,
bool _isWeth
) external returns (uint256 returnEthAmount_);
  • @dev Withdraw native assets ETH or WETH from the vault.

  • @param _amount The amount of stETH 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 VaultStETHWrapper.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.

Note: It is necessary to use the approve method to authorize this contract with the shares token.

depositWstETH

function depositWstETH(uint256 _amount, address _receiver) external returns (uint256 returnShares_);
  • @dev Invest initial assets into the VAULT_CONTRACT using wstETH.

  • @param _amount The amount of wstETH to be invested.

  • @param _receiver The recipient of the share tokens.

  • @return returnShares_ The amount of share tokens obtained.

withdrawWstETH

function withdrawWstETH(uint256 _amount, address _receiver) external returns (uint256 wstAmount_);
  • @dev Invest initial assets into the VAULT_CONTRACT using wstETH.

  • @param _amount The amount of stETH to be withdrawn from the VAULT_CONTRACT.

  • @param _receiver The recipient of the redeemed assets.

  • @return wstAmount_ The actual amount of wstETH redeemed.

Note: It is necessary to use the approve method to authorize this contract with the shares token.

Last updated