Back to Blog

~$542K Lost: MakerDaoBot Exploit | BlockSec Weekly

Code Auditing
October 14, 2026
6 min read
Key Insights
  • This report covers 1 security incident on Ethereum, with an estimated loss of approximately $542K.

  • MakerDaoBot lacked access control on a function that let any caller give an external contract control over the bot's internal balances.

  • A function that grants control over funds must authenticate both the caller and the contract receiving that control.

During the past week (2026/10/05 - 2026/10/11), we observed 1 security incident with a total estimated loss of approximately $542K.

Date Incident Type Estimated Loss
2026/10/06 MakerDaoBot Lack of Access Control ~$542K

Free Security Scan

A quick security pass with our in-house automated analysis engine.

Scan for free

Weekly Highlight: MakerDaoBot

On October 6, 2026, an attacker exploited a lack of access control in MakerDaoBot, a legacy MakerDAO liquidation bot on Ethereum, and withdrew 200 ETH, worth approximately $542K. The vulnerable function let any caller supply an external contract, grant it control over the bot's balances, and execute its code. The attacker used this path to settle four old collateral auctions and transfer the released ETH in a single transaction.

Background

MakerDaoBot participated in MakerDAO's legacy ETH-A collateral auctions through Flipper, the collateral-auction contract used by the older liquidation system. The bot managed Vat permissions, deposited and withdrew ETH and DAI, and processed liquidation tasks.

The Vat is MakerDAO's internal ledger. It records each address's free collateral by collateral type in gem[ilk][address] and its internal DAI credit in dai[address]; there is no separate wallet or account contract. MakerDaoBot's Vat balances therefore mean the ledger entries recorded under the bot contract's own address.

Calling hope(usr) does not transfer those balances. It sets can[msg.sender][usr] to 1, allowing usr to pass Vat's wish() permission check and operate balances recorded under msg.sender. Functions such as flux() and move() use this check when transferring internal collateral or DAI.

mapping(address => mapping (address => uint)) public can;
function hope(address usr) external note { can[msg.sender][usr] = 1; }
function nope(address usr) external note { can[msg.sender][usr] = 0; }
function wish(address bit, address usr) internal view returns (bool) {
    return either(bit == usr, can[bit][usr] == 1);
}

mapping (bytes32 => mapping (address => uint)) public gem;  // [wad]
mapping (address => uint256)                   public dai;  // [rad]

function flux(bytes32 ilk, address src, address dst, uint256 wad) external note {
    require(wish(src, msg.sender), "Vat/not-allowed");
    gem[ilk][src] = sub(gem[ilk][src], wad);
    gem[ilk][dst] = add(gem[ilk][dst], wad);
}
function move(address src, address dst, uint256 rad) external note {
    require(wish(src, msg.sender), "Vat/not-allowed");
    dai[src] = sub(dai[src], rad);
    dai[dst] = add(dai[dst], rad);
}

Vulnerability Analysis

The root cause was a lack of access control on function 0x8804d1de() in the MakerDaoBot contract at 0x6839...5546. The function treated varg0 as an external contract address (referred to below as the adapter), calling drip(), vat(), and later join() on that address. After obtaining the Vat address through vat(), the bot checked whether the adapter could operate its Vat balances. If not, it called hope(varg0) to grant permission and then invoked join() on the same adapter.

Other privileged entry points in the same contract used a ds-auth check before executing their operations. The comparison below shows two guarded entry points passing a bytes4 selector and msg.sender into the authorization helper, then reverting with ds-auth-unauthorized when the check fails. Function 0x8804d1de() had no equivalent caller check.

Function 0x8804d1de() therefore let any caller choose the address that received Vat permission. The bot granted that address permission through hope() and immediately called its join() function. The delegation remained active during this external call, allowing code at the chosen address to operate the bot's internal collateral and DAI balances.

Attack Analysis

The following analysis is based on the transaction 0xbb6940...f3a88c.

  • Step 1: The attacker's EOA called an attack contract it had deployed. That contract deployed a malicious adapter, then called MakerDaoBot's 0x8804d1de() function with the adapter address. The bot found no existing delegation in Vat's can mapping and called hope(), allowing the adapter to operate the balances recorded under the bot's address.
  • Step 2: MakerDaoBot called the adapter's join() function. While the delegation was active, the malicious code called deal(uint256 id) on the retired ETH-A Flipper and settled auctions 1457, 1458, 1459, and 1460. The adapter then used its Vat permission to move 200 units of ETH-A collateral from MakerDaoBot to itself, exited through ETH Join to receive 200 WETH, and transferred the tokens to the attack contract.
  • Step 3: The attack contract unwrapped 200 WETH and sent 200 ETH to the attacker's EOA, worth approximately $542K at the time.

Get Started with Phalcon Explorer

Dive into Transactions to Act Wisely

Try now for free

Conclusion

The root cause was a lack of access control in MakerDaoBot, not a flaw in MakerDAO's Vat permission system. A public function let any caller choose an external contract, grant it control over the bot's internal balances, and execute its code. The attacker used this path to settle four legacy auctions and withdraw 200 ETH.

Any function that delegates control over assets must restrict both who can initiate the operation and which external contracts may receive that authority. Sensitive integration paths should apply the same authorization controls as other privileged functions and accept only explicitly approved contracts.

Best Security Auditor for Web3

Validate design, code, and business logic before launch

About BlockSec

BlockSec is a full-stack blockchain security and crypto compliance provider. We build products and services that help customers to perform code audit (including smart contracts, blockchain and wallets), intercept attacks in real time, analyze incidents, trace illicit funds, and meet AML/CFT obligations, across the full lifecycle of protocols and platforms.

BlockSec has published multiple blockchain security papers in prestigious conferences, reported several zero-day attacks of DeFi applications, blocked multiple hacks to rescue more than 20 million dollars, and secured billions of cryptocurrencies.

Sign up for the latest updates
NEAR Intents Exploit: Refund Flaw and Security Lessons
Security Insights

NEAR Intents Exploit: Refund Flaw and Security Lessons

The NEAR Intents exploit used oversized refund events to preserve internal balances after the deposited assets were returned. This analysis reconstructs the receipt flow and seven BNB Chain withdrawals totaling 3,865,021 USDT, distinguishes those outflows from the project's reported full recovery, and outlines security considerations for developing and auditing NEAR smart contracts.

~$5.57M Lost: X100 Freezer, NEM Exploits | BlockSec Weekly
Security Insights

~$5.57M Lost: X100 Freezer, NEM Exploits | BlockSec Weekly

This weekly report covers two security incidents on Ethereum and BNB Chain from October 19 to October 25, 2026. It examines a flash-loan-funded governance takeover of X100 Freezer and a tax-settlement flaw affecting a NEM token liquidity pool on BNB Chain. Estimated losses within the report's scope total approximately $5.57M: ~$4.75M from the representative X100 transaction and ~$820K from the NEM pool incident. The total excludes separately reported follow-on X100 extractions.

~$3.87M Lost: Autheo Network, UNCX Hacks | BlockSec Weekly
Security Insights

~$3.87M Lost: Autheo Network, UNCX Hacks | BlockSec Weekly

This weekly report covers 3 security incidents from October 12 to October 18, 2026, with approximately $3.87M in total estimated losses. Autheo Network suffered a ~$1.76M private key compromise, Qubic Wallet lost ~$1.30M due to weak seed generation, and UNCX Network's Smart Token Vesting V2 contracts suffered an ~$807K accounting error across Ethereum, BNB Chain, Base, and Robinhood Chain. The highlighted UNCX analysis explains how a flawed aggregate share calculation mixed vesting tranches created at different token-to-share ratios and enabled excess withdrawals from shared pools.

Best Security Auditor for Web3

Validate design, code, and business logic before launch. Aligned with the highest industry security standards.

BlockSec Audit