DatingDapp

AI First Flight #6
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

L-1: likeUser accepts arbitrary overpayment with no refund of the excess

L-1: likeUser accepts arbitrary overpayment with no refund of the excess

Summary

require(msg.value >= 1 ether, ...) instead of ==, with no refund of msg.value - 1 ether and no accounting at all. A fat-fingered 5 ETH like locks 4 ETH of surplus silently.

PoC (Foundry, PASS)

test_L1_overpaymentAcceptedAndLocked: Alice likes Bob with 5 ETH; asserts the 5 ETH is accepted and sits unaccounted in the registry. PASS.

Recommended mitigation

require(msg.value == 1 ether) or refund the excess.

Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 1 hour ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!