> For the complete documentation index, see [llms.txt](https://docs.nectarliquid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nectarliquid.com/trading/liquidations-and-adl.md).

# Liquidations and ADL

#### Liquidation Mechanics

A position is liquidated when its remaining collateral falls below the required minimum collateral threshold of the market. This critical state is evaluated after accounting for all unrealized losses, accrued platform fees, and capped negative price impact factors. Depending on the specific configuration of the market, this percentage threshold ranges from 0.25% to 1% of the total position size.

The protocol smart contracts execute these validation checks using the following automated pricing rules:

* For long positions, the core engine calculates profit and loss using the minimum index price (`minPrice`).
* For short positions, the core engine calculates profit and loss using the maximum index price (`maxPrice`).
* The absolute valuation of your deposited margin always uses the minimum collateral token price (`collateralTokenPrice.min`) regardless of your directional bias.

> Warning Notice
>
> Your structural liquidation price is not a static boundary. Borrow fees and adaptive funding fees accumulate continuously per second, automatically consuming your available margin over time and pulling your liquidation price closer to the active market spot price. You can manually deposit additional margin using the Edit button inside the active positions list to improve your buffer and push your liquidation price to a safer distance.

When a position triggers a liquidation event, the core contract engine closes out the entire size against the pool. Any remaining collateral asset leftover after completely deducting all accrued trader losses, platform closing fees, and liquidation penalties is automatically pushed back to your connected Web3 wallet address.

For localized currency pairs such as the `CNGN/USD` market, these liquidation thresholds tighten automatically during scheduled off hours configurations to insulate the protocol backing pools from reduced fiat liquidity windows. Leveraged positions carrying aggressive multipliers face an increased risk of liquidation at the exact moment off hours transition parameters activate.

#### Minimum Collateral Floor

In addition to the standard percentage based threshold configurations, the protocol smart contracts enforce a strict, absolute minimum collateral floor asset value designated as `MIN_COLLATERAL_USD`. The smart contract risk engine determines liquidatability by selecting whichever parameter values are greater between the market percentage of total position size or this absolute floor.

For standard institutional or high volume positions, the percentage based calculation easily exceeds the absolute floor value, rendering the floor completely neutral. For micro positions or small testnet trades, the floor dominates the safety equation. This action isolates the majority of your deposited margin as an immutable required reserve, leaving an exceptionally narrow usable buffer before a liquidation sequence triggers.

The table below demonstrates how a standardized $1.00 minimum collateral floor parameter causes two distinct 1x short positions to behave differently:

| **Position Size** | **Collateral Margin (1x)** | **Factor Threshold (0.5%)** | **Effective Contract Threshold** | **Net Usable Buffer** | **Liquidation Distance From Entry** |
| ----------------- | -------------------------- | --------------------------- | -------------------------------- | --------------------- | ----------------------------------- |
| $1,000.00         | $1,000.00                  | $5.00                       | $5.00 (Factor Dominant)          | $995.00               | \~100% Market Movement              |
| $1.15             | $1.15                      | \~$0.006                    | $1.00 (Floor Dominant)           | $0.15                 | \~12% Market Movement               |

Because the $1.15 position is restricted by the absolute floor parameter, it must maintain at least $1.00 of raw collateral internally. This design leaves the trader with a minor $0.15 buffer to absorb oracle price wicks and accrued borrow fees, explaining why small positions can experience liquidation paths much closer to entry than their baseline leverage would suggest.

#### Liquidation Fees by Environment

The protocol liquidation fee is calculated as a direct percentage of the total notional position size and is completely decoupled from your underlying margin balance. These fee tiers are applied across both mainnet and testnet deployments and are broken down by specific market classifications:

| **Market Classification Type**                          | **Position Liquidation Fee Rate** |
| ------------------------------------------------------- | --------------------------------- |
| Standard Crypto Markets (e.g., `WBTC/USD`)              | 0.20% of total position size      |
| Single Token Specialized Pools (e.g., `WETH/WETH`)      | 0.30% of total position size      |
| Synthetic Asset Tiers (e.g., `CNGN/USD`)                | 0.30% of total position size      |
| High Volatility Inception Markets (Newly Listed Assets) | 0.45% of total position size      |

This fee rate does not influence the initial liquidatability validation loop of the smart contracts. Instead, the liquidation fee is extracted exclusively at the moment the position is formally processed and closed out on chain by a keeper.

#### Price Impact Constraints in Liquidations

Unfavorable negative price impact is factored directly into the core liquidation validation equations. This value is governed and capped by the `MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS` parameter to ensure market fairness.

Conversely, favorable positive price impact metrics are completely zeroed out during the liquidation check. The frontend interface utilizes this exact same capped negative math loop to display your real time liquidation boundaries accurately inside the trading terminal.

#### Stop Loss Instructions and Liquidations

When an active trade breaches its risk parameters and becomes liquidatable, the protocol matching engine directs automated network keepers to attempt the execution of any attached Stop Loss instructions before initiating a hard liquidation sequence. If the Stop Loss order successfully processes and closes out the position size, the liquidation sequence is bypassed. If a single trade carries multiple staggered Stop Loss instructions, the keepers sort and process them sequentially in descending order based on size, prioritizing the largest tranche.

This pre liquidation Stop Loss execution loop operates on a strict best effort framework and does not provide an absolute guarantee that your conditional order will clear before a liquidation triggers. The Stop Loss only insulates you from a liquidation penalty if it completes a successful transaction on chain. If high velocity market volatility causes the order execution to fail or if the underlying margin balance is already too deeply undercollateralized to cover a standard market exit, the keeper will bypass the order and process a standard liquidation.

A pre liquidation Stop Loss transaction can fail due to the following network events:

* The live oracle price stream fails to satisfy the exact trigger conditions required by the position side.
* Valid signed oracle price packets are temporarily unavailable for the specific market assets.
* The execution request fails core on chain validations, such as encountering insufficient pool liquidity or violating maximum open interest constraints.
* The execution transaction reverts on the Asset Chain network ledger.

If the collective Stop Loss instructions fail to resolve the position size, the keeper proceeds to execute a standard liquidation transaction. Once finalized, any remaining conditional parameters anchored to that wiped position that utilize the auto cancel flag are cleared automatically from the contract registry.

> Warning Notice
>
> The protocol risk engine only attempts to prioritize active Stop Loss instructions (`StopLossDecrease`) prior to a liquidation. Take Profit orders (`LimitDecrease`), Limit Increase orders, and external conditional variants are completely ignored by the liquidation validator. Setting an active Stop Loss above your estimated liquidation boundary reduces your overall account risk profile but cannot completely eliminate liquidation occurrences. High velocity price gaps can easily breach both your Stop Loss trigger and your liquidation threshold within a single oracle stream update window.

Unlike resting limit configurations resting on centralized exchanges, Nectar Liquid orders do not fill passively as market prices pass through a price level. They require a dedicated keeper to execute them against a valid oracle report. While the liquidation engine checks for an attached Stop Loss before emitting a liquidation request, a separate order execution keeper loop runs completely in parallel. There is no synchronous on chain guarantee that your Stop Loss transaction will resolve before a concurrent liquidation check interacts with your position.

#### Auto Deleveraging (ADL)

Auto Deleveraging (ADL) functions as an automated backstop mechanism designed to safeguard the absolute solvency of the Nectarliquid pools. The protocol monitors the precise ratio of collective pending trader PnL relative to the total capital value of the backing pool. If this ratio breaches the market configured `MAX_PNL_FACTOR_FOR_ADL` threshold safety ceiling, the protocol automatically activates an ADL sequence. This mechanism selects the most profitable opposing positions across the market and partially or fully closes them out to bring the systemic PnL ratio back within safe operational parameters.

ADL events are primarily concentrated within synthetic asset tiers where the underlying index asset differs from the long collateral asset token stored within the backing pool. In these specific environments, such as a localized `CNGN/USD` perpetual market backed by a major `WETH` liquidity pool, the index asset can experience extreme upward price movements that completely outpace the valuation velocity of the collateral asset. This divergence causes aggregate trader profits to scale faster than the internal capacity of the pool.

> Warning Notice
>
> If the protocol risk engine activates an ADL sequence and selects your active position based on its high profitability metrics, your trade will be partially or completely closed out automatically on chain without requiring manual wallet confirmations or user intervention.

#### Trading Risks

Nectar Liquid mitigates platform vulnerabilities through extensive smart contract testing, rigid optimization on the Asset Chain Testnet, and code structural alignment with heavily reviewed decentralized architectures. However, executing trades on any decentralized smart contract network involves a variety of systemic risks.

> Warning Notice
>
> Exercise extreme caution and manage your capital risk conservatively when interacting with any decentralized financial application. The risk summary outlined below represents a non-exhaustive compilation of potential hazards:

* Smart Contract Vulnerabilities: Hidden bugs or undetected integration flaws within the protocol smart contracts could result in unexpected transaction executions or a complete loss of deposited assets.
* Liquidation Events: Leveraged positions face immediate closure and loss of underlying margin if asset values shift past required percentage thresholds or absolute minimum floor parameters.
* Auto Deleveraging (ADL): Highly profitable trading strategies executing within synthetic market pairs face unexpected automated size reductions if aggregate system profits threaten pool solvency boundaries.
* Stablecoin Peg Deviations: If a pool stablecoin asset experiences a market depeg event from its target fiat value, the oracle prices utilized by the contracts to calculate position values and settle account balances will reflect the raw data stream reports and will not be artificially anchored to the baseline peg value.

Additionally, your underlying position collateral and realized profit distributions may be heavily tied to bridged or pegged tokens across the Asset Chain network ecosystem that carry independent, external smart contract and infrastructure risks.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nectarliquid.com/trading/liquidations-and-adl.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
