The redeem
and redeemAll
functions in the ZENO
contract do not properly account for the difference in decimal precision between ZENO
(assumed 18 decimals) and USDC
(6 decimals). This can lead to incorrect fund transfers where users receive significantly more or fewer USDC tokens than intended.
The following code snippet highlights the issue:
Issue:
1,000,000 times more USDC than intended.
If reversed (USDC has more decimals), users could receive far fewer tokens.
Scenario:
ZENO
has 18 decimals, and USDC
has 6 decimals.
A user with 1 ZENO
calls redeem(1e18)
, expecting to receive 1 USDC.
Instead, USDC.safeTransfer(msg.sender, 1e18)
is called, sending 1,000,000 USDC.
This incorrectly drains the contract of USDC.
Test:
Output:
User USDC Balance: 1000000000000000000 (should be 1e6 but is 1e18)
Financial loss if users withdraw significantly more USDC than intended.
Contract funds may be drained by malicious actors exploiting this bug.
Manual review.
Modify the redeem
and redeemAll
functions to properly convert between token decimals:
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.