Skip to main content

Liquidation grace periods

Lenders and borrowers can create a custom market that uses a delayed-liquidation gate. After a position becomes unhealthy and a keeper starts the grace period, the gate blocks liquidations until the grace period ends, so the borrower can repay debt or add collateral in that time. The gate delays a liquidation; it does not prevent one.

Each delayed-liquidation gate is deployed with its own immutable grace and liquidation periods (between 60 seconds and 72 hours). Lenders may require a lower LLTV or higher rate to offset the additional price risk.

How the grace period works​

When a position becomes unhealthy, any keeper can call the gate to start the grace period. Before maturity, no liquidation can happen until that call is confirmed onchain, even if the position is already unhealthy. Anyone can run a keeper; it is not a privileged role. The borrower then has the configured duration to add collateral or repay debt before any liquidator can seize collateral. After the grace period ends, a liquidation period opens during which liquidators can act. Only one grace and liquidation window can be active at a time per borrower; once the full window elapses, a fresh call is required to restart.

If a priority liquidator was specified when the grace period started, they have exclusive access for up to one minute at the start of the liquidation period before it opens to other callers.

After maturity, liquidations in the market proceed immediately, regardless of the grace or liquidation period. See post-maturity liquidations.

Restoring health during the grace period​

Position health is re-checked at the moment of liquidation, not when the grace period was started. If the borrower restores health during the grace period and the position stays healthy through the liquidation period, no liquidation occurs, even though the gate's timing window is still open. If the position becomes unhealthy again while the liquidation period is still open, the position can be liquidated immediately, with no additional grace period. A new grace period can start only after the full grace and liquidation window has elapsed, through a fresh keeper call.

Risk for lenders

Lending in a market with a delayed-liquidation gate exposes lenders to additional price risk. If collateral value falls sharply during the grace period, bad debt becomes more likely.

For a technical breakdown of the delayed liquidation mechanism, see DelayedLiquidationGate.