3 ms·
Optimism is a blockchain quite a bit like Ethereum, so the "database" mental model might be a bit confusing for a frame here (as it isn't like they are some cen
by saurik 5y ago
Optimism is a blockchain quite a bit like Ethereum, so the "database" mental model might be a bit confusing for a frame here (as it isn't like they are some centralized service), but no: this doesn't let you directly create ETH (which would be much much more devastating); it only lets you create something we might call "OETH", which is Optimism-specific.
The native currency on Optimism (used to pay gas, like ETH is used on Ethereum) is effectively ETH; but, as it isn't Ethereum, that ETH on Optimism has to actually live on Ethereum: it gets locked into a contract there which acts as a repository/reserve for all of the ETH being used on Optimism.
When you deposit ETH in this reserve on Ethereum you get credited the same amount on Optimism in the form of cryptocurrency IOUs (which we might call "OETH"), and you can later withdraw that money back to Ethereum, whereupon the OETH is destroyed and ETH is unlocked from the reserve contract.
The bug here (which I go into detail in in my post-mortem, along with another / different description of how these "bridges" work) was in the VM used for the smart contract behaviors on Optimism, which would mean you could arbitrarily replicate OETH (the IOUs for ETH).
For avoidance of any doubt: you couldn't use this bug to create an arbitrary amount of ETH/Ether, but the issue is that a lot of people call the money on Optimism--which is normally backed 1:1 with ETH--"ETH". (There is a discussion about what it should be called in the Ethereum chains database; I personally think what we need is a terminology for describing the full path whenever you have "ETH via an indirect path".)
- ro-_-b 5y agoThat's very interesting! Thanks for explaining! Let's assume some people would have wanted to bridge OETH back to Ethereum: with the potentially increased supply would it have meant that all the ETH on optimism could have become potentially worthless?
- SilasX 5y agoBut you could drain out all the ETH in the Optimism reserve by asking to withdraw, since you've fooled the network into thinking you own an arbitrary amount of OETH? Which would keep working until the main L1 Eth network rejects transactions for transferring ETH it doesn't have?
- londons_explore 5y agoOr until someone notices... All the balances and stuff are public on the blockchain. It only takes one person to write a script to verify that the locked up amount matches the number of tokens out there. and when it doesn't, alert. That then means any attacker will have to be very quick with their theft, and if so, there is still a good chance whatever coins they get will end up blacklisted or the transactions reversed by a sufficiently large army of upset users who fork the eth network or the L2 network.
- pshc 5y agoThe folks at Optimism would certainly hit the pause button on that withdrawal before it escaped, if there aren't already limits and automatic controls in place. It takes 7 days to withdraw L2->L1 via the standard bridge. (They have administrative controls for now during development, at some point they're supposed to turn it completely permissionless...)
- SilasX 5y agoYou don't have to use the standard bridge though; I've withdrawn in less than five minutes using the Hop bridge/network, which I think just involves an additional fee to a middleman (my L1 transaction for it shows it spending ~0.02 ETH). I can't speak to what additional checks that protocol may have that would have prevented conversion of excess OETH though. Here's the FAQ for it: https://help.hop.exchange/hc/en-us/sections/4405172442509-FAQ https://help.hop.exchange/hc/en-us/sections/4405172442509-FA... Edit: O...kay? Apparently the parent of this comment is aware of alternate, much-faster ways of withdrawing L2->L1, and what their constraints are, but still elected to leave those out and imply the one-week lag was a binding constraint? (Would have posted as a reply, but my comment rate is getting throttled for some reason.)