Last weekend an attacker was able to gain control of the Optimism addresses that correspond to various Gnosis Safe multisigs on Ethereum that had not yet been deployed to Optimism. A quick thread on security in the multi-chain world ~~
As a quick upfront note, this incident was not the result of any vulnerability in Optimism or Gnosis Safe, but instead stemmed from (reasonable) security assumptions made in an old version of Gnosis Safe long before multi-chain was a vibrant reality.
Let's quickly explain what happened. Older versions of Gnosis Safe factory contracts were deployed via transactions without a chain ID (non EIP-155 tx). This meant it was possible to replay these transactions on chains other than Ethereum.
In some ways, this is really useful. It means that the same factory can be deployed to every chain at the same address. And that's exactly what happened -- the factory was deployed to Optimism.
Unfortunately, at the time in which this older factory contract was being used, it seems that the Gnosis Safe UI sometimes used the function createProxy which created multisigs via CREATE instead of CREATE2.
Unlike CREATE2, the address of a contract created via CREATE is not based on the code being used to create the contract and is only based on the nonce of the creator address.
This means that it was possible for the attacker to deploy the old Safe factory to Optimism and begin to trigger the createProxy function repeatedly to create the multisigs on L2.
However, because createProxy uses CREATE and not CREATE2, the attacker was able to initialize these multisigs so that they were owned by the attacker.
Users often assume that any account they can access on Ethereum will also be accessible on other EVM-based chains. For externally owned accounts (aka non-contract accounts), this is generally true.
The same does not necessarily apply to smart contract accounts. Contracts can be created at the same address on different chains with completely different code and, as a result, completely different owners.
Misunderstandings like this can have serious real-world consequences. Last week, Wintermute accepted a loan of 20m OP tokens to an L1 multisig wallet they believed they could access on L2. This L2 address was one of the multisigs later deployed by the attacker.
These are the growing pains of a multi-chain world. It's an unfortunate event, but it highlights the importance of designing systems for multi-chain users. CREATE2 and deterministic deployment is critical, especially for contract wallets.
If you're using a multisig wallet on Ethereum, I highly recommend that you take the time to understand the security properties of your wallet and whether or not you will control that wallet on chains other than Ethereum.
When in doubt, if receiving funds on a new chain, attempt to execute transactions from your account on the chain on which those funds are being received. Don't just assume that you will have access everywhere -- confirm it.
This isn't the first time something like this has happened, and it probably won't be the last. Be careful out there, especially when dealing with large balances. You can never be too cautious in the face of immutability.
And a final PSA because it's really important: this is *not* specific to Optimism! Same thing could happen on any chain. Confirm that you have control of an account by transacting from that account.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with smartcontracts (✨🔴_🔴✨)

smartcontracts (✨🔴_🔴✨) Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @kelvinfichter

Jun 6
Worth reading the Drop Day retro, lots of lessons learned here.
We forgot to update the permalink, but one important thing we added to the retro was that OP Labs has been (before Drop #1) in the process of restructuring its engineering teams around products instead of functions.
Generally I think this restructure will have some of the biggest impact on issues like these going forward since it reduces the amount of communication that has to happen between teams -- all the right people to ship a product are already in a team together.
Read 4 tweets
May 31
Wild that we still consider the naive TVL metric as a good signal. Must be better options. FWIW I don't think any one of the listed options here actually matters "most" -- we should create complex metrics that factor in multiple signals to tell a more intricate story.
Ok let's jam on how to make good metrics. We have signals like TVL, fee revenue, gas per second, security budget, cost per unit gas, etc. Let's try to balance out some common issues and see where we get.
TVL can be (and is being) gamed, often via VCs who park large sums of $$$ on a chain. This is problematic only because the VCs tend not to actually do anything with these funds, so it doesn't improve the chain experience (e.g. by acting as liquidity).
Read 6 tweets
May 30
HOP Sybil strategy is really cool BUT I think other projects need to be very careful if they're thinking about following in HOP's footsteps.
HOP methodology is not a replacement for initial Sybil filtering. If you don't do any filtering upfront, you *will* create a massive incentive for farmers who eventually just self-report for the "finders fee".
Self-reporting is also the main issue with this in general. If the guaranteed return of the finders fee is more valuable than the expected return of farming a standard drop, you may actually see *more* tokens go to farmers than before.
Read 8 tweets
May 30
Some vague thoughts on the subject of SBTs:
- V et al brought distributed identity back into the mainstream crypto consciousness for the first time in a decent while
- Not sure how much of the paper is entirely new thought and how much of it has already been discussed
- I'm sure lot of this stuff has been talked about before, though with different language
- Different language can inspire new thinking
- Academic paper format may have been off-putting for some (and communication medium is important)
- No one is arguing for real non-transferability on SBTs, which makes them essentially identity tokens temporarily attached to a given address
- V is very effective at putting stuff into the crypto public consciousness
Read 4 tweets
May 18
We all know Optimistic Rollups need to build fault proofs. But did you know there are actually four different levels of fault proofs? 👀👀 A behind-the-scenes thread on the truth behind Optimistic Rollup proof systems 🔴✨
(gotta give you a clickbait title or I know you wouldn't even bother clicking a thread about fault proofs and you know it, deal with it nerds)
Fault proofs are the mechanisms that are meant to give Optimistic Rollup systems that oh-so-desirable Ethereum-level security they're after. What's you might not know about fault proofs is that *they can actually have four (!) different levels of security*.
Read 15 tweets
Apr 17
Another "crypto hack made simple" thread for ya. @BeanstalkFarms, a DeFi protocol, was just exploited for about $75m worth of Ether (~25k ETH). Here's how the heist went down.
Here's the transaction on Etherscan if you want to follow along with this thread: etherscan.io/tx/0xcd314668a…
Before I get started, you should know that at the core of this hack was something known as a "flash loan". It's an interesting mechanism unique to crypto that can be used to carry out exploits like this.
Read 29 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(