The buy() in Auction.sol, lets users buy ZENO tokens while price decreases as the auction comes to an end. It calculates the price based on how much the auction has passed, using getPrice(). This price is then multiplied by the amount of ZENO tokens users want to buy, and the result is transferred from the user. Since the function does not take account if decimals, this makes the function reverts when users dont have enough USDC or takes a lot more USDC.
In buy()
Since the price is in terms of USDC and ZENO has 18 decimals (default ERC20 value), at a price of 1 USDC, just for 1 ZENO, the users will pay 1e18 USDC.
The function is mostly unusable because of the require statement, and users will need to pay a lot more for it to pass and buy ZENO.
Manual Review
Account for decimals before transfer.
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.