Nolus Docs

Liquidations and risk

How Nolus protects positions and lenders with LTV thresholds, liquidation warnings, partial and full liquidation, slippage protection and the reserve.

Every Nolus position is a loan secured by the asset it holds, and the protocol keeps that loan covered by watching one number, the position's loan-to-value (LTV), and by selling part or all of the position when that number gets too high. The sections below describe the thresholds, how the protocol watches them and what happens when a position crosses one of them.

A position's LTV is what it owes, meaning its principal plus the interest due, divided by the value of the position asset in the pool currency at the oracle price. On a long position the LTV rises when the asset's price falls, while on a short position it rises when the price of the borrowed token rises.

LTV thresholds

As the LTV of a position rises, it passes a series of thresholds, and each of them triggers a different response. The opening threshold caps the LTV at which a position can open, and three warning thresholds alert the user as the LTV climbs. At the liquidation threshold the protocol starts selling, and a partial liquidation then brings the position back down to the healthy level.

Each protocol keeps these thresholds in its Leaser configuration, under lease_config.position_spec.liability and in permille, and the position parameters on the Spot Margin page show what they mean for the size of a position. The values in the table are examples, and the Leaser's config query below returns the live ones:

FieldMeaningFor example
initialMaximum LTV when a position opens.800 (80%)
healthyThe LTV a partial liquidation brings the position back to.830 (83%)
first_liq_warnFirst warning.850 (85%)
second_liq_warnSecond warning.865 (86.5%)
third_liq_warnThird warning.880 (88%)
maxLiquidation threshold.900 (90%)
recalc_timePeriodic re-check interval, in nanoseconds.432000000000000 (5 days)

The same lease_config also holds the interest period, the slippage limits and the minimum sizes that the later sections refer to:

FieldMeaningFor example
due_periodHow often interest is due, in nanoseconds.2592000000000000 (30 days)
max_slippagesMaximum slippage per flow, in permille.open, repay, close 70 (7%); liquidation 100 (10%)
position_spec.min_assetMinimum position size.15 USDC
position_spec.min_transactionMinimum transaction size.0.5 USDC

To check the live values, query the configuration of the protocol's Leaser:

nolusd q wasm contract-state smart <leaser> '{"config":{}}'

Replace <leaser> with the address of the protocol's Leaser contract, which you can look up as described in Discover contract addresses.

How positions are watched

A position never waits for someone to check it, because after every re-check it registers two alarms that call it back. The first is a price alarm with the oracle, set at the prices at which the position would enter its next LTV zone or reach its take profit or stop loss level. The second is a time alarm for the periodic re-check that recalc_time sets.

When either alarm fires, the alarms dispatcher delivers it and the position recomputes its LTV at the current oracle price. Because the oracle price is an exponential moving average over several minutes of feeds, a momentary price spike does not trigger a liquidation on its own, as the Oracle page explains.

Warnings

When a re-check finds a position in a warning zone, the Lease contract emits a wasm-ls-liquidation-warning event with the attributes customer, lease, lease-asset, ltv and level. The ltv attribute reports the warning threshold that the position crossed, for example 85%, rather than the position's current LTV, and level gives the warning level as 1, 2 or 3.

Warnings change nothing on chain, but they give the user time to repay part of the loan before the position reaches the liquidation threshold. Apps and bots can pick up the event by subscribing to it over the RPC WebSocket.

Liquidation

A position must keep two invariants at all times, and breaking either of them starts a liquidation.

The first invariant is that the liability stays covered, which means that the LTV must stay below the liquidation threshold. Once the LTV reaches that threshold, the protocol sells enough of the position asset to bring the LTV back to the healthy level.

The second invariant is that the interest stays covered. Interest is due once every due period, and if loan or margin interest is still unpaid after that, the protocol sells enough of the position to pay the overdue amount.

In both cases the sale runs on Solana through Metis, and its proceeds are applied in the same repayment order as any payment, from overdue interest to the principal.

Partial and full liquidation

The protocol prefers a partial liquidation, which sells only what is needed and leaves the position open, although two cases change that. When the amount to sell is below the minimum transaction size, nothing is sold yet. When selling it would leave the position below the minimum position size, or when a partial sale cannot restore the invariant, the protocol sells the whole position instead, which is a full liquidation.

A full liquidation ends with the position in the liquidated state. If the sale brings in more than the position owes, the excess goes to the protocol's Profit contract, and if it brings in less, the reserve covers the shortfall. Every liquidation, partial or full, emits a wasm-ls-liquidation event.

Slippage protection

Every swap that a position makes has a minimum output, which is the oracle price less the maximum slippage for that flow, and max_slippages sets that maximum separately for opening, repaying, closing and liquidation. For liquidations this floor is enforced by slippage protection, also called the Market Anomaly Guard.

Opening, repaying and closing, including the closes that take profit and stop loss trigger, retry within their slippage limit and re-read the oracle price on each attempt. A liquidation, on the other hand, never retries at a worse price. If the liquidation swap would fill below the oracle price minus the liquidation slippage limit, the swap does not execute and the position waits in slippage protection until it is re-assessed. During that time the state query reports the status slippage_protection_activated, and the protocol emits a wasm-ls-slippage-anomaly event.

The re-assessment uses the current price, so it may start a fresh liquidation or none at all. Holding the swap back in this way protects users from being liquidated into a temporary dislocation on a swap venue, and it protects lenders from a sale far below the market price.

The reserve

Each protocol has a reserve contract that steps in when a position cannot repay the lending pool in full. When a position closes or is liquidated for less than it owes the pool, the reserve covers the gap. The reserve also comes in when an opening fails, in which case the user's down payment is refunded in full, the loan is closed and the reserve covers the interest that the loan accrued in the meantime.

Asset-specific risk framework

Beyond the thresholds of each position, Nolus runs a dynamic risk management framework that keeps open margin positions from outgrowing the liquidity available to liquidate them. Long positions need this most, because falling asset prices often coincide with thinning stablecoin liquidity on the venues that swaps route through, which makes it less likely that liquidity providers add fresh capital.

Liquidity and exposure limits

The framework rests on the ratio of active loans to the liquidity available for each asset on the venues that Metis routes through, which Nolus monitors. Its core principle is that no asset should have outstanding loans that exceed a prudent share of that liquidity. As a general benchmark, active loans should not exceed 20% of the available liquidity, and the threshold is adjusted for each asset according to its broader liquidity profile.

These factors influence the assessment:

  • Market capitalization, since a higher market cap usually means deeper and more resilient markets.
  • Exchange diversity, since assets listed on many exchanges benefit from more liquidity and arbitrage.
  • Depth of liquidity, since moving the price of a widely traded asset takes more capital, which reduces the risk of manipulation.

As a result, an asset with broad exchange coverage and deep global liquidity may get a more relaxed exposure threshold than a niche asset whose liquidity sits in a single pool.

Temporary delisting

When an asset reaches its risk threshold, it becomes temporarily unavailable for opening new long or short positions. Existing positions in that asset are not forcibly closed, and their users can still manage them fully, while Nolus keeps monitoring the asset's loan-to-liquidity ratio.

If the ratio improves because loans decrease or liquidity increases, the asset can be reinstated for new positions. The app at app.nolus.io shows which markets are open for new positions.

On this page