Lynxcode
FREN
Liquidator project preview

[02Project]

Liquidator

Multi-protocol MEV liquidation bot — Morpho, Euler, Silo, Aave across 3 chains.

  • Python 3.12
  • Foundry
  • Solidity 0.8.27
  • Ethereum
  • Flashbots
  • Morpho
  • Aave
  • AWS
  • SQLite

[Overview]

What it does

Liquidator is a production-grade Ethereum MEV liquidation bot covering four lending protocols (Morpho Blue, Euler v2, Silo v2, Aave V3) across three chains (mainnet, Base, Arbitrum). When a borrower drops below Health Factor 1, the bot detects the position within seconds, plans the optimal liquidation, sources capital via a Morpho flash-loan (fee-free on mainnet), and executes the whole thing in a single atomic transaction.

The Liquidator contract is deployed via CREATE2 inside the first profitable bundle — zero gas wasted on speculative deployment. Seized collateral is swapped back against debt through the KyberSwap aggregator, the flash-loan is repaid, the builder gets paid from the surplus, and net profit is retained.

On the infra side: parallel indexers with cold/warm polling, per-chain isolated SQLite WAL, `eth_callBundle` simulation, and fan-out submission to 5 relays (Flashbots, Titan, Beaver, bloXroute, rsync) across multiple blocks ahead to maximize inclusion.

[Highlights]

Highlights

  1. 014 parallel indexers: Morpho Blue (108 markets), Euler v2 (26 vaults), Silo v2 (30 silos), Aave V3 (3 pools).
  2. 02Optimal plan: close-factor, eMode bonus override, dust-vs-full close logic.
  3. 03Morpho Blue flash-loan (fee-free on mainnet) for capital.
  4. 04Atomic CREATE2 deployment inside the first profitable bundle.
  5. 05Flashbots `eth_callBundle` simulation before every submission.
  6. 065-relay fan-out × N blocks ahead, KyberSwap for the atomic swap-back.
Status
Production
License
MIT