Depositing
Last updated
Last updated
Let’s start with depositing assets. Users can choose any amount of ERC-20 tokens (depending on the chain they are connected to). After the user presses "Deposit," their tokens transfer from the public wallet to the discreet wallet inside the Hinkal smart contract. The user maintains full self-custody over the assets. Users can manually add any ERC-20 tokens by inserting the token address.
What happends under the hood is that deposits convert publicly visible ERC tokens into a token commitment that holds the same value as that of the original token, and the Hinkal public key of the intended commitment owner. The commitment is stored in a MerkleTree smart contract as a leaf if the amount is successfully deposited.