Liiquidate Liquidation Engine (LLE)
Liiquidate monitors borrower positions in the LiiBorrow lending protocol and automatically liquidates undercollateralized positions when they become eligible through flashloans.
What it is
What it is:
Liiquidate is an automated liquidation engine for the LiiBorrow lending protocol, built on Chainlink CRE (Chainlink Automation).
How it works:
- Detection - CRE workflow queries borrower positions from Supabase and calculates health factors
- Risk Assessment - Positions categorized as HOT (HF < 1.05), WARM (1.05-1.10), COLD (> 1.10)
- Report Generation - When HF < 1 (undercollateralized), workflow encodes a liquidation report
- Signing - Report signed using ECDSA/keccak256
- Execution - Signed report submitted to consumer contract, which executes liquidation via flash loans
Problem solved:
Lending protocols face insolvency when borrowers become undercollateralized. Manually monitoring all positions and executing liquidations requires dedicated infrastructure with high uptime. Liiquidate automates this entirely detecting undercollateralized positions and executing liquidations without manual intervention or upfront capital (uses flash loans).
How it Works
Architecture:
- CRE Workflow (TypeScript/Bun) — Off-chain automation for position monitoring, risk assessment, and report generation
- Consumer Contracts (Solidity/Foundry) — On-chain liquidation execution via flash loans
- Supabase — Database for storing borrower positions and oracle prices
Key Components:
Component | Technology | Role
Workflow | TypeScript, Bun, Viem | Position monitoring, HF calculation, report signing
Consumer Contract | Solidity, Foundry | Flash loan execution, liquidation on LiiBorrow
FlashLoanRouter | Solidity | Routes flash loans (Aave V3, Uniswap V4)
UniversalSwapRouter| Solidity | Multi-DEX swap with circuit breaker
Data Flow:
Supabase > CRE Workflow (risk assessment) > ECDSA-signed report > Consumer Contract > Flash Loan > LiiBorrow Liquidation
Links
Created by
- Caleb Mokua