hats-finance / HATs-Arbitration-Contracts-0x79a618f675857b45934ca1c413fd5f409cf89735

MIT License
0 stars 0 forks source link

Vaults will not remain undestroyable after EIP-4758 #2 #57

Open hats-bug-reporter[bot] opened 8 months ago

hats-bug-reporter[bot] commented 8 months ago

Github username: -- Submission hash (on-chain): 0x3572eba3c9924552abf6819ec00b56814e496c55adcdd4f8ebe8a30bd98b1e52 Severity: low

Description: Description

After EIP-4758, the SELFDESTRUCT op code will no longer be available. According to the EIP, "The only use that breaks is where a contract is re-created at the same address using CREATE2 (after a SELFDESTRUCT)".

Every function involving the use of the selfdestruct will fail unexpectedly and the lock will still remain intact. FOr instance, lock owners will no be able to revoke the locks.

Attachments

  1. Proof of Concept (PoC) File

TokenLock.release() L153

TokenLock.withdrawSurplus() L172

TokenLock.revoke() L189

TokenLock.trySelfDestruct() L447

  1. Revised Code File (Optional)

I'd suggest reworking the contract architecture to avoid the issue.

jellegerbrandy commented 8 months ago

This is true, but we are not coding defensively against possible future versions of Solidity that are not backwards compatible. The scope of the audit are the current solidity files are compiled by the given solidity version.