Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 1.3 KB

079.md

File metadata and controls

53 lines (45 loc) · 1.3 KB

Powerful Honeysuckle Anteater

Medium

No storage gaps for contracts with complex storage structure.

Summary

Upgradeable contracts don't have storage gaps defined, however they have complex structure.

Root Cause

No storage gaps at the end of ABONDToken, borrowing.sol, CDS.sol, GlobalVariables, Treasury and & etc. https://github.com/sherlock-audit/2024-11-autonomint/blob/0d324e04d4c0ca306e1ae4d4c65f0cb9d681751b/Blockchain/Blockchian/contracts/Core_logic/CDS.sol#L33-L40

Example of all of them being upgradeable:

contract Treasury is ITreasury, Initializable, UUPSUpgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable {
contract ABONDToken is
    Initializable,
    ERC20Upgradeable,
    ERC20BurnableUpgradeable,
    ERC20PausableUpgradeable,
    UUPSUpgradeable,
    OwnableUpgradeable
{
contract GlobalVariables is
    IGlobalVariables,
    Initializable,
    UUPSUpgradeable,
    ReentrancyGuardUpgradeable,
    OAppUpgradeable
{
contract Borrowing is
    IBorrowing,
    Initializable,
    EIP712Upgradeable,
    UUPSUpgradeable,
    ReentrancyGuardUpgradeable,
    OwnableUpgradeable
{

Impact

Potential problems like storage collisions, when trying to upgrade a contract.

Mitigation

Add storage gaps for upgradeable contracts.