isotile ๐Ÿฆ‡๐Ÿ”Š Profile picture
Decentralized Metaverse based on Ethereum Join #1 Metaverse of #NFTS by creating your room for free! Join us here: https://t.co/J75fmtxAfn

Feb 20, 2022, 8 tweets

๐Ÿ’พ TECHNICAL THREAD OF NFTs HACK ๐Ÿ’พ

First of all we need to understand the difference between CALL and DELEGATECALL EVM Opcodes

In a simple way; when you call a contract with delegatecall, it is as if you embed the called function inside the contract itself

๐Ÿงต 1/8

Opensea uses Wyvern Protocol, which is the most optimal fees-wise peer-to-peer exchange protocol

But it has also a disadvantage: when you sign a malicious message, the counter-part can execute that signed message for you

๐Ÿงต 2/8

In order to be able to execute arbitrary code in which two peers agree, the following possibilities must exist within the protocol:

CALL and DELEGATECALL

๐Ÿงต 3/8

โš ๏ธ Hackers only needed ONE signature from you to steal all your approved NFTs

This signature:
#โƒฃ "My approved Opensea Proxy contract is going to make a DELEGATECALL to the hacker contract function transferNFTs" in unreadable form

๐Ÿงต 4/8

The hackers can execute that transaction whenever they want

And they have generalized the code so that they can calmly choose which NFTs they want to steal from you

๐Ÿงต 5/8

After 28 days of storing signatures, the hackers decided to execute the hack

Their code travels into this diagram till they successfully stole your NFTs

๐Ÿงต 6/8

โœ… Proposed solution:
A new signing message standard in which wallets inject the domain at the end of the signature

And older signatures that are not using the new standard appear in red โŒ

@MetaMask @myetherwallet @TrustWallet @CoinbaseWallet

๐Ÿงต 7/8

๐Ÿ“ข This thread is what we think has happened

Investigation is still ongoing and we should wait to official sources from @opensea

๐Ÿงต 8/8

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling