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

'Divorced soulmates' cannot claim the reward of their past love.

Summary

If 'soulmates' do not claim airdrop before they get divorce they will loose it forever.

Vulnerability Details

In this specific case:

Soulmates mint token at day 3.
They do not claim airdrop until day 33 in which they divorce.
They will not be able to claim that reward in the future although it's the result of their love

Impact

This has a huge impact on all 'soulmates' considering how the protocol should work. (assuming already fixed the bug with the if statement in the claim function of 'airdropContract' see the other 'Divorced couples can claim the airdrop' submission on this)

Tools Used

Foundry

Recommendations

Declear another mapping in the 'soulContract' called 'idToDivorceTimestamp' like the one written below.

mapping(uint256 id => uint256 timestamp) public idToDivorceTimestamp;

Then define a new function in 'Isoulmate' called 'idToDivorceTimestamp' like the one below.

function idToDivorceTimestamp(uint256 id) external returns (uint256);

Finally make a require condition in 'claim()' function of 'airdropContract' based on that.
Divorced 'soulmates' should still be able to claim the airdrop of

idToDivorceTimestamp(soulmates)-idTocreationTimestamp(soulmates)
Updates

Lead Judging Commences

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

Support

FAQs

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