Reproduced Exploit
A rejected price update still moves cumulativePrice
updatePrice adds averagePrice * elapsedTime into cumulativePrice, then computes the average, then rejects the update when currentPrice is outside maxSlippage. The add is already stored when the function returns false.
Loss
cumulativePrice ends at 40,000. The same two updates write 30,000 when the add waits for the check
Chain
Ethereum
Category
oracle
Date
Jan 2026
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack replays in your browser. Step through it by Solidity line or by opcode.
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 65739-h-11-cumulativeprice-is-corrupted-when-price-updates-are-rej. Standalone Foundry PoC and full write-up: 65739-h-11-cumulativeprice-is-corrupted-when-price-updates-are-rej_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/oracle/cumulative-price · vuln/logic/check-order
Key info#
| Field | Value |
|---|---|
| Loss | cumulativePrice ends at 40,000. The same two updates write 30,000 when the add waits for the check |
| Vulnerable contract | Oracle.updatePrice |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit at 0x15452ec016c4dc8c549e7fe6ff4b26324ea8b7a4 |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2026-01 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | cumulativePrice += averagePrice * elapsedTime runs before the slippage check returns false |
TL;DR#
updatePrice adds averagePrice * elapsedTime into cumulativePrice, then computes the average, then rejects the update when currentPrice is outside maxSlippage. The add is already stored when the function returns false.
The finding's numbers are the inputs. cumulativePrice starts at 10,000, averagePrice at 100, and maxSlippage is 10. After 100 seconds a price of 200 is rejected, and cumulativePrice is 20,000. After another 100 seconds a price of 105 is accepted and cumulativePrice is 40,000. The control keeps 10,000 on the rejected call and stores 30,000 on the accepted call. The gap is the finding's extra 10,000.
The vulnerable code#
lastElapsed = elapsedTime;
cumulativePrice += averagePrice * elapsedTime; // @> VULN: a rejected update still keeps this add
computedAverage = average;
lastAccepted = false;
Impact#
Every later TWAP is computed from a cumulative that includes the rejected interval. The worked example is 40,000 against the control's 30,000.
How to reproduce#
cd 65739-h-11-cumulativeprice-is-corrupted-when-price-updates-are-rej_exp
forge test -vv
test_exploit_rejected_update_leaves_40000 asserts cumulativePrice 40,000 and a 10,000 marker. test_control_rejected_update_lands_on_30000 asserts the rejected call leaves 10,000 and the accepted call stores 30,000.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/65739-h-11-cumulativeprice-is-corrupted-when-price-updates-are-rej.md
- Code4rena report: Olas, 2026-01
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 65739-h-11-cumulativeprice-is-corrupted-when-price-updates-are-rej_exp (evm-hack-registry mirror).
- AuditVault finding: 65739-h-11-cumulativeprice-is-corrupted-when-price-updates-are-rej.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.