# Stale rate applied to past accrual

Accrual priced at today's rate, or dropped, instead of the rate in force when it accrued

_Area: DeFi accounting and math bugs. Seen in 3 disclosed reports; latest 2025-11-05. Updated 2026-10-24._

## How it works
Accrued value is rate × time. The bug is pricing value that accrued under earlier rates with a rate that is current *now*, or dropping accrual that happened before a rate changed. The broken assumption is that rate × balance is time-invariant: it is not when rates step (emission cliffs, per-interval interest, deadline-gated rates). The invariant that must hold: each unit of accrual is priced at the rate in force while it accrued, and accrual is checkpointed before any rate change.

## Where it shows up
- A pending-reward or interest view that multiplies a stored balance by a live rate/ratio rather than a cached reward-per-token or index.
- A rate function that returns 0 (or a new value) after a deadline or cliff, with no checkpoint of what accrued before it.
- Settle-early / close / call functions that reuse a single-period accrual helper instead of summing all elapsed periods.
- A wrapper that claims rewards for the whole vault on one user's action, then computes that user's pending amount from the current emission rate rather than a per-user reward-per-token cached at claim time [E1](https://bugbountylibrary.com/r/sherlock%3A2023-07-blueberry%3AH-4.md).

## How to review
For every accrual path, ask: what rate applied to each unit of time, and is that rate captured at accrual time? Check that (a) reward/interest indices are checkpointed before any rate or deadline change, (b) close/settle paths charge for all elapsed periods, not one, and (c) any whole-vault claim is split using per-user reward-per-token cached at claim time. Compare the close-path cost against paying period-by-period; they must match.

## Variants seen
- Current cliff reduction ratio applied to the whole pending balance, losing rewards after each cliff [E1](https://bugbountylibrary.com/r/sherlock%3A2023-07-blueberry%3AH-4.md).
- Settle path charges one interval's interest/late fee, skipping missed intervals when late rate < APR [E2](https://bugbountylibrary.com/r/sherlock%3A2024-03-zivoe%3AM-5.md).
- interestPerSecond view returns 0 past deadline, discarding unaccrued interest [E3](https://bugbountylibrary.com/r/cantina%3Amorpho_jul2025%3A3.1.1.md).

## Impact and severity
Loss of user rewards/yield [E1](https://bugbountylibrary.com/r/sherlock%3A2023-07-blueberry%3AH-4.md)[E3](https://bugbountylibrary.com/r/cantina%3Amorpho_jul2025%3A3.1.1.md) and underpaid interest letting borrowers escape obligations [E2](https://bugbountylibrary.com/r/sherlock%3A2024-03-zivoe%3AM-5.md). Severity rises when the error compounds per cliff/period, or when a borrower can time a callLoan to settle overdue intervals cheaply while the late rate is below APR [E2](https://bugbountylibrary.com/r/sherlock%3A2024-03-zivoe%3AM-5.md).

## Evidence
- E1: https://bugbountylibrary.com/r/sherlock%3A2023-07-blueberry%3AH-4.md
- E2: https://bugbountylibrary.com/r/sherlock%3A2024-03-zivoe%3AM-5.md
- E3: https://bugbountylibrary.com/r/cantina%3Amorpho_jul2025%3A3.1.1.md
