Try   HackMD

Impact Analysis of Neutering SELFDESTRUCT - Dev Update #2

This is the second update for my CDAP Project, which is about analyzing the existing uses of the SELFDESTRUCT opcode in Ethereum.

Progress since last update

Since the last update, I have focused on analyzing existing uses of redeployed contracts, which is a contract that is deployed at the same address as a selfdestructed contract. Since redeploying a contract will no longer be possible if SELFDESTRUCT is neutered, this is an interesting use case to analyze.

The analysis revealed that disabling or neutering SELFDESTRUCT opens a security risk to uninformed users of a contract used by Pine Finance. In short, users of this contract send tokens to an predetermined address called a vault. Relayers then trigger a function in the PineCore contract to create a new contract at this predetermined address using CREATE2, which executes a trade and then self destructs. Under the current behaviour, it is possible for a user to use the same vault several times. If SELFDESTRUCT is neutered, however, this would no longer be possible. In fact, if a user then tried to send tokens to a used vault, anyone could steal the tokens in the vault.

The full analysis is hosted here.

What to do next

Based on the analysis, I will suggest trying to preserve SELFDESTRUCT when switching to Verkle trees. There are several ways this may be done, so I will write down the different options as diffs to the current Verkle tree proposal and evaluate them.