> For the complete documentation index, see [llms.txt](https://sacred.gitbook.io/sacred-technical-private-doc/aoErdM4nGaDgTMKPJV7E/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sacred.gitbook.io/sacred-technical-private-doc/aoErdM4nGaDgTMKPJV7E/what-is-sacred/user-journey-from-deposit-to-withdrawal/2.-deposit-tokens.md).

# 2. Deposit Tokens

User deposits the predetermined amount into the Sacred pool. After the tokens are deposited, they are moved into a DeFi platform (Aave) where they can earn yield. The deposit process is as follows:

`Code Summary - Deposit`&#x20;

`User Inputs:`&#x20;

1. `Token (e.g. ETH)`&#x20;
2. `Amount (e.g. 0.1)`

`Process:`&#x20;

1. `Front-End code takes input`&#x20;
2. `Generates a zk note on the browser (nullifier+secret combo)`&#x20;
   1. `Note`&#x20;
   2. `Commitment`&#x20;
3. `The Note contains ALL parts of the proof (commitment and nullifier and secret). This is saved by the user.`&#x20;
4. `The commitment is sent to the contract to be inserted in the Merkle Tree.`

`Outputs:`&#x20;

1. `Transaction receipt`&#x20;

{% embed url="<https://github.com/Sacred-Finance/sacred-cli-tools/blob/9e297751a63087e140b6e0577cba6af702806341/cli.js#L106>" %}

The deposit process is highlighted below in red:

![](https://lh4.googleusercontent.com/WftQRSW8LCE3z9JvRe7dq8IowxWcUujNyR1Sgi2kN2CP5st1-xSBAUlVs-Yw87ZJ562unKezLVk-nPjPMUUbf2Q3AB-w1cmhRgm6yeqmr--X2K_J7XZ7B8aS_iwSQO3E2gP6txtTZX9FPEgiUA)
