You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The computeAddress function does not compute the correct address for the would be deployed Vault.
Details
When a contract has constructor parameters, the Create2 opcode needs to account for the parameters that are to be concatenated with the contract's bytecode. In case of the Vault contract the owner parameter is missing and the initCode is incomplete :
Users will call the incorrect address where the call would ultimately fail or worse call a malicious contract where their funds could be at risk. In any case a non dev user will find himself stuck as he cannot use the computed address.
Summary
The
computeAddress
function does not compute the correct address for the would be deployedVault
.Details
When a contract has constructor parameters, the Create2 opcode needs to account for the parameters that are to be concatenated with the contract's bytecode. In case of the
Vault
contract theowner
parameter is missing and the initCode is incomplete :Impact
Users will call the incorrect address where the call would ultimately fail or worse call a malicious contract where their funds could be at risk. In any case a non dev user will find himself stuck as he cannot use the computed address.
Solution
Implement the following changes :
The text was updated successfully, but these errors were encountered: