The SwanManager contract, which follows the upgradeable pattern and is inherited by Swan.sol, does not implement a storage gap mechanism, exposing it to potential storage layout conflicts during future upgrades.
In SwanManager.sol:30
, the contract fails to include a storage padding mechanism that's essential for safely upgrading contracts. This gap is required to ensure that future additions to the contract's storage layout don't interfere with existing storage variables, particularly in inherited contracts. Without this safety measure, adding new state variables in future versions could corrupt the storage layout of contracts in the inheritance chain.
The OpenZeppelin documentation provides detailed information about this requirement: https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable
A missing storage gap in upgradeable contracts presents significant risks when adding new state variables in future implementations. The absence of this protection means that any storage additions to the base contract could potentially overwrite existing storage slots in derived contracts. This limitation severely restricts the ability to evolve the contract safely over time and could lead to data corruption if not addressed.
Manual Review
Implement a storage gap in the SwanManager contract by adding the following at the end of the contract:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.