# ITO can be manipulated

ZivoeITO.claimAirdrop uses live totalSupply() of burnable zSTT/zJTT as denominator, letting an attacker burn tranche tokens to inflate their ZVE airdrop share.

- Payout: Contest reward
- Severity: high
- Program: Zivoe
- Credited: 0xShax2nk.in
- Disclosed: 2024-03-19
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2024-03-zivoe-judging/issues/12
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-03-zivoe%3AH-2
- Tags: domain:web3 impact:funds-loss impact:integrity kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:business-logic vuln:oracle-manipulation vuln:reward-distribution

**Target:** ZivoeITO.claimAirdrop vesting calculation
**Root cause:** claimAirdrop computes the user's share as pZVEOwned / (zSTT.totalSupply()*3 + zJTT.totalSupply()) using live totalSupply(), but zSTT/zJTT have a public burn() function, so the denominator can be shrunk after some users claim.
**Steps:**
1. Attacker controls two accounts (Bob, Sue) and deposits large stablecoin amounts into the senior tranche via depositSenior on both.
2. After ITO ends, Sue calls claimAirdrop(sue) to lock in her vesting based on the current (large) denominator.
3. Sue calls zSTT.burn(1_000_000 ether) to shrink zSTT.totalSupply().
4. Bob calls claimAirdrop(bob); the smaller denominator inflates his ZVE vesting share.
5. Later honest users (Sam) claim against the now-inflated numerator total and receive less or nothing once 1.25M ZVE cap is exceeded.
**How found:** Reviewer noticed claimAirdrop's denominator reads live totalSupply() of tranche tokens and that ZivoeTrancheToken exposes a public burn(), hypothesizing that burning between claims would shrink the denominator and inflate later claims; confirmed with a Foundry PoC comparing vesting with and without burn.
**Exploitation:** Two-account sybil: deposit senior tranche from both accounts, claim from account A, burn A's zSTT to reduce totalSupply, then claim from account B to receive an inflated ZVE vesting schedule; total claimed exceeds the 1.25M ZVE airdrop budget, starving later claimants.
**Escalation:** Attacker gains outsized ZVE allocation and governance power; honest users' claims revert or are diluted because total distributed exceeds 1.25M.
**Insight:** When a share/ratio formula reads totalSupply() of a token that holders can burn or transfer out, the denominator is attacker-controllable between claims; snapshot supply at first claim or use a fixed denominator.
