Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: medium
Invalid

DAO Implementation Update Storage Layout Mismatch

Summary

The updateMembershipImplementation function allows updating the implementation contract without storage layout validation, potentially corrupting new DAOs' storage.

Vulnerability Details

  • Location: MembershipFactory.sol, updateMembershipImplementation() function and MembershipERC1155.sol storage layout

  • No storage gaps implemented in MembershipERC1155 contract

  • Current implementation permits storage layout changes without validation

  • New implementation with added storage variables would shift existing storage slots

  • Example of vulnerable update:

// V2 Implementation that breaks storage
contract MembershipERC1155V2 {
uint256 public newVariable; // Shifts all storage down
bytes32 public constant OWP_FACTORY_ROLE = ...
// Rest of storage now misaligned
}

Impact

HIGH - New DAOs created after implementation update will have corrupted storage, breaking access controls and profit tracking.

Tools Used

Manual code review

Recommendations

abstract contract MembershipERC1155Storage {
// Current storage variables
uint256[50] private __gap; // Storage gap for future upgrades
}
contract MembershipERC1155 is MembershipERC1155Storage {
// Implementation
}
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.