# IndexPool's INIT_POOL_SUPPLY is not fair.

IndexPool mints INIT_POOL_SUPPLY to address(0) in constructor; first LP's mint amount determines how much value is burned, shortchanging all LPs.

- Payout: Audit contest
- Severity: high
- Program: Sushi
- Found by: broccoli
- Disclosed: 2021-11-22
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2021-09-sushitrident-findings/issues/29
- Library page: https://bugbountylibrary.com/r/c4%3A2021-09-sushitrident%3AH-04
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** IndexPool.sol constructor / mint
**Root cause:** Constructor mints INIT_POOL_SUPPLY LP tokens to address(0); the burned LP value depends on the first depositor's mint amount relative to INIT_POOL_SUPPLY, so a non-optimal first mint burns a large share of pool value.
**Steps:**
1. Deploy IndexPool; constructor mints INIT_POOL_SUPPLY to address(0).
2. First LP transfers tokens to pool and calls `mint(abi.encode(admin, 10**8))` (minimum) — receives ~10**18*10**18 LP.
3. Alternative: first LP calls `mint(abi.encode(admin, deposit_amount*100))` — receives only ~100*10**18 LP for same deposit.
4. Compare burned LP worth = AmountIn * INIT_POOL_SUPPLY / (first_lp_amount + INIT_POOL_SUPPLY); small first mint makes burned share dominate.
**How found:** Read constructor minting INIT_POOL_SUPPLY to address(0) and derived the burned-LP formula from IndexPool.sol L106, noticing the burn value is set by the first depositor's arbitrary mint amount.
**Exploitation:** First LP chooses a tiny mint amount so the constructor's INIT_POOL_SUPPLY burn represents a huge fraction of total supply, diluting subsequent LPs and reducing their profit; first LP can also time entry to capture disproportionate share.
**Insight:** When a constructor mints/burns a fixed supply to address(0), the ratio between that fixed amount and the first user's deposit sets the effective burn rate — check whether the first depositor can pick a deposit size that makes the burn negligible or dominant.

