CRYSTL Finance
Searchโ€ฆ
๐Ÿ“„
Cronos Explorer Manual Contract Interaction Guide
In this article you will learn how to easily interact with the Cronos Explorer to deposit into or withdraw from Crystl Vault contracts on the Cronos blockchain!

Why Learn to Manually Interact With Smart Contracts?

In times of network congestion or issues with RPC nodes, it is entirely possible that the front-end interface of a decentralized application such as Crystl.Finance could have trouble loading the list of Vaults, or displaying your deposited balance. However, this doesn't mean that you can't access your funds or make a deposit to continue to use our services effectively!

What is the VaultHealer?

To do any kind of interaction like depositing to or withdrawing from the Crystl Vaults manually, you may use the VaultHealer Write Contract page on the official Cronos blockchain explorer. The VaultHealer is a smart contract that interfaces with our auto-compounding protocols.
The Crystl Finance VaultHealer Write Contract on the Cronos Explorer
To interact with the VaultHealer, you must press the "Connect to Metamask" button and connect your wallet to the site.

What is the PID?

The _pid variable is an identifier for the one of the Vaults available on Crystl Finance. If you have made a deposit into one of our Vaults before you can easily find this variable by navigating to your deposit transaction hash on the blockchain explorer and scrolling all the way to the bottom in the Input section. The table there will show you the _pid variable value for the specific Vault you made a deposit into. In the example below, this value is 23.
Example _pid value "23" for one of the Crystl Vaults
If you are not sure which is the _pid for your Vault, please get in touch with our support team on Telegram or through Intercom.

How to Withdraw from a Vault?

Withdraw All

To withdraw your entire deposit, you will simply need the _pid variable of the Vault that you have previously made a deposit to. Navigate to the VaultHealer Write Contract page and then, using the withdrawAll function you will be able to withdraw your entire LP balance from the Vault and to your wallet! All you have to do is enter the _pid and hit the "Write" button and accept the transaction. Easy!
VaultHealer withdrawAll function (12)

Withdraw a Fixed Amount

To withdraw a portion of your deposit, you will need to things:
  1. 1.
    The _pid of the Vault.
  2. 2.
    The LP amount you wish to withdraw, in WEI.
As above, enter the _pid of the Vault. As for the _wantAmt this Value will have to be in WEI. For example, if you wanted to withdraw 0.164 LP tokens then simply multiply this by 10^18.
0.164 x 10^18 = 164000000000000000
You would put 164000000000000000 in the _wantAmt and then simply press the "Write" button to withdraw your 0.164 LP from the Vault.
VaultHealer withdraw function (11)

How to Deposit to a Vault?

To deposit into a Vault you will need three things:
  1. 1.
    The _pid of the Vault.
  2. 2.
    Approval for the VaultHealer contract address (0x4dF0dDc29cE92106eb8C8c17e21083D4e3862533) to spend your LP tokens
  3. 3.
    The LP amount you wish to deposit, in WEI.
Firstly, you need to give the VaultHealer allowance to your LP token balance. To do this you have to call the approve function on the contract for the LP token that you have in your wallet. For example, here is the contract for DAI-WCRO LP.
DAI-WCRO LP Contract approve function (1)
So, to allow the VaultHealer to spend your DAI-WCRO LP token balance fill out the spender as:
0x4dF0dDc29cE92106eb8C8c17e21083D4e3862533
As for the value box, this is the maximum amount that you will allow the VaultHealer to withdraw from your wallet. Remember that this value MUST be in WEI format. So whatever LP token amount you wish to allow, be sure to multiply that by 10^18 and enter that value.
Second, you will want to go back to the VaultHealer Write Contract page, and find the deposit function. Enter the _pid of the Vault. Then you will want to enter the _wantAmt which is how many LP tokens you would like to deposit into that Vault. As in the example above, if you wanted to deposit 0.164 LP tokens then simply multiply this by 10^18.
0.164 x 10^18 = 164000000000000000
You would put 164000000000000000 in the _wantAmt and then simply press the "Write" button to deposit your 0.164 LP into the Vault.
VaultHealer deposit function (3)

How to Check Existing LP Balance in a Vault?

Checking your balance is extremely simple! Rather than the Write Contract, navigate to the VaultHealer Read Contract page.
VaultHealer Read Contract page
Over here, simply fill out the _pid for the Vault, and the _user address as your address from MetaMask.
MetaMask address
Once you press the "Query" button the contract will tell your your LP balance in WEI.
Vault LP balance in (WEI)
In this case, Vault number 16 has 67279627514864 LP tokens staked for our address (in WEI). To compute the decimal number of our LP, we can simply divide by 10^18.
67279627514864 / 10^18 = 0.00006727962 LP tokens.

A Word on Connection Issues

We appreciate everyone's patience while Crystl Finance and the Cronos network iron out some of the bugs and connection troubles that users are experiencing. New networks are fun and exciting, with enormous opportunities on our #HighVibeAPY Vaults, but they don't come without challenges so early in their lifetime. We are exceedingly grateful for everyone's patience and hope that this guide will help you feel more secure and empower you to learn something new!
Copy link
On this page
Quick-Access Links
Why Learn to Manually Interact With Smart Contracts?
What is the VaultHealer?
What is the PID?
How to Withdraw from a Vault?
How to Deposit to a Vault?
How to Check Existing LP Balance in a Vault?
A Word on Connection Issues