In the Clarifications section of EIP 1014 (create2) it says that "This EIP makes collisions possible."

It doesn't explain how collisions are now possible, but it links to EIP 684 (Prevent overwriting contracts), which says "Currently this is not an issue because there is no way to create a contract with the same address twice without spending >2^80 computational effort to find an address collision, but with #86 this will change."

So, now I'm a little confused. Is it that create2 now requires less than 2^80 to find a collision? Or does this sentence refer only to the case when a create2 is called twice with the same arguments resulting in the same address?


Simple !

The standard ᴄʀᴇᴀᴛᴇ opcode uses the nonce counter of the calling address to compute the target address of the contract. Whether contract’s creation fails or succeeds, the nonce is still increased which means the old nonce can’t be used again.
Thus, before ᴄʀᴇᴀᴛᴇ2, you needed to find a cryptographic hash collision in order to deploy a contract’s code at the same address.

That’s because it’s something unlikely, that ᴇɪᴘ 684 wasn’t thought before ᴄʀᴇᴀᴛᴇ2 because ᴄʀᴇᴀᴛᴇ2 doesn’t uses the account nonce for computing the deployment address.

The point you should understand here is while calling ᴄʀᴇᴀᴛᴇ2 twice with the same arguments would yield the same deployment address, doing the same with a normal ᴄʀᴇᴀᴛᴇ does not.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.