The ZENO token redemption mechanism carry a critical state inconsistency where the total supply fails to decrease properly when tokens are redeemed after maturity. This creates a mismatch between actual circulating supply and recorded total supply, potentially enabling double-redemption attacks.
The key issues are:
State variable updates occur in a non-optimal order
Reliance on _burn()
for supply management creates inconsistency with totalZENORedeemed
External call after state modifications (though protected by nonReentrant)
Let's say a user with 500 ZENO tokens initiates redemption after maturity. The contract burns their tokens through _burn()
, but fails to decrease totalSupply
. This creates an accounting discrepancy where the sum of all balances no longer equals the total supply.
The redeem()
function updates totalZENORedeemed
but relies solely on _burn()
for supply management, creating a mismatch between tracking variables. While user balances decrease correctly during redemption, the total supply remains unchanged. shows:
A user with 500 ZENO tokens initiates redemption after maturity. The contract burns their tokens through _burn()
, but fails to decrease totalSupply
. This creates an accounting discrepancy where the sum of all balances no longer equals the total supply.
Let's walk through how this plays out:
Imagine Alice holds 500 ZENO tokens from the initial 1000 token supply. After maturity, she redeems her tokens for USDC. The contract burns her tokens, reducing her balance to 0, but the total supply remains stuck at 1000. This mismatch opens up a critical vulnerability, the contract still "thinks" there are 1000 tokens in circulation when only 500 remain.
The root lies in the redeem()
function:
This is analogous to a bank deducting money from your account but not updating their total deposits ledger. The consequence? The protocol's accounting system becomes increasingly inaccurate with each redemption, potentially allowing more tokens to be redeemed than should exist.
The redemption mechanism fails to properly decrease total supply while burning user tokens, creating an inconsistency between total supply and actual circulating tokens. This could lead to incorrect protocol accounting and potential double-redemption attacks.
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.