Project

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

MembershipERC1155 contract will not work with FoT tokens, if the listed ones (USDC, WETH, WBTC) introduce a fee

Summary

MembershipERC1155 contract will not work with FoT tokens, if the listed ones (USDC, WETH, WBTC) introduce a fee.

Vulnerability Details

https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/dao/tokens/MembershipERC1155.sol#L189C1-L200C6

Function breaks because it uses the amount argument to calculate totalProfit variable. This breaks because its not the amount that is transferred to the contract but a fraction of if - depending on the fee present on the currency (token) contract.

Impact

Contract breaks when fee-on-transfer tokens are used.

Tools Used

Manual review

Recommendations

Do not use currency/tokens that can have a fee.

Updates

Lead Judging Commences

0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope
0xbrivan2 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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

Give us feedback!