Project

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

Missing Transfer Success Check in joinDAO Function

Summary:

The joinDAO function allows users to join a DAO by purchasing a membership NFT at a specific tier. However, it does not verify whether the transferFrom calls for payment and platform fees succeed, which could lead to users obtaining memberships without completing the payment.

Vulnerability Details:

The function assumes that IERC20.transferFrom calls for platformFees and tierPrice - platformFees will succeed without explicitly verifying this.

Nowhere in joinDAO function is checked does the _msgSender() has enough balance to join the DAO and buy tier

Impact:

If a user has insufficient funds or allowance, the function may still execute, resulting in:

  • Unpaid Memberships: Users could join a DAO tier without actually paying, impacting the DAO’s revenue and allowing unauthorized access.

  • DAO Revenue Discrepancies: Failing to collect the expected payments may affect the DAO’s revenue model, especially if revenue is distributed among members.

Tools Used:

Manual Code Review: Identified missing checks on transferFrom calls

Recommendations:

The logic can be fixed. You need to calculate the totalCost of tierPrice + platformFees, then get the _msgSender() balance

and check if the balance is bigger or equal than totalCost

uint256 totalCost = tierPrice + platformFees; //calculate total cost
IERC20 daoCurrency = IERC20(daos[daoMembershipAddress].currency);
uint256 senderBalance = daoCurrency.balanceOf(_msgSender()); //get the balance of _msgSender
require(senderBalance >= totalCost); //check if he has enough balance to make those transactions
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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