CREATE2 Safe Deploy contract on mainnet (prevents the create2 - selfdestruct - create2 attack vector!)

Hey everyone!

Due to the recent discussions and various articles on some news portals about CREATE2 “bugs” and attack vectors about the possibility to deploy different code at the same address I decided to write a quick contract to prevent against this. The contract can be found on mainnet here here and obviously does not work at this point.

This contract has not been audited so use it at your own risk. It’s not a complicated contract, it simply stores deployed contracts in a mapping and throws if it sees that a contract has already been marked as “deployed” either before or after creation of the contract. The sender can choose what option to use - I tried to reduce as much gas as possible here.

It is impossible for different senders to deploy at the same address since the seed which is provided is hashed with msg.sender. This is obviously different from CREATE2, but in my opinion this is a good feature for this type of proxy contract.

Feedback is well appreciated!

1 Like