Back to Case Studies
DeFi / Stablecoin|Chainlink Labs / MakerDAO

Chainlink MakerDAO: Automating Critical DeFi Infrastructure

Integrated MakerDAO's Keeper Network with Chainlink Automation to decentralize critical protocol functions including oracle updates, vault liquidations, and DAI Savings Rate operations.

Cover Image for Chainlink MakerDAO: Automating Critical DeFi Infrastructure

The Challenge

MakerDAO, the protocol behind DAI - one of the most widely used decentralized stablecoins - relied on a network of "Keepers" to execute critical protocol functions. These operations were essential for maintaining system health, but the existing approach created significant risks:

Centralization Risk: Keeper operations depended on a small set of operators running custom bots. If these operators went offline or acted maliciously, critical protocol functions could fail - potentially destabilizing DAI's peg or leaving vaults vulnerable.

Oracle Reliability: Price feeds needed consistent "poking" to remain fresh. Stale oracles could lead to incorrect liquidations or, worse, failure to liquidate underwater positions - threatening protocol solvency.

Operational Complexity: Running keeper infrastructure required specialized knowledge, constant monitoring, and significant capital for gas. This high barrier to entry limited the decentralization of the keeper network.

Coordination Overhead: With multiple independent keepers, the ecosystem lacked standardized tooling and faced coordination challenges around upgrades and new feature deployments.

MakerDAO's MIP63 proposal outlined the vision: integrate with Chainlink's Automation Network to bring decentralized, reliable automation to the protocol's most critical functions.

"HackBG has been instrumental in helping us develop critical components that enable us to extend the Chainlink platform's capabilities and allow users to interface with new data sources seamlessly. HackBG's commitment to quality and technical proficiency has made it a valuable collaborator."

  • Sheth Sanket, VP Global Revenue and Partnerships, Chainlink Labs

Our Approach

This project required deep coordination between two of DeFi's most important protocols. Our role was to bridge MakerDAO's complex keeper requirements with Chainlink's automation infrastructure.

Stakeholder Coordination

Unlike typical development projects, this engagement required navigating multiple stakeholder groups:

  • MakerDAO Core Units: Understanding the nuances of existing keeper functions, edge cases, and security requirements.
  • Chainlink Labs: Ensuring our implementation aligned with Automation Network best practices and could serve as a reference for similar integrations.
  • MakerDAO Governance: Aligning technical decisions with the MIP63 proposal and community expectations.

Technical Strategy

We prioritized several key principles:

  1. Non-Custodial Design: The automation contracts never hold user funds - they only trigger protocol functions that are already permissionless.

  2. Incremental Automation: Rather than automating everything at once, we built a modular system where individual keeper functions can be enabled or disabled independently.

  3. Gas Sustainability: Keeper operations need funding. We integrated Uniswap to automatically convert DAI rewards to LINK tokens, ensuring the automation remains self-sustaining.

  4. Upgrade Path: The architecture supports adding new keeper functions without redeploying core infrastructure.

The Solution

Our implementation connects three major DeFi protocols - MakerDAO, Chainlink, and Uniswap - into a cohesive automation system.

Core Components

Chainlink Automation Integration

  • Deployed custom upkeep contracts that interface with Chainlink's Decentralized Oracle Network (DON).
  • Implemented checkUpkeep and performUpkeep functions following Chainlink's automation patterns.
  • Configured keeper conditions to match MakerDAO's operational requirements.

MakerDAO Job Sequencer

  • Connected to MakerDAO's existing job sequencer infrastructure.
  • Automated key functions including:
    • Oracle price feed updates ("poking")
    • Vault liquidation triggers
    • DAI Savings Rate (DSR) updates
    • Direct Deposit Module (D3M) operations
    • Autoline (debt ceiling) adjustments

Economic Sustainability Layer

  • Integrated Uniswap for automated DAI-to-LINK swaps.
  • Vesting contracts ensure long-term funding availability.
  • Gas optimization minimizes operational costs.

Development Process

PhaseActivities
Analysis & DesignDeep dive into MakerDAO protocol mechanics, MIP63 requirements, and Chainlink Automation architecture
Smart Contract DevelopmentImplementation of integration contracts connecting MakerDAO, Chainlink, and Uniswap
Stakeholder AlignmentRegular syncs with Chainlink and MakerDAO teams to validate approach
Testing & SecurityComprehensive test suite, formal verification of critical paths, third-party audit
Mainnet DeploymentStaged rollout with monitoring and incident response procedures
DocumentationTechnical documentation and community education materials

Team: 4 engineers (2 Solidity specialists, 1 protocol researcher, 1 integration lead)

Results

Protocol Impact

FunctionPrevious StateAfter Integration
Oracle UpdatesDependent on independent keepersAutomated via Chainlink DON
Liquidation TriggersVariable latencyConsistent, timely execution
D3M OperationsManual oversight requiredFully automated
Keeper Decentralization~5-10 active operatorsChainlink's decentralized network

Ecosystem Benefits

  • Enhanced Decentralization: Critical protocol functions no longer depend on a small set of operators.
  • Improved Reliability: Chainlink's proven infrastructure brings battle-tested reliability to MakerDAO operations.
  • Reduced Barriers: New keeper functions can be added without requiring operators to update their infrastructure.
  • Reference Implementation: The codebase serves as a template for other protocols seeking similar automation.

Open Source

The complete implementation is available at github.com/hackbg/chainlink-makerdao-automation, demonstrating our commitment to advancing the broader DeFi ecosystem.

Technologies Used

Solidity Ethereum Mainnet Chainlink Automation MakerDAO Protocol Uniswap V3 Hardhat TypeScript

Ready to ship your blockchain project?

From smart contracts to full-stack dApps, we turn your Web3 vision into reality. Let's talk about what you're building.

hello@hack.bg

By submitting, you agree to our privacy policy.