Reproduced Exploit
Pheasant: reentrancy lets a relayer pull 90 from a 100 bond
Chain
Other
Category
reentrancy
Date
Jun 2024
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
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. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 60329-reentrancy-lets-relayer-withdraw-more-than-expected-by-bond. Standalone Foundry PoC and full write-up: 60329-reentrancy-lets-relayer-withdraw-more-than-expected-by-bond_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/reentrancy/single-function
finalizeWithdrawalBond transfers the requested amount A before clearing withdrawalAmount or reducing totalLocked. The bond token callbacks into the relayer. The relayer bonded 30 and another relayer bonded 70, so totalLocked is 100 and A is 30. Each re-entry pulls another 30 while the request is still open. Three pulls succeed. 10 remains, which is 100 % 30. The relayer receives 90, of which 60 belonged to the other relayer.
uint256 A = withdrawalAmount[msg.sender];
require(token.balanceOf(address(this)) >= A, "short");
token.transfer(msg.sender, A); // @> VULN: callback before the request is cleared
if (totalLocked >= A) totalLocked -= A;
withdrawalAmount[msg.sender] = 0;
Diagrams#
Impact#
The relayer receives 90 tokens. The bond contract keeps 10. totalLocked ends at 10, so the other relayer's 70 is no longer backed. The fixed function clears the request and decreases the bond before the transfer, and the callback's second entry reverts. The relayer receives 30 and 70 stays in the contract.
PoC#
cd 60329-reentrancy-lets-relayer-withdraw-more-than-expected-by-bond_exp
forge test -vv
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 60329-reentrancy-lets-relayer-withdraw-more-than-expected-by-bond_exp (evm-hack-registry mirror).
- AuditVault finding: 60329-reentrancy-lets-relayer-withdraw-more-than-expected-by-bond.
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.