# Missing elapsed-time normalization in accrual

Accrual applies a rate per call without multiplying by elapsed time, so totals depend on settlement frequency

_Area: DeFi accounting and math bugs. Seen in 2 disclosed reports; latest 2026-02-05. Updated 2026-10-29._

## How it works
Accrual (funding, interest, rewards) is a rate applied over time. The invariant: total accrued over a period equals rate × elapsed time, no matter how many times the accrual function runs. The bug: the code applies the rate per call without multiplying by elapsed time, or divides by a time constant that does not match the chain's real block time. Then N short settlements accrue differently from one long settlement, and the ledger drifts from reality.

## Where it shows up
- Accrual index incremented by `rate × price` with no `× elapsed` term [E3](https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-11.md)
- Elapsed time used for TWAP or interval gating but not in the accrual increment itself [E3](https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-11.md)
- Hardcoded `blocksPerYear`, `secondsPerYear`, or block-time constants copied from another chain [E2](https://bugbountylibrary.com/r/c4%3A2023-05-venus%3AH-01.md)
- Forked rate models deployed where block time differs from the original [E2](https://bugbountylibrary.com/r/c4%3A2023-05-venus%3AH-01.md)

## How to review
Check the exact property: accrual over any interval is path-independent — calling the update N times over total time T yields the same result as one call over T. Verify every rate is multiplied by elapsed time measured in the same unit as the rate's denominator (seconds vs blocks, per-year vs per-interval). Diff chain-specific constants against the target chain's real block time. Test path-independence directly: compare N×Δt against 1×NΔt [E3](https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-11.md).

## Variants seen
- Funding index missing elapsed-time scaling, so frequent settlements overcharge [E3](https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-11.md)
- Interest model with wrong `blocksPerYear` for the deployed chain, scaling rates 5x [E2](https://bugbountylibrary.com/r/c4%3A2023-05-venus%3AH-01.md)

## Impact and severity
Distorted PnL and unfair liquidations from funding mis-accrual [E3](https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-11.md); rates 5x intended, mispricing all borrowers and suppliers [E2](https://bugbountylibrary.com/r/c4%3A2023-05-venus%3AH-01.md). Severity rises when the error compounds across many settlements or affects consensus-critical state.

## Evidence
- E1: https://bugbountylibrary.com/r/cantina%3Aethereum_pectra_lighthouse%3A3.1.1.md
- E2: https://bugbountylibrary.com/r/c4%3A2023-05-venus%3AH-01.md
- E3: https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-11.md
