# Minter.sol#startInflation() can be bypassed.

Uninitialized lastEvent/lastInflationDecay let anyone call executeInflationRateUpdate before startInflation, inflating totalAvailableToNow by ~52 years of inflation.

- Payout: Contest reward
- Severity: high
- Program: Backd
- Credited: WatchPug
- Disclosed: 2022-07-19
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2022-05-backd-findings/issues/99
- Library page: https://bugbountylibrary.com/r/c4%3A2022-05-backd%3AH-01
- Tags: domain:web3 impact:integrity kind:contest platform:code4rena sev:high tech:solidity technique:source-review vuln:access-control vuln:accounting-error

**Target:** Minter.sol tokenomics contract
**Root cause:** lastEvent and lastInflationDecay are not initialized in the constructor, so they default to 0. executeInflationRateUpdate() uses them without checking they were set by startInflation().
**Steps:**
1. Deploy Minter without calling startInflation(); lastEvent=0, lastInflationDecay=0.
2. Call permissionless `executeInflationRateUpdate()`.
3. In `_executeInflationRateUpdate`, `totalAvailableToNow += currentTotalInflation * (block.timestamp - 0)` adds ~52 years of inflation.
4. `block.timestamp >= 0 + _INFLATION_DECAY_PERIOD` is true, so initialPeriodEnded is set and decay applied immediately.
5. Subsequent `_mint` checks pass because totalAvailableToNow is massively inflated.
**How found:** Code reading: noticed state variables used in permissionless function are only set in a governance-gated function and not in constructor, so default zero values break time-based calculations.
**Exploitation:** Any external caller triggers executeInflationRateUpdate() before governance calls startInflation(), bypassing the onlyGovernance gate and corrupting the inflation accounting so the mintable cap is effectively removed.
**Insight:** When a state variable is initialized only in a privileged setup function, check every permissionless function that reads it for zero-value assumptions; timestamps defaulting to 0 create huge elapsed-time deltas.
