CHAINDOKU
Crypto scams

Crypto scams · 8 cases

DeFi and contracts

In decentralized finance, smart contracts handle money with no middleman, and a flaw in their logic becomes an open door. Flash loans, skewed oracles, sandwich attacks, stablecoins losing their peg: these cases rebuild the attack transaction by transaction.

When an atomic swap goes wrong

What happened
An atomic swap is only safe if its lock deadlines are set right. Badly chosen, one side can claim everything.
The reflex
Read a contract's terms before locking funds in it, deadlines included.

The case

VictimContract Auditor

The Atomic Swap

A swap that cannot cheat. Yet someone took both sides.

Easy6×6~2 min

The leaked sealed bid

What happened
A bid meant to stay hidden leaked before the reveal: the winner outbid it by a single .
The reflex
A must stay sealed to the end: don't hand it to any middleman.

The case

VictimAuctioneer

The Sealed Auction

Sealed bids, and a winner who outbids by a single token. As if he knew.

Easy7×7~3 min

A gas war during a mint

What happened
During a , everyone outbid each other on fees to go first. In the rush, someone was diverting the refunds.
The reflex
In the rush of a launch, set yourself a fee limit and stick to it.

The case

VictimMint Developer

The Gas War

A mint under siege, fees exploding, and someone siphoning the refunds.

Easy6×6~4 min

How a stablecoin collapses

What happened
A with no real reserve lost its : every redemption minted more and sped up the fall.
The reflex
A is only worth what backs it: ask what is behind it.

The case

VictimPeg Keeper

The Death Spiral

A stablecoin breaks its peg overnight, and every redemption deepens the fall.

Medium8×8~6 min

Oracle manipulation by flash loan

What happened
A flash loan skewed the price an oracle read, and the protocol wrongly liquidated its borrowers.
The reflex
Keep a margin on your loans: a rigged price can liquidate you in a single .

The case

VictimAuditor

The Corrupted Oracle

A price rigged for a single block, and the liquidations fall like dominoes.

Medium8×8~10 min

The domino fall of a wrapped asset

What happened
An asset wrapped, bridged, deposited, then lent with leverage: when one layer gave way, they all fell.
The reflex
The more protocols a yield stacks, the more ways it can break: count the layers.

The case

VictimReserve Auditor

The Nested Token

Six layers of stacked promises. When one gave way, they all collapsed.

Hard8×8~10 min

The sandwich attack

What happened
A bot placed its orders right before and right after the victim's, to take the price gap.
The reflex
Set a low slippage tolerance on your swaps: it limits what a sandwich can take from you.

The case

VictimCross-Chain Engineer

The Cross-Chain Sandwich

A transaction caught in a sandwich, relay after relay, from one chain to the next.

Hard9×9~11 min

The flash loan attack

What happened
In a single transaction, a giant loan skewed a price, drained a pool and was repaid before the ended.
The reflex
Before depositing into a protocol, check that it was audited and where it gets its prices.

The case

VictimDAO Treasurer

The Fatal Flash Loan

Borrow, rig, drain, repay: a whole protocol falls in one transaction.

Hard8×8~12 min