Bug exists in CurrencyManager.sol where there's a race condition in the currency whitelisting process. The addCurrency
function doesn't properly synchronize the state between checking if a currency is whitelisted and adding it.
The MembershipERC1155 contract implements a profit-sharing mechanism that can be exploited through tier manipulation. The contract calculates shares based on tier weights (64, 32, 16, 8, 4, 2, 1) but fails to properly track profit claims across tier transfers and upgrades.
CurrencyManager allows whitelisting of non-existent or non-ERC20 addresses, Malicious addresses could be whitelisted as currencies.
In CurrencyManager.sol: https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/CurrencyManager.sol#L33-L43
The profit distribution mechanism in MembershipERC1155 can be manipulated through the interaction between sendProfit
and token transfers, allowing malicious users to claim disproportionate profits by exploiting the share calculation system.
MembershipFactory lacks proper validation of DAO addresses, Invalid DAOs could be created and joined.
Platform fees could be manipulated through precision loss
DAO membership limits could be bypassed
In MembershipFactory.sol: https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L140-L147
The profit distribution system uses a weighted share calculation based on tier levels, but the shareOf
function and profit tracking mechanism can be exploited through strategic token transfers and profit claims.
In MembershipERC1155.sol: https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/tokens/MembershipERC1155.sol#L191-L200
Core Issue The vulnerability exists in the interaction between tier weights and profit distribution in MembershipERC1155.sol: https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/tokens/MembershipERC1155.sol#L169-L177
Exploitation Path
Initial State
Manipulation
Mathematical Proof
This mathematical progression shows how users can extract more value than intended through strategic tier management.
The vulnerability becomes more severe when combined with the MembershipFactory's tier upgrade mechanism, allowing systematic exploitation of the profit distribution system.
In another way
Mathematical Demonstration
Loss of user funds through invalid currency transfers
Creation of malicious DAOs
Revenue loss for the platform through fee manipulation
Add profit claim cooldown period and implement snapshot mechanism for profit distribution.
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.