Please Note: all opinions expressed here are my own.
What’s Going On?
A bug has been found by @RedManStan (Stuart Salamon) in the 0xBTC contract, which if exploited, would bring mining to a complete, permanent halt. No new tokens could ever be mined.
Your existing tokens, however, are safe, whether the bug is exploited or not. You will always be able to trade them, transfer them, bridge them to any of the existing L2s, use them in dApps, or do whatever else you can do with ERC20 tokens. Your tokens are safu!
The only thing that would be affected would be mining. Nobody would be able to mine any new tokens. The total number of tokens in circulation would therefore be fixed at whatever had been mined up to that point.
Could this bug be triggered randomly at any time?
No. This bug could not be triggered during normal mining operations, or any other regular ERC20 token activities, like transfers, swaps, etc. This bug can only be triggered if certain very unusual and difficult to achieve events are forced to occur. It would need to be done by a determined attacker with specialized programming skills and access to significant hash power.
Can the attacker steal my tokens? Can my wallet be drained?
No, your tokens are safe. You can hold on to your 0xBTC tokens as long as you wish, or do anything else with them that you would normally do with an ERC20 token.
What would it take for someone to exploit this bug and halt mining operations?
Can this bug be fixed?
No. The 0xBTC contract is immutable. It does not have any “upgrade” capabilities.
Can we deploy a new contract? Like 0xBTC v2.0?
Yes, and there appear to be some people working on it already.
Here are a few points to consider regarding a new replacement contract:
I’m a miner. What should I do?
For now, just keep mining. There is no reason to panic. But you should consider the options going forward and decide what you are going to do.
Visit the 0xBTC discord and read/participate in discussions about what is happening and what to do.
What is the nature of the bug? [Technical]
The bug is triggered when two mint transactions are executed in the same ETH block. The first mint needs to be a solution for whatever the current challenge is at that time, and the second mint needs to be a solution for the new challenge that would result from the first mint, ie. the block hash of the preceding ETH block.
After that point, due to a flaw in the contract code, all further attempts to mint new tokens would result in failed transactions (reverts).
How exactly would the exploit be carried out? [Technical]