> For the complete documentation index, see [llms.txt](https://doc.torch.finance/telegram-usd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.torch.finance/telegram-usd/how-tgusd-works/architecture/core-components/engine.md).

# Engine

<figure><img src="/files/IK2Ornh1OkSoAQaKTdg1" alt=""><figcaption><p>Engine contact's workflow</p></figcaption></figure>

The **Engine contract** is the core of the tgUSD system, responsible for **minting tgUSD** and **redeeming USDT**. Its workflow is as follows:

## **Deposit Stablecoins and Mint tgUSD**

* Users deposit **USDT** (with support for additional stablecoins planned) into the Engine contract.
* Upon receiving the USDT, the Engine contract immediately transfers the funds to a **multisig wallet** (which will later be upgraded to a **TON adapter**).

  Depending on the target strategy:

  * Funds are bridged to external blockchains via **Stargate**, **USDT0**, or **Symbiosis** to generate yield.
  * If the **estimated bridge slippage exceeds 0.1%**, the transfer is executed via **OTC** to minimize slippage and protect capital.
  * If the yield strategy is **on TON**, no bridging occurs—the funds are deployed directly into on-chain opportunities.
* Simultaneously, the Engine contract mints **tgUSD** for the user at a 1:1 ratio.

## **Redeem Stablecoins (Redeem USDT)**

* Redemption is currently limited to a **whitelisted set of users**.
* The user **burns their tgUSD** to initiate the redemption process.
* Once the burn is confirmed, the Engine contract deploys a **dedicated Redeem Account** to track the redemption request.
* A **14-day cooldown period** is required before the user can claim their USDT.
* Alternatively, users who prefer immediate liquidity can swap tgUSD for USDT directly via the [**Torch Finance Stable Swap**](https://app.torch.finance/pools#/swap?tokenIn=1%3A0%3Ab113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe\&tokenOut=1%3A0%3A89ec04b13a423a5ace4187c27be1765b457f3ceb58c5813653e360d7bfbd7e50).

### **Purpose of the Cooldown Period**

* The cooldown period provides the protocol sufficient time to **exit yield-generating strategies** and free up collateral.
* For example, most lending protocols rely on a **utilization rate model** to manage liquidity. When available liquidity drops, borrowing rates rise, which in turn encourages borrowers to repay or face liquidation.
* The cooldown period gives the protocol sufficient time—especially under liquidity stress—to **restore a healthier utilization rate**, encouraging repayments so that **withdrawals can be fulfilled as requested**.

{% hint style="info" %}
In the early stages of the protocol, in order to comply with certain legal constraints and to balance the market with limited capital while ensuring a smooth user experience, the protocol’s multi-signature wallet—under administrative control—reserves the right to cancel or expedite the redemption process. The same applies to unstaking operations.
{% endhint %}
