During sharp market moves, prices on a DEX can briefly disconnect from an asset’s broader market price. A liquidation executed into that dislocation would sell more of your collateral than a fair price would require. The Market Anomaly Guard (MAG) is the safeguard Nolus built to prevent exactly that.
The problem MAG solves
In turbulent markets, arbitrage takes time to pull DEX quotes back in line with global prices. If a margin position crosses its liquidation threshold at that moment, a naive protocol would swap collateral immediately at the temporarily broken price. The user loses more than a fair liquidation would take, and the protocol converts a momentary anomaly into permanent damage.
How MAG works
MAG is built into the liquidation logic itself and adds three checks:
Smoothed trigger price. Liquidations trigger on a smoothed moving-average oracle price rather than a single spot tick, so a momentary wick doesn’t start a liquidation by itself.
Pre-swap simulation. Before any collateral is sold, the protocol simulates the swap. The expected proceeds must clear a fairness threshold relative to the reference price; if they don’t, the liquidation is paused instead of executed.
Re-evaluation. A paused liquidation is retried when conditions improve. If the price recovers above the liquidation threshold in the meantime, the liquidation is canceled entirely.
How this differs from typical DeFi liquidations
Most protocols trigger on the spot price and execute immediately, with no validation of the swap outcome and no way back once triggered. On Nolus, the trigger uses a smoothed price, the execution is simulation-checked, and a recovering position escapes liquidation altogether.
What it means for you
You keep the same responsibility to manage your position’s health, but you are protected from losing collateral to flash crashes and thin-liquidity moments. Together with partial-by-design liquidations, MAG makes volatility survivable rather than fatal.
For the full picture of when liquidations happen and how to avoid them, see Liquidations Explained.
