Reproduced Exploit
Camp: a dust-sensitive minAmount freezes batchRelease
batchRelease bridges each queued deposit by rounding the amount down with _removeDust, then reverts if that rounded amount is below the depositor's minAmount. bridgeOut stores minAmount without that check. Bob queues 1.0000123 ETH with minAmount 1.0000120 ETH. The 1e13 dust unit floors the amount t…
Loss
Carol's 10 ETH stays in the escrow. Every later batchRelease reverts on the poison deposit
Chain
Ethereum
Category
dos
Date
Undated
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: 62778-malicious-deposit-with-dust-sensitive-minamount-can-cause-de. Standalone Foundry PoC and full write-up: 62778-malicious-deposit-with-dust-sensitive-minamount-can-cause-de_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/dos/frozen-funds · vuln/input-validation/missing · vuln/defi/slippage
Key info#
| Field | Value |
|---|---|
| Loss | Carol's 10 ETH stays in the escrow. Every later batchRelease reverts on the poison deposit |
| Vulnerable contract | Bridge._debitView |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 1970-01 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | minAmount is not checked against the dust-rounded amount |
TL;DR#
batchRelease bridges each queued deposit by rounding the amount down with _removeDust, then reverts if that rounded amount is below the depositor's minAmount. bridgeOut stores minAmount without that check. Bob queues 1.0000123 ETH with minAmount 1.0000120 ETH. The 1e13 dust unit floors the amount to 1.0000100 ETH, the slippage check reverts, and the cursor stays on Bob. Carol deposited 10 ETH behind him. She cannot be paid. A second batchRelease reverts the same way.
Background#
Quantstamp's Camp review of CampTimelockEscrowNativeOFT. batchRelease walks the deposit queue and calls the LayerZero debit path. _removeDust drops decimal dust so the amount can be represented on the other chain. OFTCore then reverts SlippageExceeded when the rounded amount is under _minAmount. There is no try/catch around one deposit, so one bad minAmount stops every deposit behind it. The client fixed this by rejecting a minAmount above the dust-adjusted amount inside bridgeOut.
The vulnerable code#
uint256 amountSentLD = _removeDust(amountLD);
uint256 amountReceivedLD = amountSentLD;
if (amountReceivedLD < minAmountLD) {
revert SlippageExceeded(amountReceivedLD, minAmountLD); // @> VULN: one deposit reverts the whole batchRelease
}
Root cause#
Dust removal and the slippage check run at release time. The queue accepts any minAmount at bridgeOut. Bob picks a minimum that is below his raw amount and above the rounded amount, so the check can only fail, and it fails inside the loop that every later release must enter.
Preconditions#
- The dust unit does not divide the queued amount. Here the unit is 1e13 wei.
minAmountis greater than the floored amount and was not rejected at queue time.- A later depositor is already behind that entry. Carol's 10 ETH is.
Attack walkthrough#
- Alice deposits 10 ETH with
minAmount0. She is index 0. - Bob deposits 1.0000123 ETH with
minAmount1.0000120 ETH. - Carol deposits 10 ETH behind Bob.
batchRelease(1)pays Alice. The cursor moves to Bob.batchReleaseon the remainder hits_removeDust(1.0000123 ETH) = 1.0000100 ETH, which is below Bob's minimum, and reverts. The cursor stays at 1.- The call is repeated and reverts again. Carol's balance is 0. The bridge still holds Bob's deposit plus Carol's 10 ETH.
- The control rejects Bob's
bridgeOut. Alice and Carol are both released and the escrow ends at 0.
Diagrams#
Impact#
Carol deposited 10 ETH and received 0. The escrow still holds that 10 ETH, plus Bob's 1.0000123 ETH, and no later batchRelease can move the cursor. Alice, who was ahead of the poison entry, was paid. The control pays Carol her 10 ETH.
Remediation#
In bridgeOut, require _minAmount <= _removeDust(_originalAmount) before enqueueing. The control uses that require. Bob's deposit never enters the queue, so batchRelease pays Alice and Carol.
How to reproduce#
cd 62778-malicious-deposit-with-dust-sensitive-minamount-can-cause-de_exp
forge test -vv
test_exploit_dust_min_amount_locks_later_deposit asserts Alice holds 10 ETH, Carol holds 0, the bridge balance is Bob's deposit plus 10 ETH, head == 1, and the locked marker is 10 ETH. test_control_rejects_min_above_dust asserts the poison bridgeOut is rejected and both 10 ETH deposits are paid.
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 62778-malicious-deposit-with-dust-sensitive-minamount-can-cause-de_exp (evm-hack-registry mirror).
- AuditVault finding: 62778-malicious-deposit-with-dust-sensitive-minamount-can-cause-de.
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.