Project

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

Users can avoid paying membership fees

Summary

A simple charging mechanism allows users to avoid paying for the protocol.

Vulnerability Details

When a user wants to join the DAO he should pay the price of Tier. Fees are deducted from this amount:

function joinDAO(address daoMembershipAddress, uint256 tierIndex) external {
...
uint256 platformFees = (20 * tierPrice) / 100;
...
}

If the tier price is low, the user will not be charged the protocol fee.

The DAO can also be created with the cheapest tier to buy: to break the calculations and avoid fees.

Impact

Users can avoid paying membership fees

Tools Used

Manual review

Recommendations

Consider adding a BPS system for calculations and decimal protection. The code can be as shown below and used for tokens with different decimals:

uint256 public constant BPS = 10000;
uint256 public constant FEE = 200;
function joinDAO(address daoMembershipAddress, uint256 tierIndex) external {
...
uint256 platformFees = (FEE * (tierPrice ** token.decimals)) / BPS;
...
}
Updates

Lead Judging Commences

0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!