Live · Base Sepolia · chain 84532

Not a fork. A public chain.

The three pools, the cbETH oracle and the vault, compiled by Fe 26.6.0 from this repository and deployed on Base Sepolia. The attacker's batch ran against each pool, and MIP-X43's mistake was declared against Chainlink's real feeds. Each outcome is in an event on chain, with its exact revert data, and make live reads all of it back.

Read it now

From your browser, at one block, through Base Sepolia's public RPC.

The typed vault, any state

The deployed vault's four previews against OpenZeppelin's ERC4626, computed here in your browser.

The attack, on chain

One batch. Three pools. One transaction each.

PoolExitsOutcomeValue per BPTTransaction
FaithfulPool51ran, value fell1.0000 → 0.96620x0ecfa83e…6f9520
TypedPool51reverted Error("BAL#004")1.0000 → 1.00000xa31aece1…1231e2
GuardedPool51reverted Error("BAL#004")1.0000 → 1.00000x4dd5c6e0…fcecdc
TypedPool50ran, value rose1.0000 → 1.13910xdeed2185…29bfea
GuardedPool50ran, value rose1.0000 → 1.13910x90b301a1…07d18e

The batch is the one that drains the pool rounding as Balancer V2 did, planned exit by exit against its arithmetic. On the typed pools its last exit asks for 1 of the 2 wei of osETH left. Rounded up, as an amount leaving the pool must be, that is everything the pool holds, and StableMath reverts. Without that exit, the batch raises the value behind each share. Why the rounding decides it →

Each batch ran through LiveRecorder, a Solidity contract that calls the Fe pools through an ordinary interface; the typed pools' BAL#004 reached it as an ordinary revert. Using Dimension from Solidity, JavaScript and C →

Run it in your browser

The same batch, through the same Fe kernels, in WebAssembly.

The kernels the pool contracts run, compiled by Fe to WebAssembly from the same source and run here, in this page. Play the batch, or move along it, to see each kernel's value per BPT after every exit.

Running the kernels in WebAssembly…

What the chain recorded

Every claim, read back from the chain.

  • holds
    Did every recorded transaction succeed, in the block the record gives?
    21 transactions from 0x84e223Fb745B157a5f71d831634302B968129dB3, blocks 61,288,219 to 61,289,310
  • holds
    Is each contract's code on chain exactly the code this repository builds?
    7 Fe contracts byte-identical to fe build with Fe 26.6.0; LiveRecorder and MockRateProvider (rate 1.21) identical to forge's build apart from Solidity's metadata hash
  • holds
    On chain, does the attacker's planned batch lower the value behind each share of the pool that rounds as Balancer V2?
    51 exits in one transaction (0x0ecf…9520, block 61,289,251): 1.0000 to 0.9662 per BPT (-3.38%), equal to the wei to LivePlan's run of the same batch
  • holds
    Do the typed and guarded pools reject the same batch on chain, keeping the value behind each share?
    TypedPool: reverted Error("BAL#004") at exit 51 of 51, as LivePlan finds; 1.0000 per BPT unchanged; GuardedPool: reverted Error("BAL#004") at exit 51 of 51, as LivePlan finds; 1.0000 per BPT unchanged
  • holds
    Without the exit they reject, does the same batch raise the value behind each typed and guarded share instead?
    TypedPool: 50 exits, 1.0000 to 1.1391 per BPT (+13.91%); GuardedPool: 50 exits, 1.0000 to 1.1391 per BPT (+13.91%), equal to the wei to LivePlan
  • holds
    Does the oracle price cbETH as cbETH/ETH times ETH/USD, read from Chainlink's Base Sepolia feeds with every check?
    block 61,374,818: 1,857.42 USD, equal to the wei to the product of the feeds' answers; recorded on chain at deployment: 1,989.70 USD (block 61,289,281)
  • holds
    Declared as an 8-decimal USD feed, is cbETH/ETH rejected when the contract binding it is deployed?
    WrongDecimals(0x91b2…944d, 8, 18) in 0x432c…0b53, block 61,289,286
  • holds
    Declared with its real 18 decimals, does it deploy, and is every read of it rejected?
    deployed at 0xc3e3…45f1; its read reverted AnswerOutOfBand(0x91b2…944d: 1.1443, outside 100 to 100,000) in 0x1771…7289, and AnswerOutOfBand(0x91b2…944d: 1.1443, outside 100 to 100,000) at block 61,374,818
  • holds
    Declared correctly, does Chainlink's own cbETH/USD feed read through the same contract?
    block 61,374,818: 1,863.56 USD, its answer to the wei; the oracle's price through ETH is 0.33% from it
  • holds
    Does the deployed typed vault preview as OpenZeppelin's ERC4626?
    24 of 24 previews equal OpenZeppelin's formulas, in 3 states including a first deposit after a one-token donation

Checked at block 61,374,818. Fe contracts are compared byte for byte with what fe build produces here, and the batch and its results with LivePlan's run of it in forge.

Every contract

Deployed from one account, nothing else in between.

ContractWhat it isAddress
FaithfulPoolBalancer V2's arithmetic, ported exactly0x39577a44…fe2de8
TypedPoolThe same pool, its amounts typed by direction0xbb36abc7…b8e36d
GuardedPoolThe typed pool with the runtime share-value guard0x62927089…b5a15e
MockRateProviderosETH's rate as the drained pool read it: 1.210x08a6052b…a3f638
CbethUsdOraclecbETH in USD through ETH, from Chainlink's Base Sepolia feeds0x81c9cd31…11121c
DeclaredCbethEthAsUsdMIP-X43's mistake: cbETH/ETH declared as cbETH/USD, with its real decimals0xc3e300b1…2345f1
DeclaredCbethUsdChainlink's cbETH/USD, declared correctly0x8e5c3f84…0638ee
TypedVaultThe ERC-4626 vault's four previews0xd3090780…abd01f
LiveRecorderSolidity: calls the Fe contracts through ordinary interfaces and logs each outcome with the exact revert data0x30da1a5e…6bd5a1

Deployer 0x84e223Fb…129dB3. The pools are test contracts with open entry points, as in the fork tests; the record is in the transactions below, which no later call can change.

Every transaction

21 transactions, in order.

WhatBlockGasTransaction
deploy LiveRecorder61,288,219570,1450xb2126a55…4fa362
deploy MockRateProvider61,288,22497,2480x22d491dd…2d808f
deploy FaithfulPool61,288,2301,784,8950xf4d3dc06…a8bff0
initialize FaithfulPool61,288,235207,2520x5d0e819c…10b60a
deploy TypedPool61,288,2402,086,7550x9538d4a6…66a66b
initialize TypedPool61,289,237207,6940xde933db6…485541
deploy GuardedPool61,289,2422,185,1280x678ca686…fe91c8
initialize GuardedPool61,289,247207,7260x4ba5ed0f…85747c
attack FaithfulPool (51 exits)61,289,251784,9480x0ecfa83e…6f9520
attack TypedPool (51 exits)61,289,256824,0960xa31aece1…1231e2
attack GuardedPool (51 exits)61,289,261863,8790x4dd5c6e0…fcecdc
attack TypedPool (50 exits)61,289,266813,5140xdeed2185…29bfea
attack GuardedPool (50 exits)61,289,271853,3260x90b301a1…07d18e
deploy CbethUsdOracle61,289,276328,4660x62a87c09…8ae49b
probe CbethUsdOracle61,289,28168,4320x03e65d1e…f6eace
deploy DeclaredCbethUsdFeed through LiveRecorder61,289,28683,7970x432c22fc…270b53
deploy DeclaredCbethEthAsUsd61,289,290289,4160xba526a65…ac8edc
probe DeclaredCbethEthAsUsd61,289,29558,3150x177152c1…0f7289
deploy DeclaredCbethUsd61,289,300289,4280x27b13f24…f20781
probe DeclaredCbethUsd61,289,30556,9860x75e62323…7bd39f
deploy TypedVault61,289,310198,4640x6bb910f7…18123e
Check it yourself
from a clone, with forge installedsh
make live            # read the deployment back from Base Sepolia
make live-rehearse  # deploy it all again on a local fork; no key needed