# Halting mechanism

To protect liquidity providers, if any of the stablecoins in WingRiders Stableswap or ADA/stablecoin pools fail (as a project, as tech, or have currency problems), resulting in de-pegging of the coin, all swapping within these pools on WingRiders is automatically halted to safeguard the portion of the other asset locked in that pool for its owners.

It is set that in the case of a 15% de-pegging of a stablecoin (e.g. for iUSD if the price is not between 0.85 and 1.15 USD), the halting mechanism automatically occurs on the transaction execution level (batcher). The withdrawal of Liquidity will always remain available.

<figure><img src="/files/JSq5L77USxzTLzwUJ8T1" alt=""><figcaption><p>Warning message about price de-peg detected</p></figcaption></figure>

### How the halting mechanism works

Our batcher always tries to apply transactions to the pools from oldest to newest until they expire. If it detects de-pegged stablecoin in Stableswap or ADA/stablecoin pools, it will skip swap and add liquidity transactions until the price recovers or the transaction expires. Prices of stablecoins are fetched using external API providers every 15 minutes. Users will be notified about this in the UI by having warning notifications next to their pending transactions and in the modals in the swap and adding liquidity. They can choose to reclaim their transactions.&#x20;

<figure><img src="/files/K4jeLrSLb9pMpNq7hUmT" alt=""><figcaption><p>Warning message about batching halted</p></figcaption></figure>

The de-pegging mechanism differs between Stableswap pools and ADA/stablecoin pools. Since the Stableswap pool model works great if the two tokens are roughly the same value, we halt trading and add liquidity if we detect a 15% difference in their price from external API. This means if for some reason both tokens de-pegg from their original value by the same margin (e.g. DJED would be 0.81 USD and iUSD would be 0.83 USD), we still process transactions as usual. However, the same de-pegg would halt transactions on the ADA pools of respective tokens (e.g. ADA/DJED, ADA/iUSD).


---

# 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://docs.wingriders.com/actions/swapping/halting-mechanism.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.
