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

A couple can get divorced multiple times

Description: A couple can call Soulmate.sol::getDivorced() multiple times, even when they are already divorced.

Impact: These may cause weird behavior in off-chain components.

Recommended Mitigation: Check whether the copule has already divorced:

function getDivorced() public {
+ if divorced[msg.sender] revert Soulmate__AlreadyDivorced();
address soulmate2 = soulmateOf[msg.sender];
divorced[msg.sender] = true;
divorced[soulmateOf[msg.sender]] = true;
emit CoupleHasDivorced(msg.sender, soulmate2);
}
Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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