Reproduced Exploit

The pool price check compares the TWAP with itself

checkPoolAndGetCenterPrice writes the spot into its return variable and later decodes the TWAP into that same variable. The instant price is then derived from the overwritten value, so it matches the TWAP. The deviation is 0 on every call, including a spot of 100 against a TWAP of 200.

Jan 2026•Ethereum•oracle•2 min read

Loss

Spot 100 against TWAP 200 is accepted. The stored deviation is 0. The spot-versus-TWAP gap is 100

Chain

Ethereum

Category

oracle

Date

Jan 2026

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 65730-h-02-variable-overwrite-in-checkpoolandgetcenterprice-create. Standalone Foundry PoC and full write-up: 65730-h-02-variable-overwrite-in-checkpoolandgetcenterprice-create_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/oracle/deviation-check · vuln/logic/price-overwrite

Key info#

FieldValue
LossSpot 100 against TWAP 200 is accepted. The stored deviation is 0. The spot-versus-TWAP gap is 100
Vulnerable contractChecker.check
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit at 0x15452ec016c4dc8c549e7fe6ff4b26324ea8b7a4
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2026-01
Compilersolc 0.8.27, cancun, via IR
Bug classThe return variable starts as the spot and is then overwritten with the TWAP, so the deviation is `
flowchart TD A["Spot is 100 and TWAP is 200"] --> B["The center variable is overwritten with the TWAP"] B --> C["VULN instant price and TWAP are both 200"] C --> D["Deviation is 0 and the 100 gap is accepted"] B --> E["Control keeps the spot"] E --> F["The gap is 100"]

TL;DR#

checkPoolAndGetCenterPrice writes the spot into its return variable and later decodes the TWAP into that same variable. The instant price is then derived from the overwritten value, so it matches the TWAP. The deviation is 0 on every call, including a spot of 100 against a TWAP of 200.

The control keeps the spot and returns |100 - 200| = 100. The quoted check accepts the call because 0 is within the limit of 10.

The vulnerable code#

SOLIDITY
uint256 center = spot;
center = twap;
uint256 instant = center;
deviation = instant > twap ? instant - twap : twap - instant; // @> VULN: instant was derived from the overwritten center
accepted = deviation <= 10;

Impact#

A price gap of 100 passes a check whose limit is 10. Liquidity operations that trust this check proceed at the unchecked spot.

How to reproduce#

BASH
cd 65730-h-02-variable-overwrite-in-checkpoolandgetcenterprice-create_exp
forge test -vv

test_exploit_deviation_is_zero asserts the deviation is 0 and the gap is accepted. test_control_reports_the_spot_gap asserts the gap is 100.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

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.