Hacks
Mirror, 8 October 2021
Data as of 22 November 2026
DefiLlama's record lists Mirror on 8 October 2021, with $90.0M lost on Terra Classic, classed as Access Control, technique Improper Access Control. By amount it is the 47th largest of 1,373 incidents in the record, and the 10th largest of 2021. The account below is ours, written from the sources it links; the figures are DefiLlama's, as of 22 November 2026, and the record does not say whether they are before or after any recovery.
- Amount recorded$90.0M
- Date8 October 2021
- ClassAccess Control
- TechniqueImproper Access Control
What happened
Mirror Protocol, a Terra application on which users could bet against stocks, lost about $90 million in October 2021 to a flaw in its lock contract, and the loss went unnoticed for some seven months, The Block reported. A Terra community analyst known as FatMan came across the old transactions in May 2022, and the security firm BlockSec confirmed the exploit from the attack transaction.
How it worked
Users who bet against stocks had funds held in a lock contract for at least 14 days, and each locked position carried an ID (The Block). When a short position opened, the UST from selling the minted asset went to that contract. The attacker first sent 100,000 UST straight to the lock contract, then opened a short position with 10 UST of collateral. When the contract recorded the new position it worked out the locked amount from its own balance, so the position was credited with about 100,004 UST instead of about 4. The attacker opened many such positions, priming each with between 1,000 and 100,000 UST (BlockSec).
The unlock function took a list of position IDs and never checked it for repeats. In the attack transaction position 43186 appeared 437 times, releasing about 43.7 million UST in one call, and other positions were emptied the same way (BlockSec). The attacker could thus unlock hundreds of times more collateral than they had put in (The Block).
Afterwards
The fix reached Mirror’s public code on 14 May 2022 in a commit titled “Short reward cap to 80% + bugfix”, which made the unlock function reject a duplicate position ID; the commit did not mention an exploit (GitHub). The Block reported that the bug was fixed quietly as UST was collapsing, that community members raised the possibility of an exploit in a governance discussion a week later, and that it was unclear whether Mirror’s developers knew. Neither Mirror nor Terraform Labs answered its request for comment. It attributed the long silence partly to Mirror’s website having no view of total collateral, and cited BlockSec’s view that fewer people scanned Terra for problems than Ethereum (The Block). BlockSec called silently patching a bug already exploited in the wild poor security practice (BlockSec).
As the old loss came to light at the end of May 2022, Mirror was being drained again by a different route. The Block reported that the cause was unconfirmed but appeared to lie in the price oracle: the founder of Block Pane, a validator operator, said most Terra Classic validators were running an outdated version that valued LUNC at 5 UST. FatMan estimated that more than $2 million had been taken from Mirror’s pools so far (The Block).
Account reviewed 22 November 2026. The facts in it come from the sources linked in the text; the figures above are DefiLlama's record, which places it on Terra Classic and files the target as DeFi Protocol.
In DefiLlama's record
| Date | Incident | Class | Technique | Chains | Amount |
|---|---|---|---|---|---|
| 2021-10-08 | Mirror | Access Control | Improper Access Control | Terra Classic | $90.0M |
More from the record: every incident in 2021, Access Control, Improper Access Control, and the whole record.
Other large incidents in 2021
Source: DefiLlama, retrieved 22 November 2026, under its open methodology. Figures are a dated snapshot, not a live feed.