In this guide, we will cover an example of how to deposit into the stETHvv Vault.
1) If you are depositing using ETH
For this scenario, you can use our Adapter contract. It will convert ETH into stETH using Curve pool under the hood.
import BigNumber from'bignumber.js'import { ethers } from'ethers'// Parameters exampleconstpodsAdapterAddress='0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8'constpodsStethvvAddress='0x463f9ed5e11764eb9029762011a03643603ad879'constpodsAdapterABI=''// You can find this information on the Contract Addresses page// ETH Amount that will be depositedconstamount= (newBigNumber(1)).multipliedBy(newBigNumber(10).pow(18))// 1 ETHconstreceiver='0x123..'// Address that will receive the sharesconstslippage=2/100; // (Eg: 2%)/////////////// Ethers.js// Instantiate contractconstPodsAdapter=awaitethers.getContractAt(PodsAdapterAddress, PodsAdapterABI)constdestinationVault= podsStethvvAddressconstminOutput=amount.multipliedBy(1-slippage)/** * @param destinationVault Pods' strategy vault that will receive the stETH * @param receiver Address that will be the owner of the Vault's shares * @param minOutput slippage control. Minimum acceptable amount of stETH * @return uint256 Amount of shares returned by vault ERC4626 contract */awaitPodsAdapter.deposit( destinationVault, receiver, minOutput, { value: amount })
Coming soon...
2) If you are depositing using stETH directly
For this scenario, you will need to first approve stETH to be spent on behalf of our Vault.
import BigNumber from'bignumber.js'import { ethers } from'ethers'// Ethers.js// Parameters exampleconstamount= (newBigNumber(1)).multipliedBy(newBigNumber(10).pow(18))constpodsStethvvAddress='0x463f9ed5e11764eb9029762011a03643603ad879'// Change here for stETHvv or ETHphoriaconstPodsVaultABI=''// Get this in our Contract Addresses sectionconstreceiver='0x123..'// Address that will receive the shares// 1) Approve Vault to spend stETH on your behalfconststETHAddress='0xae7ab96520de3a18e5e111b5eaab095312d7fe84'constERC20ABI=''conststETH=awaitethers.getContractAt(stETHAddress,ERC20ABI)awaitstETH.approve(podsStethvvAddress, amount)// 2) Deposit into stETHvvconstPodsVault=awaitethers.getContractAt(podsStethvvAddress, PodsVaultABI)/** * @param receiver Address that will be the owner of the Vault's shares * @param amount Amount to be deposited into the vault * @return uint256 Amount of shares returned by vault ERC4626 contract */awaitPodsVault.deposit( amount, receiver)