In certain DAO tier structures, the users can "skim" the protocol of their platform fees by utilizing the MembershipFactory::upgradeTier() functionality.
The MembershipFactory contract is the core "backbone" of the protocol. Some of the functionality that this contract provides is the ability to create new Daos, allowing users to join an existing DAO, and allowing users to upgrade their membership tier in an existing DAO they had previously joined.
The protocol earns their revenue by taking a "platformFee" that is set at 20% of the money a user pays when they join a dao. The money a user pays to join a dao differs by the tier that the user is joining at. Higher tiers give the users a higher number of shares, and therefore usually will cost more money to join. However, this platform fee is not taken when a user upgrades their existing dao membership tier using the MembershipFactory::upgradeTier() function. This works by burning two tokens at the current tier, and then minting a new token at the next tier. Therefore, the protocol will end up earning less in fees in scenarios where it is cost effective for users to mint tokens of a lower tier and upgrading rather than minting a token at that tier directly. This leads to lost revenue for the protocol.
The protocol earns revenue using a platform fee that is calculated in the MembershipFactory::joinDAO() function as seen below.
https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L137
The protocol does not charge this platform fee on MembershipFactory::upgradeTier(). This can lead to lost potential fees for the protocol in scenarios where it is cheaper for the users to upgrade their daos from a lower tier.
https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L155
In certain cost structures, the protocol can miss out on potential revenue when it is cheaper for users to upgrade lower tier tokens to higher tier tokens, allowing them to avoid contributing to the platform fee.
Foundry
Manual Review
One potential way to mitigate this problem would be to charge the platform fee on tier upgrades along with on joining a dao. However, this would not fully mitigate the problem as there are still certain cost structures where it would still be beneficial to mint two lower tier tokens and upgrade over directly minting a token at the tier that a user wants. Also charging a platform fee on upgrades can introduce cost structures where it never makes economic sense to upgrade a tier rather than directly minting at a tier.
My honest recommendation is to just get rid of the tier structure completely. It seems unnecessary for the protocol as the tiers are converted to shares when calculating the profit that a user is entitled to anyways. This protocol would work much better if it used a traditional vault system rather than this tier system. The economics of the tier system are hard to get right, as there will always be an economic advantage to either directly minting a certain tier, or upgrading two of the lower tier nfts.
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.