1.12 USD, from the same feeds. Or 2,206.68.
A governance proposal gave Moonwell's cbETH market the cbETH/ETH exchange rate as its USD price. For eight days the market valued cbETH at about 1.12 USD, and liquidators seized collateral against almost nothing. Dimension's oracle, deployed on forks of Base across those eight days, read the same two Chainlink feeds.
Correct at every block. Identical to Moonwell, to the wei, wherever Moonwell was right.
CbethUsdOracle, deployed on each fork)Moonwell's deployed oracleThe same values as a table
| Block | Time (UTC) | Moonwell (USD) | Dimension (USD) |
|---|---|---|---|
| 42,194,662 | 02/15 18:04:31 UTC | 2,206.6837 | 2,206.6837 |
| 42,194,663 | 02/15 18:04:33 UTC | 1.1227 | 2,206.6837 |
| 42,225,961 | 02/16 11:27:49 UTC | 1.1227 | 2,209.5567 |
| 42,257,260 | 02/17 04:51:07 UTC | 1.1224 | 2,232.6376 |
| 42,288,558 | 02/17 22:14:23 UTC | 1.1225 | 2,243.1581 |
| 42,319,857 | 02/18 15:37:41 UTC | 1.1225 | 2,234.0663 |
| 42,351,156 | 02/19 09:00:59 UTC | 1.1225 | 2,213.2208 |
| 42,382,454 | 02/20 02:24:15 UTC | 1.1229 | 2,190.9733 |
| 42,413,753 | 02/20 19:47:33 UTC | 1.1229 | 2,203.5089 |
| 42,445,052 | 02/21 13:10:51 UTC | 1.1229 | 2,217.9224 |
| 42,476,350 | 02/22 06:34:07 UTC | 1.1229 | 2,217.9721 |
| 42,507,649 | 02/22 23:57:25 UTC | 1.1229 | 2,196.3561 |
| 42,538,948 | 02/23 17:20:43 UTC | 1.1229 | 2,091.1616 |
| 42,538,949 | 02/23 17:20:45 UTC | 2,091.1616 | 2,091.1616 |
- ✓holdsDid Moonwell's deployed oracle price cbETH at the bare exchange rate throughout MIP-X43's window?12 blocks from 42,194,663 to 42,538,948: 1.1224 USD to 1.1229 USD
- ✓holdsAt the same blocks, does the Fe oracle price cbETH as cbETH/ETH times ETH/USD from the same feeds?2,091.1616 USD to 2,243.1581 USD, asserted equal at every block to the product of the two feeds' answers
- ✓holdsWhere Moonwell's oracle was right, is the Fe price identical to it?block 42,194,662: 2206683650838065175827 wad, block 42,538,949: 2091161605700000000000 wad, identical
- ✓holdsIs MIP-X43's misconfiguration rejected in each form it can take, and at which layer?compile: 8-0000 type mismatch; bind: WrongDecimals; read: AnswerOutOfBand
Wherever it is made.
| Layer | The mistake, made as | Outcome |
|---|---|---|
| compile | the cbETH/ETH feed used as cbETH's USD feed | ✓8-0000 type mismatch |
| bind | cbETH/ETH declared as cbETH/USD with 8 decimals | ✓WrongDecimals |
| read | cbETH/ETH declared as cbETH/USD with 18 decimals | ✓AnswerOutOfBand |
| external assumption | a wrong feed declared with the decimals it reports and a band its answer falls in | !every on-chain check accepts it |
| review | the same kind of feed, before deployment: Chainlink's cbETH/USD feed declared as ETH/USD | ✓make feeds: listed as CBETH / USD |
pub const CBETH_ETH: Feed<CBETH, ETH> = feed(
Address::new(0x806b4Ac04501c29769051e42783cF04dCE41440b),
decimals: 18,
max_age: 90_000,
min_wad: WAD,
max_wad: 3 * WAD / 2,
)
pub const ETH_USD: Feed<ETH, USD> = feed(
Address::new(0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70),
decimals: 8,
max_age: 1_800,
min_wad: 100 * WAD,
max_wad: 100_000 * WAD,
)// MIP-X43 listed cbETH with the markets priced by one USD feed,
// and gave it the cbETH/ETH exchange rate as that feed.
pub const CBETH_USD: Feed<CBETH, USD> = CBETH_ETH
error[8-0000]: type mismatch
expected `Feed<CBETH, USD>`, but `Feed<CBETH, ETH>` is given
// The fix: price cbETH in USD through both legs.
pub const CBETH_USD: ViaEth<CBETH> = ViaEth { leg: CBETH_ETH, eth_usd: ETH_USD }The one fact no chain check can see, checked against Chainlink.
No check on chain can prove an address is the feed it is declared to be. Chainlink's published directory lists every feed's address with its pair, decimals and heartbeat. feed_check.py requires each declaration to match it, and the chain to agree. It runs here on the registry, and on two wrong declarations that both compile. The second passes every check Dimension makes on chain.
- ✓holdsIs every feed in Moonwell's registry the feed Chainlink lists at its address, as the chain reports it?CBETH_ETH is "CBETH / ETH": 10 of 10 checks; ETH_USD is "ETH / USD": 10 of 10 checks
- ✓holdsIs MIP-X43's declaration, the cbETH/ETH feed as cbETH/USD, rejected before deployment?declared CBETH/USD, listed CBETH/ETH. Chainlink lists CBETH/USD at 0xd7818272B9e248357d13057AAb0B417aF31E817d (8 decimals, heartbeat 1,200 s)
- ✓holdsIs a wrong feed rejected even when it compiles and passes every check Dimension makes on chain?the cbETH/USD feed declared as ETH/USD compiles, and on chain its decimals, answer, freshness and band all pass: 1,858.68 USD per ETH, while ETH/USD reads 1,625.55 USD per ETH. feed-check: declared ETH/USD, listed CBETH/USD
dimension feeds src/registry.fe --network baseChecked at Base block 60,035,414. The trust that remains is in Chainlink's own directory, at review time.
Every fact read from Base, and checked again by the fork test.
| Moonwell's oracle | 0xEC942bE8A8114bFD0396A5052c36027f2cA6a9d0 |
| The cbETH market | 0x3bf93770f2d4a794c3d9EBEfBAeBAE2a8f09A5E5 |
| Last block priced correctly | 42,194,662 |
| MIP-X43 executes | block 42,194,663, 0xd26baf29…3ae812 |
| The fix executes | block 42,538,949, 0xd1c363de…8043c5 |
| Chainlink cbETH/ETH | 0x806b4Ac04501c29769051e42783cF04dCE41440b |
| Chainlink ETH/USD | 0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70 |
The oracle and the mistake on Base Sepolia, read live →
The full record, block by block →