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
When a proxy is deployed, the input parameters are validated in a strategy contract (which is also an input). The proxy deployment should revert if the strategy contract does not implement the method assertValidInitParams, thus not validating the parameters.
Motivation
While this is an edge case where a user inputs a rogue strategy contract at governance deployment, the end result is that the user won't be able to re-deploy another governance proxy with the same name after realizing the mistake. This is relevant for multi-chain governance proxies. Also, if the user inputs a rogue strategy smart contract address (which must be a smart contract indeed), does not realize the mistake, and transfers ownership of another contract to said governance, no proposal can be made, voted on, and the implementation cannot be upgraded.
Specification
To revert pool initialization without error if IRigoblockGovernanceStrategy.assertValidInitParams(params) does not execute, i.e., also in the case it fails silently (as with a smart contract that does not implement the method). The result can be achieved without assembly or low-level calls by using a try/catch statement.
gabririgo
changed the title
fix[Governance]: prevent proxy deploy with rogue strategy contract
fix(governance): prevent proxy deploy with rogue strategy contract
Dec 2, 2023
gabririgo
changed the title
fix(governance): prevent proxy deploy with rogue strategy contract
Prevent governance proxy deploy with rogue strategy contract
Mar 6, 2024
Summary
When a proxy is deployed, the input parameters are validated in a strategy contract (which is also an input). The proxy deployment should revert if the strategy contract does not implement the method
assertValidInitParams
, thus not validating the parameters.Motivation
While this is an edge case where a user inputs a rogue strategy contract at governance deployment, the end result is that the user won't be able to re-deploy another governance proxy with the same name after realizing the mistake. This is relevant for multi-chain governance proxies. Also, if the user inputs a rogue strategy smart contract address (which must be a smart contract indeed), does not realize the mistake, and transfers ownership of another contract to said governance, no proposal can be made, voted on, and the implementation cannot be upgraded.
Specification
To revert pool initialization without error if IRigoblockGovernanceStrategy.assertValidInitParams(params) does not execute, i.e., also in the case it fails silently (as with a smart contract that does not implement the method). The result can be achieved without assembly or low-level calls by using a try/catch statement.
Notes
An implementation has been proposed here and includes updates to the ci test suite.
The text was updated successfully, but these errors were encountered: