# mStable Documentation

mStable delivers simple, tokenized yield products built on leading DeFi primitives. The flagship product is **Stacked Yield**: a single vault, actively managed by mStable, that deploys capital across supported yield markets and uses leverage when profitable. Holders hold a single ERC20 token (currently **mPT-sUSDe**) that appreciates as yield is realized.

For current positions, allocations, leverage, and APY, see the [vault page on mstable.com](https://www.mstable.com/vault/0xfec2adfa296fe189f53089fd5ccd8c28dd559cf2).

## Contents

* [Introduction](/docs/introduction): What mStable is, mission, and quick start
* [How mStable Works](/docs/how-mstable-works): The Stacked Yield product and strategy
* [Integrations](/docs/integrations): DeFi systems mStable currently interacts with
* [Architecture & Smart Contracts](/docs/architecture-and-smart-contracts): Vault structure, automation, contract addresses
* [Security & Risks](/docs/security-and-risks): Audits, safeguards, and risk considerations


# docs


# Table of contents

* [Introduction](/docs/introduction)
* [How mStable Works](/docs/how-mstable-works)
* [Integrations](/docs/integrations)
* [Architecture & Smart Contracts](/docs/architecture-and-smart-contracts)
* [Security & Risks](/docs/security-and-risks)


# 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)


# How mStable Works

The building blocks behind the **Stacked Yield** product and how they work together.

### The product

**Stacked Yield** is a single vault represented by a single ERC20 token (**mPT-sUSDe**). Depositors hold the token; the vault does the work.

* **One vault, one token.** All depositors share the same strategy.
* **Actively managed by mStable.** Positions shift across supported yield markets as opportunities change.
* **Non-custodial.** Funds are held in audited smart contracts, not by an operator.
* **Automated.** Bots handle rebalancing and risk-limit enforcement in real time. Position rollovers are managed by mStable as part of active vault management.

### Strategy

Stacked Yield deploys capital across supported yield markets and is actively managed by mStable to compound returns over time. The vault uses leverage when profitable, within defined risk limits. The mix of positions shifts as opportunities change, so the docs describe what the vault is built to do rather than what it is holding at any given moment.

For current positions, allocations, leverage, and APY, see the [vault page on mstable.com](https://www.mstable.com/vault/0xfec2adfa296fe189f53089fd5ccd8c28dd559cf2).

### Building blocks

The vault is built to compose positions from a range of DeFi primitives. The kinds of building blocks mStable can use:

* **Yield-bearing stablecoins:** base-layer yield assets, for example Ethena's sUSDe.
* **Fixed-yield wrappers:** Pendle Principal Tokens and similar instruments that lock in a return until expiry.
* **Onchain lending markets:** Aave and equivalents, used for collateralized borrowing and looped exposure when the spread is profitable.
* **Other audited yield sources:** added as they meet the vault's risk and liquidity bar.

Which of these the vault uses at any time depends on where the best risk-adjusted yield is. See [Integrations](/docs/integrations) for protocol-by-protocol detail on the systems mStable currently interacts with.

### Token output

The result is an ERC20 token (**mPT-sUSDe**) that:

* Represents a position in the Stacked Yield strategy.
* Appreciates in value as yield is realized.
* Requires no manual management from the holder.

### Key features

* **Fixed yield component** while PT positions are open.
* **Amplified exposure** via leverage when profitable.
* **Managed rollovers:** expired positions are reinvested as part of vault management.
* **ERC20 simplicity:** tradable, composable, portable across DeFi.


# Integrations

The external DeFi systems mStable currently interacts with for the **Stacked Yield** vault, and how they fit into the strategy.

The protocols listed here reflect the current implementation. The vault is built to rotate between supported yield markets as opportunities change, so this list may evolve over time. The infrastructure relationship with Chamber is constant.

### **Ethena (sUSDe)**

**What it is**\
Ethena issues USDe, a synthetic dollar backed by a delta-hedged perp strategy. When staked, it becomes sUSDe, a yield-bearing stablecoin that distributes funding and staking rewards.

**Why mStable uses it**

* Provides a credible, yield-bearing stablecoin as a base-layer building block.
* Adoption and liquidity of sUSDe are strong.

**Risks**

* **Funding dependency:** relies on perp market funding rates.
* **Depeg risk:** if USDe diverges from $1.
* **Protocol risk:** Ethena contracts and hedging mechanics.

**Learn more:** [Ethena Docs](https://docs.ethena.fi/)

### **Pendle Finance (PTs)**

**What it is**\
Pendle splits yield-bearing assets into two parts:

* **PT (Principal Token):** redeems 1:1 at expiry.
* **YT (Yield Token):** claims the yield until expiry.

mStable uses PTs to lock in a fixed yield until maturity.

**Why mStable uses it**

* Turns floating yield into fixed, predictable returns.
* At PT expiry, bots roll into the next series to keep exposure continuous.

**Risks**

* PT liquidity can thin out near expiry.
* Slippage during rollover.
* Reliance on Pendle contracts.

**Learn more:** [Pendle Docs](https://docs.pendle.finance/)

### **Aave**

**What it is**\
Aave is a lending market where users can deposit collateral and borrow against it.

**Why mStable uses it**

* Collateral is deposited into Aave, bots borrow against it, convert back into the collateral asset, and redeposit.
* This looping increases exposure within target leverage limits when profitable.

**Risks**

* **Liquidation:** if health factor falls.
* **Borrow caps:** access is limited when markets fill.
* **Oracle risk:** Aave price feeds.

**Learn more:** [Aave Docs](https://aave.com/docs)

#### **Chamber (infrastructure)**

**What it is**\
Chamber is the asset-management infrastructure mStable is built on. It provides the smart contracts, vault logic, and automation framework that the Stacked Yield product runs on.

**Why mStable uses it**

* Battle-tested contracts shared with other Chamber-built products such as Toros.
* Modular design that lets the vault plug into supported yield markets.
* Non-custodial, permissioned automation layer for bots.

**Risks**

* Smart contract dependency.

**Learn more:** [Chamber Docs](https://docs.dhedge.org/)


# Introduction

Overview of mStable, its mission, and the **Stacked Yield** product.

#### What is mStable?

mStable is a protocol that delivers simple, tokenized yield products built on leading DeFi primitives. The goal is to make advanced yield strategies accessible through single ERC20 tokens that compound value automatically.

#### Mission

* Abstract DeFi complexity into easy-to-hold tokens.
* Provide stablecoin holders with enhanced yield.
* Build on proven, liquid systems and rotate between them as opportunities change.
* Enable scalability for everyday DeFi users, both large and small.

### Stacked Yield

**Stacked Yield** is mStable's flagship product. It is a single vault, actively managed by mStable, that deploys capital across supported yield markets to earn yield and uses leverage when profitable. Positions shift as opportunities change, so the docs describe what the vault is built to do rather than what it is holding at any given moment.

The current Stacked Yield token is **mPT-sUSDe**. For current positions, allocations, leverage, and APY, see the [vault page on mstable.com](https://www.mstable.com/vault/0xfec2adfa296fe189f53089fd5ccd8c28dd559cf2).

### Quick Start

#### Using Stacked Yield in 3 steps

1. **Acquire the token.** Buy **mPT-sUSDe** via the mStable app.
2. **Hold.** The token represents a position in the Stacked Yield strategy. No manual management required.
3. **Compound automatically.** The vault deploys capital into supported yield markets and rolls positions as needed. The token's value increases as yields are realized.


# Security & Risks

Audits, safeguards, and risk considerations for the **Stacked Yield** vault.

mStable is built on a combination of audited infrastructure and leading DeFi protocols. Audits and safeguards reduce risk, but using DeFi products always carries inherent risks that users should understand. Stacked Yield is built to rotate between supported yield markets, so the specific risks below reflect the current strategy implementation and may shift as the strategy evolves.

### Product audit

* [Sherlock Audit, mStable Pendled sUSDe (via dHEDGE)](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgKiKW1UaPZfO4BHc_y%2Fuploads%2F4JF9lyLhp5Gf2xREAMMc%2FSherlock%20Audit%20%E2%80%93%20mStable%20Pendled%20sUSDe%20\(via%20dHEDGE\).pdf?alt=media\&token=9510beab-29a2-4c1d-bef4-9911cdd1ff90)
  * Completed by Sherlock in September 2025.
  * Scope: integration of Ethena (sUSDe), Pendle PTs, Aave looping, and Chamber infrastructure.
  * Covers the strategy powering mPT-sUSDe.

### Infrastructure audits

Stacked Yield runs on Chamber, which has undergone multiple audits. The same contracts power other products such as Toros Finance and have secured large amounts of TVL while processing billions in trading volume across chains. Chamber was previously known as dHEDGE, so audits and references below using the dHEDGE name cover the same codebase.

#### Most relevant audits

* [Aave V3 Integration](https://github.com/santipu03/santipu03/blob/main/private-audits/dHEDGE_Aave.md): audited by Santipu (Jan 2025)
* [EasySwapper V2](https://github.com/santipu03/santipu03/blob/main/private-audits/dHEDGE_SAW.md): audited by Santipu (Oct 2024)
* [Core Contracts](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgKiKW1UaPZfO4BHc_y%2Fuploads%2Fns3MnPmX02OJCrva3UJ1%2FdHEDGE%20Sherlock%20Audit%20Report%202024.pdf?alt=media\&token=a49a57c9-477b-4490-81c8-51f884466fe7): audited by Sherlock (June 2024)
* [Core Contracts](https://skynet.certik.com/projects/dhedge?auditId=dHEDGE%20V2#code-security): audited by CertiK (Jul 2021)

For the full audit history, see the [dHEDGE Audits Timeline](https://docs.dhedge.org/security/audits-timeline).

### Partner protocol audits

As Stacked Yield integrates with external protocols, their security is equally important:

* [Pendle Audits](https://docs.pendle.finance/Developers/Security)
* [Aave Audits](https://docs.aave.com/developers/the-core-protocol/security-and-audits)
* [Ethena Audits](https://docs.ethena.fi/security/audits)

### Operational safeguards

* **Pause functions:** emergency ability to halt deposits or rollovers.
* **Automation via bots:** bots execute predefined strategies for rebalancing and securing Aave capacity. Bots are non-custodial and cannot access user funds.

### Risks

These risks reflect the current strategy implementation. They may change as Stacked Yield rotates between supported yield markets.

* **Stablecoin risk:** the current strategy is built on Ethena's sUSDe. If sUSDe (or its underlying USDe) diverges significantly from $1, it directly impacts performance and collateral safety.
* **sUSDe yield risk:** the yield from sUSDe depends on perp funding markets. If yields compress or funding turns negative, overall returns may fall significantly.
* **Smart contract risk:** potential vulnerabilities in mStable, Chamber, or integrated protocols.
* **Borrowing risk:** looping increases exposure, amplifying both gains and losses.
* **Liquidity risk:**
  * Aave caps may limit deposits or rollover capacity.
  * Pendle PT liquidity can thin near expiry, causing slippage during rollovers.
* **Oracle risk:** dependence on Aave oracles for pricing and collateral health calculations.


