> For the complete documentation index, see [llms.txt](https://docs.allo.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allo.xyz/lending/architecture.md).

# Architecture

<figure><img src="https://1070871150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiF8aFhxdxLgTYGXdW1nb%2Fuploads%2Fmg3gK9SjWMKPAunElm02%2Farchitecture_bitcoin_lending%20(1).png?alt=media&amp;token=1c3ff477-dd1b-4ba8-93ea-d5d73f678dec" alt=""><figcaption><p>Lending flow</p></figcaption></figure>

* **User Initiates Deposit**:
  * The user deposits `alloBTC` or `BTCB` through the **User Dashboard** to participate in the platform's investment pool.
* **Deposit Sent to AlloMarketPool**:
  * The deposit is processed by **AlloMarketPool**, the contract managing user deposits and fund flow.
* **AlloMarketPool Sends Deposit to Gnosis Vault**:
  * The **AlloMarketPool** forwards the deposit to the **Gnosis Vault** for secure custody.
* **Dashboard Update**:
  * The **User Dashboard** shows confirmation of the deposit for transparency.
* **User Receives USDC from Allo Treasury**:
  * The user is rewarded with `X%` of the BTC value in USDC, credited to their account as shown in the **Dashboard**.
