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

# Architecture & Smart Contracts

How the **Stacked Yield** vault is structured onchain and the role of automation.

#### Smart contract base

* Built on Chamber, the asset-management infrastructure powering mStable. Chamber provides non-custodial vault logic, ERC20 token issuance, and the guardrails that integrations plug into.
* Chamber is a battle-tested set of contracts also used by Toros Finance and other Chamber vaults. Chamber was previously known as dHEDGE.
* Stacked Yield is a single Chamber vault, with **mPT-sUSDe** as its ERC20 share token.

#### Automation and bots

* **Rebalance bots:** adjust positions to maintain safe health factors.
* **Capacity bots:** secure Aave borrow slots when caps reset, ensuring the vault retains access.
* Position rollovers (for example into the next Pendle PT series) are handled by mStable as part of active vault management, not by a dedicated bot.
* All actions are non-custodial. Bots execute predefined strategies and do not hold user funds.

#### Permissions and safety

* **Pause functions:** emergency shutdown tools to halt deposits or rollovers if needed.
* **Risk limits:** leverage and health-factor thresholds enforced by the rebalance bots.

#### Contract addresses (Ethereum Mainnet)

[*mPT-sUSDe*](https://etherscan.io/token/0xfec2adfa296fe189f53089fd5ccd8c28dd559cf2)
