Skip to content

Commit

Permalink
Merge pull request #19 from darianchan/patch-1
Browse files Browse the repository at this point in the history
Update Security-Guide.md
  • Loading branch information
engn33r authored Mar 12, 2024
2 parents 95189f5 + f0a86dd commit 480b1d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/Security-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ None?

[Playground Link](https://github.com/YAcademy-Residents/Solidity-Proxy-Playground/tree/main/src/metamorphic_rug)

The CREATE2 opcode was introduced in the Constantinople hardfork with [EIP-1014](https://eips.ethereum.org/EIPS/eip-1014). It allows a contract to be deployed at an address that can be calculated in advance, unlike the CREATE opcode. It is possible to deploy a contract with `selfdestruct`, destroy the contract, and then deploy a new contract with different code at the same address as the original contract. If a user is unaware that the code at this address changed since they originally interacted with the contract, they might end up interacting with a malicious contract. The planned removal of the `selfdestruct` opcode with [EIP-4758](https://eips.ethereum.org/EIPS/eip-4758) will remove the ability to create metamorphic contracts in the future.
The CREATE2 opcode was introduced in the Constantinople hardfork with [EIP-1014](https://eips.ethereum.org/EIPS/eip-1014). It allows a contract to be deployed at an address that can be calculated in advance, unlike the CREATE opcode. It is possible to deploy a contract, destroy the contract with `selfdestruct`, and then deploy a new contract with different code at the same address as the original contract. If a user is unaware that the code at this address changed since they originally interacted with the contract, they might end up interacting with a malicious contract. The planned removal of the `selfdestruct` opcode with [EIP-4758](https://eips.ethereum.org/EIPS/eip-4758) will remove the ability to create metamorphic contracts in the future.

### Testing procedure

Expand Down Expand Up @@ -273,4 +273,4 @@ None?

### Further reading

- [Manticore detection of nonexistent contract](https://github.com/trailofbits/manticore/pull/1119)
- [Manticore detection of nonexistent contract](https://github.com/trailofbits/manticore/pull/1119)

0 comments on commit 480b1d8

Please sign in to comment.