SerevinSerevinDocumentation
The guide/Protocol mechanics
Local implementation

Liquidations & oracles

How collateral is valued, when liquidation is allowed, and who absorbs an unpaid shortfall.

In this chapter

When a position can be liquidated

Anyone can liquidate a position when its debt is strictly greater than collateral value multiplied by the liquidation threshold. Exactly at the threshold, the current comparison does not allow liquidation.

The liquidator supplies loan assets and receives collateral, including the configured incentive. A maximum repayment limits what they pay; a minimum collateral output protects their expected receipt. The permitted payment is also bounded by the debt and the collateral that remains.

A profitable incentive on paper does not guarantee an available liquidator. Actual execution depends on prices, gas, token transfers, available loan assets and the ability to dispose of the collateral.

In the current implementation
Liquidatable when debt > collateral value × liquidation threshold / 10,000

What happens when collateral is insufficient

If liquidation exhausts collateral and debt remains, the market immediately writes off the remaining debt. It reduces lender asset accounting and increases its cumulative bad-debt record.

No insurance fund automatically replenishes that shortfall. Supplier shares absorb the recognized loss through their lower claim on market assets. A protocol-interest fee is not insurance, and a separate token reserve does not automatically back an isolated lending market.

The guarded price adapter

The oracle requires an approved feed and checks a sequencer feed before returning a price. It rejects sequencer downtime, invalid timestamps and a read before the configured recovery grace period has strictly elapsed.

Asset feeds must return positive prices with acceptable timestamps and completed rounds. Stale or future values, missing feeds and a round answered before the requested round are rejected. Accepted feed values are scaled to 18 decimals.

An optional market-status adapter can block pricing when a market is closed. For Stock Tokens, the feed must already reflect the correct token multiplier. This oracle does not fetch corporate-action APIs or calculate those multipliers itself.

An unavailable price can also stop liquidation

A paused, stale or otherwise invalid oracle prevents consumers from obtaining a price. That can block liquidation as well as borrowing and debt-bearing collateral removal. Do not assume that a protective oracle check keeps liquidation operational through a market closure or price outage.

Repayment and collateral additions do not require a price and remain possible outside recovery, subject to token-transfer success. Admin recovery is a separate state that halts normal operations. Monitoring and incident procedures must account for both kinds of interruption.

This guide describes the current source implementation. Production terms and verified deployment addresses will be published before real transactions are enabled.