Reproduced Exploit

Arkham bounty: 900 of 1,000 excess tokens stay locked after close

Jun 2024•Other•dos•1 min read

Chain

Other

Category

dos

Date

Jun 2024

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 60261-excess-funds-are-locked-in-the-bounty-contract-quantstamp-ar. Standalone Foundry PoC and full write-up: 60261-excess-funds-are-locked-in-the-bounty-contract-quantstamp-ar_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/dos/frozen-funds

The bounty comment says excess funding from rejected submissions is accrued as fees. closeBounty only does _accruedFees += fee(excessAccrued, true). fee returns 10% of the excess. A bounty with 1,000 initial funding and 1,000 excess therefore accrues 100, refunds the funder 1,000, and lets the owner withdraw 100. The other 900 remains in the contract with no withdrawal path.

SOLIDITY
excessAccrued = _bounties[bounty].amount - _bounties[bounty].initialAmount;
_accruedFees += fee(excessAccrued, true); // @> VULN: 100 of 1,000
_bounties[bounty].amount = _bounties[bounty].initialAmount;

Diagrams#

flowchart TD A["Bounty holds 1,000 initial plus 1,000 excess"] --> B["closeBounty measures excess of 1,000"] B --> C["Only the 10 percent fee, 100, is accrued"] C --> D["Funder is refunded the initial 1,000"] D --> E["Owner withdraws the 100 fee"] E --> F["900 tokens remain in the contract"]

Impact#

After close and burnAndWithdraw, the bounty contract still holds 900 tokens. The funder has 1,000 and the owner has 100. The fixed close accrues the entire excess, so the owner withdraws 1,000 and the contract balance is 0.

PoC#

BASH
cd 60261-excess-funds-are-locked-in-the-bounty-contract-quantstamp-ar_exp
forge test -vv

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.