# APS (Staking)

### The Cornerstone of zunStables Stability

The Algorithmic Peg Stabilizer (APS) serves as the core mechanism for minting and redeeming zunStables, ensuring their peg to USD or ETH. APS allows users to stake zunStables, offering a sophisticated interest model and enhanced profitability through additional ZUN rewards. These staked assets are utilized to manage controlled inflation and deflation.

APS takes this a step further by offering an intricate interest structure, resulting in higher profitability, particularly with the additional ZUN rewards. This innovative approach diversifies fund distribution while contributing to the controlled management of inflation and deflation. By leveraging these staked assets, APS strengthens the stability and longevity of the entire ecosystem.

The concept of APS draws inspiration from AMO of FRAX and bears resemblance to similar mechanisms such as Elixir from Alchemix. Just like the entire protocol, APS operates under the governance of DAO. In the event that the price of zunStables falls below or rises above the peg, any participant can initiate a DAO vote to determine whether deflationary or inflationary measures should be undertaken.

<figure><img src="https://2215456193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3UwKdZHxlONT2oRfzlBn%2Fuploads%2FWXyd49pYAzfPXDmIsY2z%2FzunUSD_APS.webp?alt=media&#x26;token=21a41341-e652-4b66-9ca2-62586f909a4f" alt=""><figcaption><p>ZunUSD APS</p></figcaption></figure>

Let's explain the functionality using the example of the zunUSD/FRAXBP pool on Curve. If there is an imbalance in the pool towards an increase in the FRAXBP proportion, APS withdraws USDC from the pool, deposits them into Zunami, mints zunUSD, and then deposits them back into the pool. In case of an imbalance towards a large amount of zunUSD in the pool, APS either withdraws them to a vault strategy or performs zunUSD redemption, followed by withdrawing USDC and depositing them into the zunUSD/FRAXBP pool.

The benefits for the zunStables stakers (APS users) include:

* Inexpensive deposit/withdrawal of funds through the vault strategy.
* Rewards are automatically sold and reinvested. You recieve all power of compound interest
* Funds are diversified and rebalanced across various zunStables pools.
* ZUN rewards


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zunamilab.gitbook.io/zunami-docs/protocol-overview/aps-staking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
