Project

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

platformFees calculation should round up

Vulnerability Details

https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/MembershipFactory.sol#L144

For DAOs which use WBTC, if a membership costs 999 sats, fee would be 199 sats (not 200), which is 0.5% loss of fees on each purchase.

Impact

Actual fee owpWallet receives is significantly less than intended 20% due to precision loss.

Recommendations

Round up platformFees:

uint256 platformFees = (20 * tierPrice) / 100;
+ if (tierPrice % 5 != 0) platformFees++;
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Appeal created

aslanbek Submitter
10 months ago
0xbrivan2 Lead Judge
10 months ago
aslanbek Submitter
10 months ago
0xbrivan2 Lead Judge
10 months ago
0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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