Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Wrong event emission, `SoulmateAreReunited:Soulmate2` is always address(0)

Summary

Wrong event emission, SoulmateAreReunited:Soulmate2 is always address(0)

Vulnerability Details

Since we are on branch (soulmate2 == address(0)), soulmate2 is always address 0, then
emit SoulmateAreReunited(soulmate1, soulmate2, nextID); will emit a wrong message

Impact

Wrong event emission will lead to wrogn end user information and stats.

Tools Used

manual revision

Recommendations

Replace:
emit SoulmateAreReunited(soulmate1, soulmate2, nextID);
For:
emit SoulmateAreReunited(soulmate1, msg.sender, nextID);

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-mintSoulmateToken-wrong-emit-soulmate2

Low severity, inconsistencies in event emission Sidenote: Separating all event findings given root causes are different with different functions involved. There could be alot of debate on whether wrong emit events consitute low severity, but I believe, - There are direct inconsistencies in the code logic - Codehawks [low severity categorization guidelines](https://docs.codehawks.com/hawks-auditors/how-to-evaluate-a-finding-severity#low-severity-findings) supports its severity as seen below, especially noting the term `Minimal to no impact` > - Minimal to no impact on the funds or the protocol's main functionality.

Support

FAQs

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