> For the complete documentation index, see [llms.txt](https://altodex.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://altodex.gitbook.io/docs/core-mechanics/2.2-risk-and-liquidations.md).

# 2.2 Risk & Liquidations

<figure><img src="/files/tUjrcbeZ76b1oo2FUciQ" alt=""><figcaption></figcaption></figure>

Alto's design philosophy is based on risk management. Perpetual exchanges are inherently risky, especially when it comes to leverage, volatility, and liquidation cascades. Many of the platforms in use today treat risk controls as "black boxes," meaning that users are unaware of how margin and liquidations are handled.

Alto solves this by developing a fully transparent and auditable risk framework that uses visible on-chain and smart contracts to enforce every adjustment, liquidation, and margin check. This ensures that LPs can provide liquidity with confidence and without fear of unforeseen consequences, and that traders are always aware of the rules of engagement.

***

#### Margin Ratio Monitoring

* **Continuous Monitoring:** Alto continuously monitors each trader's margin ratio, which is the difference between position size and collateral value.
* **Formula Transparency:** A published and verifiable method for determining the margin ratio is included in the contract code. These calculations can be independently replicated by traders off-chain.
* **Health Indicators**:
  * **Safe Zone:** Margin ratio above maintenance level (e.g., >125%).
  * **Warning Zone:** A ratio (e.g., 110–125%) that is approaching the liquidation level. The dashboard's indicators turn yellow.
  * **Critical Zone:** A ratio that is at or below the threshold, like 100%. Liquidation may begin when the dashboard turns red.

By making margin health predictable and transparent, Alto avoids the "surprise liquidations" that plague centralized exchanges.

***

#### Liquidation Process

A liquidation occurs when the margin ratio of a position falls below the maintenance threshold. Unlike opaque centralized systems, Alto's liquidations follow a transparent, sequential process:

1. **Trigger Event:** The position is marked as undercollateralized by the smart contract.
2. **Dutch Auction Liquidation**:
   * The liquidated position is put up for bid by the community.
   * Beginning at a discount, the auction's price steadily declines until buyers step in.
   * This guarantees that liquidations are fair and competitive, free from insiders or bots.
3. **Settlement**:
   * The trader's debt is paid off with the auction proceeds.
   * After debt repayment, any excess collateral is returned to the trader.
   * Both LPs and the protocol treasury receive a minor liquidation penalty.

Fair, open, and non-exploitative liquidations are guaranteed by this design.

***

#### The Benefit of Dutch Auctions

First-served, first-come Traditional systems frequently experience liquidations, in which specialized bots with fast gas bidding seize every chance. Injustice results from the exclusion of regular users.

Alto's Dutch Auction model fixes this by:

* Granting each user the same rights to participate in liquidations.
* Distributing the neighborhood's benefits from liquidation more fairly.
* Reducing front-running and gas wars by making the process predictable.
* A healthier incentive loop is produced since liquidation profits are distributed rather than concentrated.

***

#### Controls for Adaptive Leverage

One of the primary risks of perpetual trading is liquidation cascades, which are chain reactions where one liquidation triggers others, leading to market crashes. To mitigate this, Alto employs Adaptive Leverage:

* **Volatility-Based Scaling**: In volatile markets, the maximum leverage is automatically reduced (for instance, from 25x to 10x).  This prevents an accumulation of position sizes that are too large.
* **OI Monitoring:** If open interest becomes too unbalanced (for instance, 80% of traders are long ETH), leverage caps are dynamically adjusted to avoid systemic skew.
* **Modifications in Light of Traders:**  For inexperienced or high-risk traders, lower leverage is prohibited until they have a strong track record of taking risks.

This system protects Alto from market shocks.

***

#### On-Chain Proof of Fairness

Each liquidation event is meticulously documented and tracked on-chain:

* Value of the collateral at liquidation.
* Leverage and position size.
* The starting price, closing price, and winning bidder of the auction.
* The trader receives their excess collateral back.

Since everything is auditable, Alto avoids accusations of manipulation. Traders and auditors can independently confirm each event.

***

#### LP Protection

In addition to traders, Alto's liquidation system also protects liquidity providers (LPs):

* **Reduced Bad Debt:** Protocol losses are reduced when undercollateralized positions are effectively resolved through Dutch auctions.
* **Fee Income from Penalties:** As payment, LPs get a share of the money made from liquidation penalties.
* **Systemic Stability:** Vault solvency is protected from catastrophic drawdowns by adaptive leverage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://altodex.gitbook.io/docs/core-mechanics/2.2-risk-and-liquidations.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.
