Prize: Risk-Free Profitable Trades
A relay that auctions block space had a race condition between checking the highest bid and fetching the winner's payload, allowing a malicious builder to swap in a low-value payload after being marked as the winner. An attacker could win the auction without paying the bid, potentially capturing the validator's share of arbitrage profits.
mavlevin.com
Published on mavlevin.com
Every 12 seconds, risk-free profit is auctioned for millions on the Ethereum network. It’s a brutal, PvP fight.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The relay performed a non-atomic check-then-act sequence: it read the highest bid from one Redis key, then fetched the winner's payload from another key, without ensuring the two operations were atomic.
Impact
An attacker could win the auction without paying the bid, potentially capturing the validator's share of arbitrage profits, though the exploit is not reliable and can be performed optimistically.
What the attacker needed
Control over a builder/trader; ability to send requests to the relay; timing faster than Redis round-trip
The fix
The fix was to make the auction atomic by using Redis COPY to combine verification and data movement in a single operation.
How it was found
- Send a valid block with a massive bid to become the highest bidder.
- Immediately after, flood the server with a second request containing a 0 ETH bid, updating the latest payload.
- The relay, still processing the first request, fetches the now-cheap payload but associates it with the old expensive bid.
- The relay sends the low-payout payload to the validator, who signs it expecting the high bid, but receives nothing.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is about a system that auctions the right to include transactions in an Ethereum block. The system checked who had the highest bid, but then separately fetched that winner's latest data, and an attacker could change their data in between. So the attacker could win the auction while paying almost nothing.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.