ChainBleedv0.1 · open intel
← back to feed·TERRALOGIC2021-10-08 · 4y ago
Incident · DEFILLAMA

Mirror

Duplicate Call Exploit
Estimated loss
$90.00M
VERDICT —AUDIT-CATCHABLE
Replay-protected single-use claim flows are one of the first invariants any reviewer checks on a lock/unlock contract. The missing storage write is visible on a single line of the handler; a basic state-machine review or even a one-position unit test calling release twice would have caught it.
▰ METHOD
Duplicate Call Exploit
LOGICBYTECODE CATCHABLEAI SCANNABLE
Root cause

Mirror Protocol's short-farming lock contract (mirror-lock) tracked unlocked positions by a position_id key but never marked an entry as consumed after release_position transferred its collateral out. The CosmWasm handler read the position struct, dispatched the BankMsg::Send, and returned — without removing or flagging the storage entry. An attacker could therefore call release_position repeatedly on the same position_id, each call passing the maturity check and re-sending the same UST/aUST/mAsset collateral until the lock contract was drained. ~$90M flowed out across hundreds of duplicate-id calls starting 2021-10-08 and went unnoticed for seven months. The vulnerability class is missing state-mutation-after-effect in a withdrawal handler — the CosmWasm analogue of a missing `delete positions[id]` or `claimed[id] = true` write on an EVM withdraw function.

Forensic narrative

Classification: Smart Contract Language. Technique: Duplicate Call Exploit. Target type: DeFi Protocol. Affected chains: Terra. Implementation language: Rust.

Primary source
https://www.theblock.co/post/149342/a-90-million-defi-exploit-on-terra-went-unnoticed-for-seven-months
Sourced from
DefiLlama Hacks dataset · api.llama.fi/hacks
Technical record
chain
terra
protocol
Mirror
bug_class
logic
date_occurred
2021-10-08
loss_usd
$90,000,000
classification
Smart Contract Language
technique
Duplicate Call Exploit
target_type
DeFi Protocol
language
Rust
source_id
dl:260
Related — same bug class· logic
2026-05-13
28d ago
TRON
Transit Finance
Deprecated Smart Contract Exploit
logic
$1.88M
UNRATED
2026-05-13
28d ago
ETH
TAC Cross-Chain Layer (TON Side)
Contract Vulnerability
logic
$2.80M
UNRATED
2026-05-13
28d ago
ETH
Transit Finance
Contract Vulnerability
logic
$1.88M
UNRATED
2026-05-12
29d ago
ARB
Aurellion
Uninitialized Proxy Exploit
logic
$456.0K
UNRATED
2026-05-12
29d ago
BSC
SQ Protocol
Acces Control Exploit
logic
$346.0K
UNRATED
2026-05-12
29d ago
BSC
SQ Protocol
Contract Vulnerability
logic
$346.1K
UNRATED
ChainBleed — live web3 threat intelligence