A vulnerability exists in the ZENO auction contract that allows users to redeem their ZENO tokens for a fixed amount of USDC, which does not account for the fluctuating price of ZENO tokens at the time of redemption. As a result, users may redeem their tokens at a value significantly lower than the price they originally paid, leading to potential financial loss.
User wants to buy ZENO
tokens with USDC he calls buy with amount of ZENO tokens he wants to buy
It calculates how much USDC user should pay by calling getPrice() and returning the price. Current price of 1 ZENO per USDC depends from the timestamp. User pays (ex. 50 USDC) for 10 ZENO. Then he gets minted 10 ZENO to his address.
When timestamp passes endTime user can call redeem to get his USDC back for the ZENO. However in ZENO.SOL
contract when user calls redeem since he has 10 ZENO he can redeem only 10 ZENO and receive back 10 USDC. Those 40 USDC are lost. Bug happens because there is no calculation which gets the current price between ZENO and USDC.
User receives less amount of USDC than he origianly had when buying ZENO.
Financial Loss: Users who redeem their ZENO tokens at a fixed value could face significant financial losses if the price of ZENO tokens has decreased since their purchase. This creates a potential mismatch between the value paid for the tokens and the value received upon redemption.
Manual Review
In redeem calculate current price of ZENO to USDC so user can receive the right amount of USDC
Example:
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.