Due to the wrong order of mathamtical operations in BidBeastsNFTMarket::placeBid, there can be some precission loss and inaccuracy in calculating bid amounts.
Likelihood:
It can happen when the user bids an amount with some small amount of wei (e.g. 1,000,000,000,000,000,050 wei). In such a case, 50 wei will be lost in calculation.
Impact:
It can hurt the users' perception of the app and reduces the reliability and trust.
You can test it by bidding a fee like the above example (1,000,000,000,000,000,050 wei) and see the result. The requiredAmount will be rounded down.
Change the order of operations (multiplication before division) to avoid precission loss and miscalculations of users' funds.
Integer division in requiredAmount truncates fractions, allowing bids slightly lower than intended.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.