
What if I told you that Mirror Protocol, up until 18 days ago, was susceptible to the one of the most profitable exploits of all time, allowing an attacker to generate $4.3m from $10k in a single transaction? Here's how I discovered this - by pure serendipity. 

-
Show this thread
-
Let's go back to May 9th, when a Mirror contract migration to fix short rewards locked people's funds by accident. We've discussed this before - that's not the point. But take a look at this thread. https://forum.mirror.finance/t/was-there-a-security-hole-in-the-lock-contract/3390 … (1/12)
3 replies 7 retweets 149 likesShow this thread -
It appears that OP is indeed correct - Mirror developers smuggled in a major bug fix without announcing it or telling anyone that this bug ever existed, which is slightly infuriating, but what can you do. So how exactly did this bug work? (2/12)
4 replies 8 retweets 141 likesShow this thread -
The Mirror Lock contract (that locks your collateral for 14 days when you short) lets you call an unlock function to unlock collateral via a list of position IDs. But they left out something crucial... A duplicate check. This fix was quietly smuggled in 18 days ago. (3/12)pic.twitter.com/hOBJ2Wfnnb
4 replies 21 retweets 203 likesShow this thread -
The problem with having no duplicate check is an attacker can create a short position, and after 14 days, they could call their position ID multiple times in a list. This would let them steal funds from the lock contract over and over at little cost and zero risk. (4/12)
2 replies 12 retweets 164 likesShow this thread -
So - this bug exists and was quietly patched up - but we don't know if anyone ever noticed it or exploited it before. It would be hard to check since you would need to sift through months of chain data and millions of transactions - the Mirror forum didn't bother. (5/12)
1 reply 9 retweets 145 likesShow this thread -
Call it luck, magic, or God's will - whatever you believe in - a source fell into my lap inadvertently revealing that this attack had indeed been executed hundreds of times since 2021. Before today, this was not known by anyone at all. Let's go meet the attacker, shall we? (6/12)
1 reply 14 retweets 183 likesShow this thread -
I happened to look at a DM (I can only read a fraction of my DMs!) and almost binned it, but something in me told me to look into the address. The man was right - the address indeed had eerily perfect timing, almost as if they had word directly from TFL. Besides the point. (7/12)pic.twitter.com/U2mJk38ub5
9 replies 25 retweets 223 likesShow this thread -
Replying to @FatManTerra
AgitatedBroccoli Retweeted AgitatedBroccoli
a few addresses started swapping ust to luna on chain a few hours before halt, they made millions, probably luna insidershttps://twitter.com/AgitatedB/status/1530021634932756481 …
AgitatedBroccoli added,
2 replies 2 retweets 9 likes
-
-
Replying to @FatManTerra @AgitatedB
Doesn’t it mean that they know something about Luna classic?
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.