In blockchain architecture, a Keeper is an external, permissionless actor that provides a critical oracle and execution service for DeFi protocols and other smart contracts. Its primary function is to perform routine maintenance tasks—such as liquidating undercollateralized loans, triggering limit orders in decentralized exchanges (DEXs), or initiating insurance claim payouts—that are economically unfeasible or technically impossible for the smart contract to perform autonomously. By submitting the necessary transaction with the correct calldata, the Keeper finalizes an action that the protocol's logic has already determined should occur.
Keeper
What is a Keeper?
A Keeper is an off-chain agent or bot that automates smart contract functions by monitoring the blockchain for specific conditions and executing predefined transactions when those conditions are met.
The economic model for Keepers is typically incentive-based, operating on a gas-cost-plus-reward system. When a Keeper's monitored condition becomes true (e.g., a loan's collateral ratio falls below a threshold), the Keeper broadcasts a transaction to execute the corresponding function. The smart contract pays the Keeper a pre-defined reward from its treasury or from the proceeds of the action (like a liquidation penalty), which must exceed the cost of the gas fees incurred. This creates a competitive, decentralized marketplace where multiple Keepers race to be the first to perform profitable tasks, ensuring network liveness and reliability.
Prominent examples include Keep3r Network, which is a decentralized keeper job marketplace, and Chainlink Keepers, which provides a robust, decentralized network for automation. These systems abstract away the complexity of running reliable off-chain infrastructure, allowing developers to specify upkeep jobs via smart contracts. The role of a Keeper is distinct from a validator or miner; it does not participate in consensus but is essential for the composability and advanced functionality of modern DeFi ecosystems, automating time-sensitive and conditional logic that is fundamental to their operation.
How a Keeper Works
A keeper is a specialized, permissionless bot that monitors blockchain conditions and automatically executes predefined transactions when specific criteria are met, acting as a decentralized automation service for smart contracts.
In decentralized finance (DeFi) and broader Web3 applications, many smart contracts require timely, external execution to function—such as liquidating an undercollateralized loan, rebalancing a liquidity pool, or settling a limit order. A keeper (also known as a keeper bot, searcher, or automation bot) is an off-chain service that constantly monitors the blockchain for these triggering conditions. When a profitable or necessary opportunity is identified, the keeper submits the required transaction, paying the necessary gas fees to the network. This role is critical because standard smart contracts cannot initiate actions on their own; they require an external Ethereum Virtual Machine (EVM) call to transition between states.
The keeper ecosystem operates on a permissionless and competitive model. Multiple keeper services typically monitor the same opportunities, creating a gas auction where they compete to have their transaction included in the next block. The keeper that submits the transaction with the highest gas price is usually prioritized by miners or validators. This competition ensures execution speed and reliability but also means keepers must carefully calculate their potential profit (e.g., a liquidation bonus or protocol fee) against their gas costs and the risk of being outbid. Major protocols like MakerDAO, Aave, and Compound rely on this decentralized network of keepers to maintain the health of their lending markets through automated liquidations.
Technically, a keeper's workflow involves several key components: a listener that subscribes to blockchain events via a node or indexing service, a strategy engine that evaluates if predefined conditions are met and calculates potential profit, and a transaction manager that constructs, signs, and broadcasts the transaction. Advanced keepers may employ MEV (Maximal Extractable Value) strategies, such as arbitrage or sandwich attacks, to maximize revenue. Services like Chainlink Keepers and Gelato Network provide standardized infrastructure, allowing developers to outsource keeper logic without running their own bot infrastructure, thereby enhancing security and reliability for decentralized applications.
Key Features of a Keeper
A Keeper is an off-chain agent that monitors a blockchain and executes predefined transactions when specific conditions are met, enabling automation for DeFi protocols.
Condition Monitoring
The core function is to continuously scan the blockchain state for predefined triggers. These conditions are specified in smart contracts and can include:
- A loan's collateral ratio falling below a liquidation threshold.
- An options contract reaching its expiry date.
- A limit order price being met on a DEX.
- A time-based event, like the end of an auction.
Permissionless Execution
Keeper networks are typically permissionless, meaning any entity can run a Keeper bot. Execution is incentivized by gas fee reimbursement and a profit premium (e.g., a liquidation bonus). This creates a competitive market where the fastest and most efficient Keeper secures the reward, ensuring timely execution without relying on a trusted central party.
Economic Incentives & MEV
Keeper operations are driven by Maximal Extractable Value (MEV) opportunities. The profit from a successful execution (like a liquidation arbitrage) must exceed the cost of the transaction gas. This creates a complex landscape where Keepers compete in gas auctions, often using sophisticated strategies like flashbots bundles to front-run competitors and maximize their reward.
Infrastructure & Reliability
Professional Keepers require robust infrastructure to be profitable:
- Low-latency nodes to see new blocks first.
- Transaction simulation to avoid failed, costly transactions.
- Private transaction pools (e.g., Flashbots) to avoid front-running.
- Redundant systems to maintain high uptime. This infrastructure barrier leads to the professionalization of Keeper services.
Protocol Integration
For a smart contract to be Keeper-compatible, it must expose a publicly callable function (e.g., liquidate(address)). It often includes a bonus or fee for the caller and clear, on-chain verifiable conditions. Protocols like MakerDAO, Aave, dYdX, and Opyn rely on Keepers for critical functions like liquidations and settlement.
Primary Use Cases & Examples
Keepers are off-chain agents that perform critical, time-based functions to maintain the health and functionality of decentralized protocols. Their primary role is to automate tasks that are impossible or inefficient for smart contracts to execute on their own.
Limit Order Execution
Decentralized exchanges that support limit orders (e.g., dYdX, 0x) rely on keeper networks. When a market price reaches a user's specified level, a keeper:
- Submits the pre-signed transaction to the blockchain.
- Pays the gas fee.
- Is compensated via a taker fee or a portion of the order spread. This brings traditional exchange functionality to on-chain markets.
Oracle Updates & Data Feeds
Decentralized oracle networks like Chainlink use keeper-like nodes called oracles to perform a similar function:
- Periodically fetch off-chain data (price, weather, sports scores).
- Reach consensus on the correct value.
- Submit the aggregated data on-chain via a transaction. While distinct, this is a foundational use case for external automation.
Protocol Parameter Updates & Maintenance
DAOs and decentralized protocols use keepers for scheduled maintenance, such as:
- Executing DAO governance proposals that have passed a vote.
- Initiating epoch or reward distribution in staking protocols.
- Triggering insurance fund rebalancing or debt auctions in systems like MakerDAO. This ensures the protocol operates according to its coded parameters without manual intervention.
Keeper Ecosystem & Networks
A Keeper is an off-chain agent or bot that performs predefined tasks to trigger on-chain functions, enabling critical automation for DeFi protocols and smart contracts that lack native time-based or conditional execution.
Core Function: Automation & Upkeep
Keepers automate essential but non-deterministic tasks that smart contracts cannot perform autonomously. Their primary functions include:
- Liquidation: Monitoring loan positions and triggering liquidations when collateral ratios fall below a threshold.
- Limit Order Execution: Filling orders when market prices reach specified levels.
- Rebalancing: Adjusting portfolio weights in vaults or liquidity pools.
- Triggering Epochs: Initiating reward distribution or voting periods at set intervals.
- Data Feeds: Submitting price or other external data (oracles) on-chain.
Economic Model & Incentives
Keeper networks operate on a fee-for-service model, creating a competitive marketplace for reliable execution.
- Gas Reimbursement + Premium: Keepers are compensated for the gas they spend plus a profit margin (premium) set by the protocol or auction.
- Permissionless Participation: Anyone can run a keeper node, fostering decentralization and competition.
- Bonding & Slashing: Some networks require keepers to post a security bond (stake) that can be slashed for malicious behavior or consistent failure, aligning incentives with protocol security.
Architecture: Network vs. Solo
Keeper infrastructure can be organized in two primary ways:
- Decentralized Networks: Platforms like Chainlink Keepers and Gelato Network provide a decentralized network of nodes. Users submit task definitions, and the network's nodes compete to execute them, offering censorship resistance and reliability.
- Solo Keepers: Individual entities or DAOs run their own keeper bots for specific protocols. This is simpler but introduces centralization risk and operational overhead. Most major protocols now rely on decentralized networks for critical functions.
Key Technical Components
A functional keeper system relies on several interconnected parts:
- Registry: A smart contract that lists registered upkeep tasks, their conditions, and associated funds.
- Upkeep: The defined job itself, containing the target contract address, the checkData (condition to evaluate), and the performData (action to execute).
- Keeper Node: The off-chain software that continuously monitors the blockchain, checks upkeep conditions, and submits transactions.
- Condition Check: The off-chain logic that determines if an upkeep is ready for execution (e.g.,
is price > X?).
Security & Economic Considerations
A keeper is an off-chain bot or agent that monitors a blockchain network and executes predefined transactions when specific conditions are met, performing a critical role in protocol automation and health.
Core Function & Economic Role
Keepers are automated actors that perform essential, often unprofitable, maintenance tasks for decentralized protocols. Their primary functions include:
- Triggering liquidations in lending markets when collateral ratios fall.
- Executing limit orders in DEXs when price targets are hit.
- Rebalancing assets in yield vaults or index funds.
- Settling auctions or resolving disputes.
By automating these functions, keepers ensure protocol solvency, efficiency, and correct operation, acting as the execution layer for smart contract logic.
Incentive Model & Profitability
Keeper networks operate on a profit-seeking model. They are economically incentivized to perform tasks by earning fees, rewards, or arbitrage opportunities. Key economic drivers include:
- Liquidation bonuses: A percentage of the liquidated collateral.
- Transaction fee rewards: For executing limit orders or other calls.
- MEV (Maximal Extractable Value): Profits from reordering or including transactions in a block.
Keeper profitability is highly competitive and sensitive to gas prices, network congestion, and the efficiency of their off-chain infrastructure.
Security Risks & Centralization
While vital, keeper systems introduce specific security and centralization vectors:
- Single Point of Failure: Reliance on a few dominant keeper services can create systemic risk if they go offline.
- Collusion & Censorship: Keepers could collude to censor transactions or manipulate outcomes for profit.
- Frontrunning & MEV: Aggressive keeper bots engaging in transaction frontrunning or sandwich attacks can harm regular users.
- Oracle Manipulation: Some keeper actions depend on price oracles, making them vulnerable to oracle attacks. Protocols mitigate these risks through decentralized keeper networks, permissionless participation, and cryptoeconomic security designs.
The Keeper-MEV Relationship
Keepers are primary participants in the MEV supply chain. They compete to extract value from the ordering and inclusion of transactions in blocks. This relationship manifests as:
- Liquidation MEV: Profits from being the first to liquidate an undercollateralized position.
- DEX Arbitrage: Exploiting price differences between decentralized exchanges.
- Sandwich Attacks: Profiting by placing orders before and after a victim's trade. The pursuit of MEV creates a complex, often adversarial ecosystem where keeper bots compete with each other and sophisticated searchers, driving innovation in transaction propagation and block building.
Keeper vs. Validator: Key Differences
A structural and functional comparison of two distinct blockchain network roles.
| Feature | Keeper (Automated Executor) | Validator (Consensus Node) |
|---|---|---|
Primary Function | Executes predefined, conditional transactions (e.g., liquidations, limit orders) | Proposes and attests to new blocks to achieve network consensus |
Consensus Participation | ||
Trigger for Action | Off-chain data (oracles) or on-chain conditions | Block production schedule or validation rules |
Economic Security | Capital at risk in the protocol it serves (e.g., collateral) | Staked native asset (e.g., ETH, SOL, ATOM) |
Incentive Model | Transaction fees and/or protocol rewards for successful execution | Block rewards and transaction fees from the base layer |
Network Layer | Application layer (dApps, DeFi protocols) | Base layer / consensus layer (Blockchain protocol) |
Key Mechanism | Automation, off-chain computation, gas optimization | Cryptographic signing, proof-of-stake, proof-of-work |
Example Protocols | Chainlink Keepers, Gelato Network, Keep3r Network | Ethereum (PoS), Solana, Cosmos, Polygon |
Keeper
A keeper is an automated, permissionless bot or agent that executes specific on-chain functions in a decentralized network when predefined conditions are met, earning fees or rewards for its service.
In blockchain ecosystems, a keeper is a critical piece of infrastructure that performs essential but often unglamorous tasks to maintain protocol health and functionality. These tasks—such as liquidating undercollateralized loans, initiating limit orders in decentralized exchanges, rebalancing liquidity pools, or settling options contracts—are triggered by specific on-chain or oracle-reported conditions. By automating these functions, keepers ensure that decentralized applications operate efficiently and according to their programmed logic without relying on a centralized operator. Their role is analogous to arbitrageurs or market makers in traditional finance, but they operate in a trust-minimized, code-first environment.
The incentive mechanism for keepers is typically a fee or reward paid in the network's native token or a share of the transaction's value. For example, in a lending protocol, a keeper that successfully liquidates a position may receive a percentage of the collateral as a bounty. This creates a competitive, permissionless market where multiple keepers monitor the blockchain for profitable opportunities. The first keeper to submit a valid transaction that meets the protocol's conditions claims the reward. This system aligns economic incentives with protocol security, as it ensures that necessary but potentially costly actions (like paying gas fees for liquidation) are performed promptly to protect the system's solvency.
Technically, a keeper's operation involves constant blockchain monitoring via node connections, gas price optimization to ensure transaction profitability, and sophisticated transaction bundling or MEV (Maximal Extractable Value) strategies. They are not a native protocol feature but an emergent layer of economic actors. Prominent examples include keepers in MakerDAO's liquidation system, keepers for Chainlink's decentralized oracle networks which help maintain data feeds, and keepers in perpetual futures protocols like dYdX. The reliability of a decentralized application often depends on the robustness of its keeper ecosystem, making their design a key consideration in DeFi (Decentralized Finance) mechanism design.
Frequently Asked Questions (FAQ)
Essential questions about the automated agents that maintain and execute critical functions in decentralized protocols.
A keeper is an off-chain, permissionless bot or agent that performs predefined tasks to maintain the health and functionality of a decentralized protocol, such as triggering liquidations, executing limit orders, or initiating protocol auctions. Keepers monitor the blockchain state and submit transactions when specific on-chain conditions are met, earning fees or rewards for their service. They are essential for automating processes that cannot be executed directly by smart contracts due to their passive nature, providing a crucial service layer for DeFi, oracles, and layer-2 networks.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.