How to Manually Use Vaults With Contracts
In a pinch, it helps to know how to deposit funds or withdraw funds without depending on a centralized interface! With Crystl Finance, you always have full control of your money in DeFi!
- Wallet: MetaMask (Desktop) is required
- 1.Identify the _pid of the Vault you are interested in.
- 2.Identify your exact LP token amount.
- 3.Compute your LP token amount in WEI.
Requirement: Please Approve the Vault before trying to make a deposit.
First, before making a deposit you will need the ID of the Vault (_pid).
For example, the _pid for DARK-CRO is 83.
Search your address
Press the button to view your token holdings
Identify the correct LP tokens, press the link for the LP token name (not the address)
Copy your LP token balance
Third. Once you have your balance you will need to convert it to WEI. To convert, multiply the number by 10¹⁸. In the example below we use Google Sheets to compute the number, entering "=0.0168705328164203*10^18" into a cell to obtain the result. Its possible to change the number format so we can see the large number. The result is 16870532816420300.
Compute the LP in WEI by multiplying by 10¹⁸
Finally, navigate to the VaultHealer and press the "Connect to Web3" link to connect your wallet. Find function "3. deposit" and enter the values for the _pid and the _wantAmt that you determined previously. Press the Write button, and you balance will be deposited into the Vault for auto-compounding. Simple!
Perform a manual deposit by Connecting your wallet and calling function 3. with _pid as the ID of the Vault, and _wantAmt as the amount of LP tokens to deposit (in WEI format).
- 1.Identify the _pid of the Vault you would like to withdraw from.
Withdrawing your tokens from the Vault is even easier than depositing. You can withdraw at any time by calling function 12. withdrawAll and providing the Vault _pid to the VaultHealer so it knows to withdraw from that specific Vault.
Withdraw your deposit by specifying the _pid and pressing the Write button
- 1.Identify the _pid of the Vault you would like to monitor your balance in.
- 3.Observe your balance.
You can observe your deposited balance at any time, you can even do it from a different computer as long as you know your wallet address and the _pid of the Vault you deposited into. Use function 4. stakedWantTokens on the Read Contract of the VaultHealer.
Specify the required _pid of the Vault and your _user wallet address, then press Query to view your LP token balance.