Project

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

Incorrect Event Emission in upgradeTier Function

Summary

The `upgradeTier` function incorrectly emits the ** UserJoinedDAO** event when a user upgrades their tier within a sponsored DAO. This event is misleading because the user is not joining the DAO but rather upgrading their existing membership tier.

Vulnerability Details

In the upgradeTier function, the following line of code emits the UserJoinedDAO event:

emit UserJoinedDAO(_msgSender(), daoMembershipAddress, fromTierIndex - 1);

This event is typically used to indicate that a user has joined a DAO. However, in this context, the user is upgrading their membership tier, not joining the DAO for the first time. Emitting the UserJoinedDAO event in this scenario can lead to confusion and misinterpretation of the contract's activity logs.

Impact

  • The event logs will incorrectly show that the user has joined the DAO, which can confuse users, developers, and auditors who rely on these logs for tracking user actions.

Tools Used

Recommendations

+ emit UserUpgradedTier(_msgSender(), daoMembershipAddress, fromTierIndex, fromTierIndex - 1);
Updates

Lead Judging Commences

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

Support

FAQs

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