If user send less or more ETH the contratc should send the eth back to the sender or revert
Because of the miss handling of the require msg.value == cost if it is less or more the contract keep it
Likelihood:
anytime user try to bough a token they can face this problem
Impact:
Users can loos their ETH forever
this is a step by step sinario that show how this bug will effect users and a test using foundry
You should add require if teh msg.value != cost should revert or having a Refund overpayment automatically
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.