The ZENO token redemption mechanism is severely flawed, causing users to receive only a tiny fraction of their initial USDC investment when redeeming ZENO tokens at maturity. In the test case, a user who spent approximately 9,999 USDC to purchase 100 ZENO tokens receives less than 1 USDC upon redemption, resulting in a near-total loss of funds.
Each ZENO token should represent 1 USDC at maturity, regardless of the purchase price. This is how zero-coupon bonds work - if someone buys during the auction at 0.9 USDC per ZENO or 0.5 USDC per ZENO, they should ALL get 1 USDC per ZENO at maturity.
Initial Purchase:
User purchases 100 ZENO tokens for ~9,999 USDC (approximately 99.99 USDC per token)
The purchase transaction completes successfully, deducting the USDC and minting 100 ZENO tokens
Redemption Process:
At maturity, the ZENO contract is funded with 10,000 USDC
User attempts to redeem 100 ZENO tokens
Instead of receiving back 10000 USDC, the user receives less than 1 USDC (specifically 0.000100 USDC).
USDC)
The ZENO tokens are burned correctly, but the USDC return amount is incorrect
In order to run the test you need to:
Run foundryup
to get the latest version of Foundry
Install hardhat-foundry: npm install --save-dev @nomicfoundation/hardhat-foundry
Import it in your Hardhat config: require("@nomicfoundation/hardhat-foundry");
Make sure you've set the BASE_RPC_URL
in the .env
file or comment out the forking
option in the hardhat config.
Run npx hardhat init-foundry
There is one file in the test folder that will throw an error during compilation so rename the file in test/unit/libraries/ReserveLibraryMock.sol
to => ReserveLibraryMock.sol_broken
so it doesn't get compiled anymore (we don't need it anyways).
Create a new folder test/foundry
Paste the below code into a new test file i.e.: FoundryTest.t.sol
Run the test: forge test --mc FoundryTest -vvvv
High severity as it results in direct loss of user funds
Users lose over 99.99% of their initial investment
Breaks the core functionality of the ZENO token as a zero-coupon bond
Violates the documented 1:1 backing with USDC
Foundry
Manual Review
Scale Zeno amount to equivalent USDC amount for the redeem
and redeemAll
function.
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.