# Intelligent Peg Adapters

<figure><img src="https://3616471638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8tjfwh5kqfR9hmQCbfP7%2Fuploads%2FLm7jB613q1Br9cI4HAbL%2FArchitecture%208.png?alt=media&#x26;token=b7ed87e7-5dff-4149-87f3-5e0cff030c9b" alt=""><figcaption><p>Intelligent Peg Adapters and related components digram</p></figcaption></figure>

**Intelligent Peg Adapters (IPAs)** are specialized smart contracts designed to maintain the stability of the [gigaAsset](https://docs.enjoyoors.xyz/system-architecture/gigaassets) peg. Each **IPA** serves as a dedicated adapter to seamlessly communicate with the corresponding [AMM pool](https://docs.enjoyoors.xyz/system-architecture/public-blockchain-infrastructure/amm-pools) approved by Governance.

The [gigaAsset Manager](https://docs.enjoyoors.xyz/system-architecture/public-blockchain-infrastructure/gigaasset-manager) pre-allocates a supply of [gigaAssets](https://docs.enjoyoors.xyz/system-architecture/gigaassets) by minting them directly to the **IPA.** When quote token liquidity is provided by liquidity providers, the **IPA** combines it with its available [gigaAssets ](https://docs.enjoyoors.xyz/system-architecture/gigaassets)to deposit both tokens into the [AMM pool ](https://docs.enjoyoors.xyz/system-architecture/public-blockchain-infrastructure/amm-pools)at a one-to-one ratio. This ensures the pool remains balanced and supports efficient trading between the tokens.

The **IPA** employs a combined mechanism to maintain peg stability during price deviations from the target range:

* If sufficient liquidity is available in the contract, it can perform token swaps to adjust the peg. This mechanism directly impacts the token reserve amounts in the pool, bringing the peg back to the target range.
* When deposit/withdraw functionality is not paused, the **IPA** can facilitate the provision or withdrawal of [gigaAssets](https://docs.enjoyoors.xyz/system-architecture/gigaassets). This mechanism increases or decreases the reserve amount of [gigaAssets](https://docs.enjoyoors.xyz/system-architecture/gigaassets), helping to stabilize the peg.

In addition to the **IPA's** stabilization mechanisms, authorized liquidity providers and [AMMs](https://docs.enjoyoors.xyz/system-architecture/public-blockchain-infrastructure/amm-pools) actively monitor the peg. These entities use the **IPA** to dynamically rebalance the peg. Their involvement provides an additional layer of stability, ensuring the peg is maintained even during volatile market conditions.

The first **IPA** that the Enjoyoors protocol will support is the Curve Pool **IPA**.
