Skip to content
Est. MMXXVIVol. VI · № 273RSS
Blockchain Breaches

An archive of cryptocurrency security incidents — hacks, exploits, bridge failures and rug pulls, documented with on-chain evidence.

Dossier № 081Smart Contract Bug

TreasureDAO Marketplace Zero-Price Bug

~$1.4M of NFTs stolen from TreasureDAO's marketplace after the buy function failed to check that quantity produced a non-zero price, enabling free buys.

Date
Chain(s)
Status
Partially Recovered

On March 3, 2022, the Arbitrum NFT ecosystem TreasureDAO had its marketplace exploited — approximately 100+ NFTs (~$1.4M) purchased for effectively zero MAGIC. The marketplace's buy function did not validate that the computed total price was non-zero for a given quantity, so an attacker could buy listed NFTs while paying nothing.

What happened

TreasureDAO's marketplace buyItem computed totalPrice = pricePerItem * quantity. By submitting a quantity of zero (or a value that made the total price round/compute to zero) while still triggering the NFT transfer, the attacker received the listed NFTs without transferring MAGIC. Hundreds of NFTs were drained from active listings before the marketplace was paused.

Aftermath

  • TreasureDAO paused the marketplace and worked with the community on a restitution plan.
  • A number of NFTs were returned by white-hats and recovered; partial restitution followed.

Why it matters

TreasureDAO is a clean input-validation case — a function that performs an asset transfer must validate that every economically-meaningful parameter is in a sane range, including the degenerate cases (zero quantity, zero price) that no legitimate user would ever submit. The same "validate the degenerate case" lesson appears at MonoX (swap a token for itself) and across the catalogue. NFT marketplaces are a recurring instance because their price math (price × quantity, royalties, fee splits) has more arithmetic edge cases than a simple transfer, and the edge cases are exactly where the value leaks.

Sources & on-chain evidence

  1. [01]halborn.comhttps://www.halborn.com/blog/post/explained-the-treasure-dao-hack-march-2022
  2. [02]cryptopotato.comhttps://cryptopotato.com/hackes-exploit-arbitrum-based-marketplace-treasure-over-100-nfts-stolen/
  3. [03]rekt.newshttps://rekt.news/treasure-dao-rekt

Related filings