The cost calculation in Auction.buy() is wrongly implemented,
as it multiplies the amount of Zeno tokens the user wants to buy without precition deviding.
Let's take state.reservePrice and state.startingPrice from the test folder Integration.test.js.
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/test/unit/Zeno/Integration.test.js#L81
consider a scenario when a user wants to buy 10 Zeno tokens:
the user calls buy(10).
then the input gets multiplied to 100e6 making the cost equal to 1000e6.
the user get minted ten Zeno token for 1000 USDC.
this will lead to a user buying Zenos for a high value, then burning them for the corresponding amount of USDC.
see the redeemAll() description:
Function Signature: function redeemAll()/
Description: This method is used to redeem ZENO tokens for USDC after the bond's maturity date./
The ZENO tokens are burnt during this process, effectively removing them from circulation./
This function ensures that users can get their USDC back once the bond matures./
Usage Scenario: After the bond matures, users call this method to exchange their ZENO tokens back for USDC./
The method would burn the ZENO tokens and transfer the corresponding amount of USDC to the user./
This will break the Zeno Bond functionality leading to a loss of funds for the users.
Manual Review.
implement the cost calculation as follow:
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.