Research: Liquidation Mechanism Design
Author: Research Date: 2026-06-22 Status: CompleteOverview
Liquidations are the safety mechanism that keeps PrivateLend solvent. When a user’s BTC collateral drops in value and their loan becomes undercollateralized, a liquidation must occur quickly to protect the USDC lenders. The challenge for Writz: how do you liquidate a private position? The collateral amount and debt are hidden by ZK proofs. Liquidators can’t see who is undercollateralized. This document designs the full liquidation system, including the novel ZK-private liquidation mechanism.Standard DeFi Liquidation (Public Protocols)
In Aave, Compound, and Blend, liquidation works as follows:- Any position is publicly visible: collateral amount, debt, health factor
- When health factor < 1.0, anyone can call
liquidate(position_id) - The liquidator pays some or all of the debt in USDC
- The liquidator receives the BTC collateral at a discount (liquidation bonus)
- The position is closed or partially reduced
The Private Liquidation Problem
Writz stores positions as ZK commitments:Solutions
Option A: Privileged Keeper (Operator)
A trusted Writz operator holds the decryption keys for all positions and monitors them privately. When a position becomes liquidatable, the keeper generates a ZK proof and initiates liquidation. Pros: Simplest to implement. Users trust the protocol operator. Cons: Centralization. If the keeper is offline, positions go unliquidated. If the keeper is malicious, they can selectively trigger or delay liquidations. Verdict: Acceptable for Phase 1 (alongside a timelock-based safety mechanism), but must be decentralized by Phase 2.Option B: User Self-Reporting
When a position becomes liquidatable, the protocol emits no signal. Users must periodically submit ZK proofs proving their position is healthy. If a user fails to prove health within a window, the position is assumed liquidatable. Pros: Fully decentralized. No trusted party needed. Cons: Terrible UX. Users must monitor and act regularly or lose their collateral. Not viable for mainstream adoption. Verdict: Not recommended.Option C: ZK Proof of Undercollateralization (Recommended for Phase 2)
A keeper (or any party with position knowledge) generates a ZK proof that a specific position is below the liquidation threshold — without revealing the actual collateral amount or debt. ZK proof statement:Recommended Liquidation Architecture
Phase 1: Keeper + Emergency Timelock
liquidation_open_after_block parameter. If a position’s last health check is older than X blocks (e.g., 1440 blocks = ~2 hours), liquidation becomes open to anyone who can submit a valid ZK proof. This prevents positions from going unliquidated if the keeper is down.
Phase 2: Decentralized Keeper Network
Multiple keeper nodes compete to submit liquidation proofs. The first valid proof wins. Keepers are incentivized by the liquidation bonus. A stake/bond mechanism ensures keepers don’t collude to delay liquidations.Liquidation Parameters
Collateralization ratios
| Parameter | Value | Rationale |
|---|---|---|
| Minimum collateral ratio | 150% | User can borrow up to 66.7% of BTC value in USDC |
| Liquidation threshold | 120% | Position liquidated if BTC value drops to 1.2× the debt |
| Liquidation buffer | 30% | Distance from min ratio to liquidation: safety margin for BTC volatility |
| Liquidation bonus | 10% | Liquidator receives BTC at 10% below market — their profit |
| Protocol liquidation fee | 2% | Writz takes 2% of the liquidated collateral value |
Example liquidation scenario
Partial liquidations
For large positions, full liquidation in one transaction may not be practical. Writz supports partial liquidations — a liquidator pays some of the debt and receives proportional collateral. Minimum liquidation amount: 10% of outstanding debt per liquidation call. This prevents dust liquidations that waste gas without meaningful risk reduction.Liquidation and the ZK Circuit
The liquidation Circom circuit must prove:ratio < threshold) are expensive in ZK circuits because they require range proofs. This will be one of the heavier operations in Writz’s circuit design. Benchmark this specifically in Phase 1.
Liquidation UX for Users
Users should be notified well before liquidation:- 150% → 140%: Warning notification (email, in-app)
- 140% → 130%: Urgent notification with one-click repay button
- 130% → 120%: Critical alert — liquidation imminent
- < 120%: Keeper initiates liquidation
Last updated: 2026-06-22 Sources: What is Health Factor in DeFi — Otomato · ZK Lending on Cardano — Catalyst · Aave Liquidation Mechanism