Quixotic Hack
What happened
On 2022-07-01 an attacker drained ERC-20 tokens, mainly OP and USDC, from users of Quixotic, then the largest NFT marketplace on Optimism. These users had approved the marketplace contract to spend tokens so they could make offers, and a recently updated version of the contract let anyone spend those approvals. Apetimism warned about attacks on the Offer feature at about 05:36 UTC.
One researcher counted 688 affected accounts. The largest reported transfers out were 110,756 USDC and 170,882 OP. CryptoSlate put the total at over $100K; the same researcher estimated around 214K OP lost.
Quixotic paused the marketplace and promised to refund all stolen ERC-20 tokens. NFTs were not affected.
How it happened
- The attacker deployed its own NFT contract and signed a sell order for one of its tokens, naming
OPas the payment token. - The attacker called
fillSellOrderon the Quixotic contract and passed a victim's address as thebuyerparameter. - The function checked only that the sell order carried a valid seller signature. It never checked that the buyer had signed or agreed to the purchase.
- The contract then sent the attacker's worthless NFT to the victim and pulled the price from the victim's wallet with their existing ERC-20 approval, paying it to the attacker as seller.
- The attacker repeated this against many wallets with open approvals, in
OP,USDCand other offer currencies.
Protocol details
Evidence
- report Apetimism warning thread on Quixotic Offer feature twitter.com
- report 1nf0s3cpt analysis tweet (attacker wallet, affected accounts, fillSellOrder) twitter.com
- transaction Optimism tx 0x5dc519726e1236eb846271f6699e03cdd1a8fd593a2900c71cd2aabbdb7c92e6 optimistic.etherscan.io
- transaction etherscan.io transaction 0x2a82…647f etherscan.io
- code DeFiHackLabs: 20220701 Quixotic - Optimism NFT Marketplace, with Quixotic_exp.sol github.com
- analysis Optimism NFT marketplace Quixotic suffers exploit following contract update cryptoslate.com
- analysis Web Archive archive.ph
- analysis DeFiLlama defillama.com
- analysis Optimism's Quixotic Hacked, Promises to Reimburse All Affected Users cryptopotato.com
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.