Skip to content

🎯 Deterministic Liquidation

A Vault commits three script leaves at creation: Repayment, Liquidation, and Exit. The Liquidation leaf is spent by the DCN when the Coordination Layer authorizes it for one of two reasons:

  1. Undercollateralization - the live collateral ratio has dropped below the liquidation threshold.
  2. Delinquency - the credit line has reached term without being fully repaid or extended.

Both reasons spend the same Liquidation leaf. Delinquency is a different trigger, not a different script.

<loanPubkey> OP_CHECKSIG

The witness includes a BIP340 signature from a Lin24 threshold session of the DCN. The reason for spending is not encoded in this leaf itself; it is enforced by the Coordination Layer and each signer's local validation policy.

Coordination Layer

A deterministic coordination program - implemented by the core contracts plus the Relayer - tracks Vault collateral, debt, and oracle state.

  • It emits deterministic liquidation instructions (e.g., "liquidate 0.02 BTC lot from position #123").
  • It cannot move BTC directly. It only attests that a liquidation condition is satisfied to the DCN.
  • Every state change is verifiable and reproducible across DCN signers.

Per-Signer Validation

Each DCN member independently validates before co-signing. If any rule fails on any signer, the signing session aborts and no signature is produced.

  • Inputs reference the correct Vault UTXO and the correct MAST leaf.
  • Outputs are not controlled by DCN members (the sweep goes to the configured liquidation destination, not to any signer-controlled address).
  • Oracle price data is fresh and within deviation limits.
  • On-chain contract state confirms the position is liquidatable (CR breach or delinquent at term).
  • The Exit leaf's CSV has not expired (if it has, the borrower's Exit path dominates and the DCN must not spend).

These checks run locally on every signer. They are application-layer signing policy, not a property of Lin24 itself. See Key Lifecycle for how this policy interacts with DKG and refresh.

Liquidation Flow (below liquidation threshold)

  1. Coordination Layer detects that a position has breached the liquidation threshold and opens a liquidation record.
  2. The liquidation record specifies a lot size (often a partial liquidation to minimise borrower loss and contain cascades).
  3. DCN members reconstruct the PSBT from committed vault parameters and validate locally.
  4. A Lin24 signing session produces the Schnorr witness; the transaction is broadcast to Bitcoin.
  5. Liquidated BTC is routed to the DCN-controlled sweep address and a Dutch auction opens on the EVM side against the market that issued the credit line.
  6. Auction proceeds in stablecoin retire the proportional debt and penalty, any BTC surplus is re-locked into a Vault UTXO under the same three leaves.

Partial liquidation in small lots minimizes borrower losses and dampens liquidation cascades during volatility.

Delinquency Flow (end-of-term, unpaid)

Near term end, the Coordination Layer checks whether the credit line is fully repaid. If not, the delinquency flow activates:

  1. Coordination Layer emits a delinquency signal for the position.
  2. DCN members reconstruct the PSBT based on the committed vault parameters.
  3. DCN signs with Lin24 and broadcasts.
  4. BTC is routed to the DCN sweep address, a Dutch auction opens on the EVM side, same as the undercollateralization flow.
  5. Auction proceeds retire debt and penalty, any surplus BTC is re-locked or returned to the borrower according to the market's post-delinquency policy.

The on-chain spend is identical to the undercollateralization flow - same leaf and same signature path. Only the authorization reason and auction record differ.

Key Guarantees

  • Non-custodial. BTC stays on Bitcoin; the DCN can only spend via quorum signing, and only if per-signer validators accept the authorization reason.
  • Deterministic. PSBT templates and validator rules are reproducible across signers; disagreement aborts signing rather than producing a bad spend.
  • Censorship-safe. If the DCN refuses or disappears, the Exit path lets the borrower recover after the CSV delay.
  • Market-segregated. Auction proceeds reconcile debt in the specific market (variable or fixed-rate) that issued the credit line, not a shared accounting surface.