Project

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

Integer Division Leading to Fee Loss in Small Transactions

Summary

The protocol's current fee structure suffers from precision loss in low-value transactions due to integer arithmetic limitations. For small tier prices, the 20% fee calculation rounds down to zero, eliminating protocol revenue. Furthermore, the test suite fails to account for proper token decimal scaling, leaving potential issues undiscovered.

Vulnerability Details

Protocol fee calculation in MembershipFactory.sol:

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

Impact

1. Protocol Revenue Impacts:

- Zero fees collected on small transactions

- Precision loss multiplied across multiple users

- Economic model undermined by calculation method

Tools Used

Manual Review

Recommendations

1. Scale calculations to handle token decimals

2. Set minimum fee thresholds

Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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