Without gaps, adding new storage variables to contracts can potentially overwrite the beginning of the storage layout of the child contract, causing critical misbehaviors in the system.
The Swan contract utilizes an upgradable pattern and inherits from SwanManager
, which defines state variables, but they do not implement gap storage.
In an upgradable contract pattern, adding new storage variables to any of the inherited contracts can overwrite existing storage variables in the child contract due to the tightly packed storage layout. This can lead to critical misbehaviors and potentially catastrophic system failures.
Storage of contracts might be corrupted during an upgrade.
vscode
Add gaps for SwanManager
.
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.