Normal behaviour
The contract assumes an exact 1:1 correspondence between the value passed to safeTransferFrom
/ safeTransfer
and the amount that actually moves. It also assumes token transfers perform no additional logic beyond moving balances.
Specific issue
Rebasing or fee-on-transfer tokens
A seller deposits _amountToSell
, but the token’s transfer tax or rebase logic reduces the balance that arrives in the contract.
The order records the nominal amount, yet the contract custodies less.
When buyOrder
later calls safeTransfer
for the recorded amount, the transfer under-flows and reverts, permanently locking the order and any USDC paid.
Tokens with hooks / callbacks (ERC-777 or ERC-20 with _afterTokenTransfer
)
During any transfer, arbitrary code can execute and re-enter OrderBook while its state is mid-update, causing logic to run on an inconsistent snapshot (e.g., double purchase or griefing).
These token behaviours are common in today’s DeFi landscape (e.g., stETH rebases, reflective tokens, ERC-777).
Likelihood:Low
Reason: Only possible when owner whitelists such tokens
Impact:
Impact: Orders become unfillable (capital stuck) or re-entrancy creates unexpected executions and draining of funds
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.