-
Notifications
You must be signed in to change notification settings - Fork 10
alexzoid - Incompatibility of Upgradeability Pattern in TitlesGraph Contract #445
Comments
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Responded in #272. Borderline low/medium. Tending towards low because in earlier contest issues like this were considered low. |
I think you are confusing this issue with #281, which is an entirely different problem. There are at least 3 different issues being grouped here, see #272 (comment) |
Medium due to rules (https://docs.sherlock.xyz/audits/judging/judging#v.-how-to-identify-a-medium-issue): Breaks core contract functionality. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
The protocol team fixed this issue in the following PRs/commits: |
The Lead Senior Watson signed off on the fix. |
alexzoid
medium
Incompatibility of Upgradeability Pattern in TitlesGraph Contract
Summary
The
TitlesGraph
contract is designed to be upgradeable, utilizing theUUPSUpgradeable
pattern. However, it's instantiated via a constructor in theTitlesCore
contract setup.Vulnerability Detail
In the
TitlesCore
contract,TitlesGraph
is instantiated directly using a constructor rather than being set up as a proxy. This could lead to unexpected behavior when attempting to upgrade the contract, as the proxy would not have access to the initialized state variables or might interact incorrectly with uninitialized storage.Impact
Inability to leverage the upgradeability.
Code Snippet
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/TitlesCore.sol#L44-L49
Tool used
Manual Review
Recommendation
Deploy the
TitlesGraph
contract without initializing state in the constructor. Deploy a proxy that points to the deployedTitlesGraph
implementation. Correct approach using a proxy pattern for upgradeable contracts:The text was updated successfully, but these errors were encountered: