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

# Peg Mechanics

This page explains how the ZAI stablecoin maintains it's peg

The pegging mechanism of ZAI ($ZAI) ensures that it maintains a 1:1 ratio with the US Dollar. This is achieved through a combination of collateralization, algorithmic adjustments, and market incentives.

<figure><img src="https://3215725803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoDBCiBkZgiUh0HLuvU5L%2Fuploads%2FR1KyEWRgN01AaxmJV03Y%2Fimage.png?alt=media&amp;token=91cc434e-b2d1-490e-aca1-c81ffd705a92" alt=""><figcaption></figcaption></figure>

There are two core modules that allow for ZAI to achieve stability and scale.

* [The Peg Stability Module](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm.md): Focused on stability, the ZAI PSM allows users to mint/redeem ZAI for stablecoins at a 1:1 ratio. This ensures stability for ZAI at the 1$ price mark.
* [The Direct Deposit Module](/stablecoin-zai/peg-mechanics/direct-deposit-module-ddm.md): Focused on growth, the ZAI DD module allows the protocol to mint large amounts of ZAI into lending protocols that allow borrowers to take over-collateralized loans in ZAI, generating interest for users.

***

## Peg Mechanics

At no point in time does ZAI become under-collateralized. It is either backed by stablecoins via the Peg Stability Module (PSM) or it is backed by over-collateralized loans via the Direct Deposit Module (DDM).

* **When ZAI is trading above $1,** arbitrageurs can simply mint more ZAI by depositing USDC (or other stablecoins) onto the [PSM](/stablecoin-zai/peg-mechanics/peg-stablility-module-psm.md) module and sell the newly minted ZAI into the open market bringing the peg back to $1. At the same time the protocol can also issue more debt (priced at $1) to encourage users to borrow ZAI and sell it in the open market.
* **When ZAI is trading below $1**, arbitrageurs can simply buy back the ZAI from the open market and redeem USDC (or other stablecoins) from the PSM, bringing the peg back to $1. If the PSM does not have enough liquidity to maintain the peg, then the protocol can recall the loans issued by the [Direct Deposit Module](/stablecoin-zai/peg-mechanics/direct-deposit-module-ddm.md), forcing borrowers to repay their loans in ZAI.

Because in both mechanisms, ZAI is either minted using the PSM or lent using the DDM, and the positions are always over-collateralized, ZAI will be able to maintain its peg at $1.

Please read the [risks section](/security/risks.md) to understand more deeply about situations when this is not the case.
