ChainScore Labs
All Guides

How to Become a Liquidator: A Step-by-Step Guide

LABS

How to Become a Liquidator: A Step-by-Step Guide

A technical guide to identifying and executing profitable liquidation opportunities in decentralized lending protocols.
Chainscore © 2025

Core Concepts of DeFi Liquidation

A guide to understanding the critical role of liquidators in maintaining DeFi protocol solvency and the step-by-step process for participating in this essential market function.

Understanding Collateralized Debt Positions

Collateralized Debt Positions (CDPs) are the foundation of DeFi lending. Users lock crypto assets as collateral to borrow other assets, creating a loan with a specific collateralization ratio. This ratio must stay above a protocol's liquidation threshold to avoid being flagged for liquidation. For example, on Aave, a user might deposit ETH to borrow USDC. If the value of their ETH falls significantly, their position becomes undercollateralized, triggering the liquidation process to protect the protocol from bad debt.

The Liquidation Trigger & Incentive

A liquidation is triggered automatically by smart contracts when a user's collateral value falls below the required health factor or liquidation threshold. To incentivize rapid action, protocols offer a liquidation bonus or discount to liquidators. For instance, a liquidator might repay $100 of a user's debt to receive $105 worth of the user's collateral, netting a 5% profit. This mechanism ensures the system remains solvent by quickly recapitalizing undercollateralized loans, making it a critical, profit-driven market activity.

Setting Up as a Liquidator

To become a liquidator, you must first set up a Web3 wallet like MetaMask and fund it with capital, typically stablecoins, to repay user debt. Next, you need to connect to a DeFi protocol's front-end or directly interact with its smart contracts. Essential tools include blockchain explorers for monitoring positions and specialized bots or keeper networks to react instantly to liquidation opportunities. This setup requires understanding gas fees and transaction timing to ensure your liquidation attempts are profitable after costs.

Monitoring & Executing Liquidations

Successful liquidation requires real-time monitoring of on-chain data to identify undercollateralized positions. Liquidators use keeper bots, alert services, or custom scripts to scan protocols like MakerDAO or Compound. When a profitable opportunity arises, you must submit a liquidation transaction before competitors. For example, a bot might automatically repay a user's DAI debt on Maker to seize their discounted collateralized ETH. Speed and efficient gas bidding are crucial, as this is a highly competitive field with thin profit margins.

Managing Risks & Rewards

Liquidation involves significant financial and technical risks. Gas wars can erode profits, as multiple liquidators compete for the same position. Slippage and failed transactions due to network congestion are common. Furthermore, liquidators face smart contract risk and potential impermanent loss if seized collateral must be held. To manage this, successful operators diversify across protocols, optimize gas strategies, and use advanced tools for risk assessment. The reward is earning consistent, albeit competitive, yields from protocol incentives for maintaining system health.

Advanced Tools & Strategies

Professional liquidators employ sophisticated strategies and infrastructure to gain an edge. This includes running MEV (Maximal Extractable Value) bots to front-run transactions, using flash loans to fund large liquidations without upfront capital, and deploying private mempools for transaction privacy. For example, a liquidator might use a flash loan from Aave to repay a massive underwater loan on Compound, seizing the collateral, selling it, repaying the flash loan, and keeping the bonus—all in a single atomic transaction.

The Liquidator's Methodology

A step-by-step guide to becoming a liquidator on decentralized lending protocols, covering setup, monitoring, execution, and risk management.

1

Step 1: Foundation and Setup

Establish the technical and financial prerequisites for liquidation operations.

Detailed Instructions

Capital and Wallet Preparation is the critical first step. You must secure a significant amount of capital in a stable, liquid asset like USDC or ETH to cover gas fees and purchase discounted collateral. This capital should be held in a secure, non-custodial wallet like MetaMask. You will also need to connect this wallet to the specific blockchain network of your target protocol, such as Ethereum Mainnet or Arbitrum.

  • Fund Your Wallet: Deposit at least 0.5 to 2 ETH (or equivalent) for gas fees and a larger sum (e.g., 50,000 USDC) for the liquidation purchase itself.
  • Configure RPC Endpoints: Ensure your wallet is connected to the correct network. For Arbitrum, you might add a custom RPC with the endpoint https://arb1.arbitrum.io/rpc.
  • Acquire Protocol Tokens: Some protocols require you to hold their governance token (e.g., AAVE) to access liquidation functions. Acquire a small amount if necessary.

Tip: Use a dedicated wallet for liquidation activities to separate funds and simplify tracking. Consider using a hardware wallet for enhanced security.

2

Step 2: Monitoring and Identification

Continuously scan the blockchain for undercollateralized positions ripe for liquidation.

Detailed Instructions

Real-Time Position Monitoring requires setting up automated systems to track the health of borrower positions. The key metric is the Health Factor (HF), which falls below 1.0 when a loan becomes undercollateralized. You can subscribe to mempool transactions or use specialized services like Flashbots to detect these opportunities milliseconds before they hit the public mempool.

  • Set Up Alerts: Use a service or custom script to monitor for HealthFactor events dropping below a threshold like 1.1, giving you a buffer.
  • Analyze the Position: When an opportunity arises, immediately check the collateral asset (e.g., wBTC), the debt asset (e.g., USDC), and the exact shortfall amount.
  • Calculate Profitability: Estimate your profit after gas costs and the protocol's liquidation bonus (e.g., 5-10%). Factor in potential slippage on decentralized exchanges.

Tip: Focus on large positions with stable, liquid collateral to maximize profit and minimize execution risk. Avoid positions with highly volatile or illiquid assets.

3

Step 3: Execution and Transaction Crafting

Construct and submit the liquidation transaction with optimal speed and gas strategy.

Detailed Instructions

Transaction Construction involves calling the specific liquidationCall() function on the protocol's smart contract. You must specify the exact parameters, including the target user's address, the debt to repay, and the collateral to seize. To maximize success, you should bundle this call with a swap on a DEX like Uniswap to immediately sell the seized collateral and repay your flash loan if used.

  • Craft the Calldata: Prepare the function call. For Aave V3 on Ethereum, the contract address is 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2.
  • Simulate the TX: Use Tenderly or a local fork to simulate the transaction and verify profitability before sending.
  • Set Gas Parameters: Use a high-priority fee (e.g., 150 gwei) and a max fee with a significant tip to outbid competitors. For a complex bundle, you might need a gas limit of 1,500,000 units.
javascript
// Example call structure for Aave liquidation const tx = await lendingPool.liquidationCall( collateralAsset, // e.g., '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599' (wBTC) debtAsset, // e.g., '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' (USDC) userAddress, // The undercollateralized borrower debtToCover, // Amount of debt to repay, in debtAsset units receiveAToken // Set to false to receive the underlying collateral );

Tip: For maximum efficiency and capital use, execute liquidations via a flash loan from a provider like Balancer or DODO, repaying it in the same atomic transaction.

4

Step 4: Post-Liquidation Management

Handle the seized assets, manage profits, and review performance for continuous improvement.

Detailed Instructions

Asset Settlement and Risk Review begins once your transaction is confirmed. You now hold the seized collateral, which must be converted to your base currency to realize profits and recycle capital. This often involves a swap on a DEX. Crucially, you must analyze every execution, successful or failed, to refine your strategy.

  • Sell Collateral Immediately: Use a pre-approved smart contract or a DEX aggregator like 1inch to swap the seized wBTC for USDC to lock in the liquidation bonus and avoid price volatility.
  • Account for All Costs: Precisely calculate net profit by subtracting gas costs (which could be $200-$1000+ on Ethereum) and any flash loan fees (typically 0.09%).
  • Review and Optimize: Log key data: target Health Factor, gas used, profit, and failure reasons. Adjust your monitoring thresholds and gas bidding strategy based on this data.
  • Recycle Capital: Return the capital (original + profit) to your liquidation wallet to be ready for the next opportunity.

Tip: Implement a robust logging and analytics dashboard. Consider the tax implications of your frequent trading activity and set aside funds accordingly.

Liquidation Mechanics Across Major Protocols

How to Become a Liquidator: A Step-by-Step Guide

ProtocolLiquidation ThresholdLiquidation BonusLiquidation Call Data AccessMinimum Capital Required

Aave V3 (Ethereum)

Variable by asset (e.g., 80% for ETH)

5% to 10%

Public mempool or Flashbots

~0.1 ETH for gas + debt amount

Compound V3

Variable by asset (e.g., 82% for ETH)

5% fixed

Public mempool

Gas costs + 1 wei of collateral

MakerDAO

Variable by Vault type (e.g., 150% for ETH-B)

13% (Liquidation Penalty)

Keeper Network (auction)

MKR for gas + bid capital

Liquity

110% (Minimum Collateral Ratio)

10% (Liquidation Reserve + 200 LUSD min fee)

Frontend or direct contract call

200 LUSD + gas

dYdX (Perpetuals)

Maintenance Margin (varies by market)

Up to 40% of position size

Integrated order book

None for liquidation execution

Solend (Solana)

Variable by asset (e.g., 85% for SOL)

5%

Public RPC

~0.01 SOL for fees

Morpho Blue

Set by Market Creator

Set by Market Creator

Public mempool or private RPC

Gas + debt amount

Implementation Paths for Liquidators

Getting Started

Liquidation is the process of seizing and selling undercollateralized assets from a borrower's position to repay their debt, ensuring protocol solvency. As a liquidator, you profit from a discount on the seized assets.

Key Points

  • Understand the Trigger: A position becomes liquidatable when its collateral value falls below a required threshold, known as the liquidation ratio. For example, on Aave, a loan might be liquidated if the Health Factor drops below 1.0.
  • Identify Opportunities: Use dashboards like DeFi Saver or monitoring bots to find positions nearing liquidation. You need to act quickly as others compete for the same opportunity.
  • Basic Process: You supply the required stablecoins (like DAI or USDC) to repay the borrower's debt, and in return, you receive the collateral at a discount, which you can then sell on a DEX like Uniswap for profit.

Example

When using Aave, you would monitor the protocol's public data for positions with a Health Factor below 1. Once identified, you can use a user-friendly interface like Instadapp to execute the liquidation in a few clicks, receiving discounted ETH or other assets.

Key Risks and Mitigations

An overview of the primary challenges and strategic safeguards for individuals pursuing a role as a liquidator in decentralized finance.

Capital Risk

Capital risk refers to the potential loss of the staked assets required to become a liquidator. This capital is locked as collateral and is at risk if the liquidation process fails or is executed incorrectly.

  • Capital Lock-up: Funds are immobilized and cannot be used elsewhere, creating opportunity cost.
  • Slippage & Failed Transactions: Market volatility can cause transactions to fail mid-execution, potentially leaving the liquidator with undesirable assets.
  • Example: A liquidator stakes 10 ETH, but a sudden network congestion causes their liquidation transaction to revert, wasting gas fees without profit.
  • This matters as insufficient capital management can lead to significant financial loss rather than the intended profit.

Technical Execution Risk

Technical execution risk involves failures in the automated bots or manual processes used to identify and execute profitable liquidations, which are highly time-sensitive.

  • Bot Reliability: Self-built or third-party bots must be flawless to outcompete others; a bug can be catastrophic.
  • Network Latency: Even milliseconds of delay on the blockchain can mean missing a profitable opportunity.
  • Use Case: A liquidator's custom script has a logic error, causing it to overpay for a collateralized debt position (CDP), resulting in an instant loss.
  • Mastery of technical tools and infrastructure is critical for consistent success in this competitive field.

Market & Protocol Risk

Market and protocol risk encompasses volatility in asset prices and changes to the underlying lending platform's smart contracts or economic rules.

  • Oracle Manipulation: If price feeds are inaccurate or manipulated, liquidations may be triggered unfairly or missed entirely.
  • Smart Contract Upgrades: Protocol changes can alter liquidation incentives, fees, or eligible assets overnight.
  • Real Example: A sudden 30% market crash creates a flood of underwater positions, but the protocol's liquidation engine becomes overloaded, delaying all actions and shrinking profit margins.
  • Liquidators must stay informed on protocol governance and market conditions to adapt their strategies proactively.

Regulatory & Compliance Risk

Regulatory and compliance risk is the uncertainty surrounding the legal treatment of liquidation activities, which may vary by jurisdiction and evolve over time.

  • Tax Implications: Profits from liquidation may be classified as income or capital gains, requiring complex reporting.
  • Licensing Requirements: Some regions may require money transmitter or financial service licenses for these activities.
  • Use Case: A liquidator operating in multiple countries faces a new regulatory ruling that classifies their earnings as taxable business income, incurring unexpected liabilities.
  • Navigating this landscape is essential for long-term, sustainable operation and avoiding legal penalties.

Operational Security Risk

Operational security risk involves threats to the private keys, servers, and digital infrastructure that manage the liquidator's funds and bots.

  • Private Key Management: Compromised keys lead to immediate theft of all staked capital and profits.
  • Server Vulnerabilities: Hosting a liquidation bot on an insecure VPS can expose it to hacks or DDoS attacks.
  • Example: A liquidator uses a weak password for their bot's admin panel, allowing an attacker to redirect all profits to a different wallet.
  • Robust security practices, including hardware wallets and secure hosting, are non-negotiable to protect assets.
SECTION-FAQ

Frequently Asked Questions

Ready to Start Building?

Let's bring your Web3 vision to life.

From concept to deployment, ChainScore helps you architect, build, and scale secure blockchain solutions.