Deposit funds through smart contracts
Other > Guides > Deposit funds through smart contracts
Last updated
Other > Guides > Deposit funds through smart contracts
Last updated
This tutorial will guide you in the process of depositing new funds into Idle directly from the smart contracts in case the website has limited access or is down.
To ensure a smooth process be sure to have the following items ready:
A supported EVM wallet (Metamask, Coinbase wallet, Rabby)
Underlying assets (DAI, USDC, USDT, WETH)
Ether (ETH) to cover network fees (i.e. gas)
Visit the block explorer of the chain you want to deposit in (such as Etherscan, Polygonscan, and Optimistic Etherscan)
On the block explorer, look for the token address you want to deposit. Always double-check the address with official token resources
Once found, visit the contract page, click on the Contract tab, and then on Write Contract. If you see the Write as Proxy option listed, use this one instead
Click on Connect to Web3 to connect your wallet
In the first method usually, you have the Approve function. You will need to input:
the Spender, i.e. the Idle's vault address (NB - use the CDO address for Yield Tranches)
the Value, i.e. the amount you want to deposit unit converted. You can use this tool to easily convert in multiple formats. Be careful in using the right amount of decimals for the token! NB - USDC and USDT have 6 decimals (10^6), DAI and WETH have 18 decimals (10^18)
Click on Write and execute your transaction
Visit the vaults' addresses of Best Yield and Yield Tranches and select the one you want to deposit to. For YTs, you need to always use the contract tagged as CDO
Follow the same steps above (3, 4) and then select the function mintIdleToken
for BY (in the bool
parameter write True
) or depositAA
, depositBB
for YTs (where AA stands for Senior and BB for Junior)
Input the amount you want to deposit, unit converted. Same as the point 5 above.
Click on Write and execute your Tx. If successful, you will see an outflow of the token selected and an inflow of the Idle's vault LP tokens.
The same process can be done through a multisig, i.e. a smart contract, by building the Tx using the Transaction Builder app. Safe fetches automatically the proper ABI of the contract.
Need further help? Check our guides list or get in contact on Discord.