# Debt Decay Faster Than Expected

BondBaseSDA rounds debt decay increment down instead of up, decaying debt faster than spec and underpricing bond tokens for market makers.

- Payout: Contest reward
- Severity: medium
- Program: Bond
- Credited: xiaoming90
- Disclosed: 2022-11-05
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2022-11-bond-judging/issues/12
- Library page: https://bugbountylibrary.com/r/sherlock%3A2022-11-bond%3AM-10
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:precision-loss

**Target:** BondBaseSDA.sol debt decay logic (Solidity smart contract)
**Root cause:** lastDecayIncrement uses mulDiv (round down) instead of mulDivUp as specified in the whitepaper, so the decay reference time advances less than intended.
**Steps:**
1. Read whitepaper Definition 27: delay increment must round up
2. Inspect BondBaseSDA.sol L514: `debtDecayInterval.mulDiv(payout_, lastTuneDebt)` rounds down
3. Purchase a bond so payout_/lastTuneDebt is non-integer
4. Observe metadata[id_].lastDecay increments by truncated value
5. Debt decays faster than spec, market price falls faster
**How found:** Compared whitepaper specification (round up) against implementation code and spotted mulDiv rounding down at L514.
**Insight:** When a protocol publishes a whitepaper with explicit rounding definitions, diff every mulDiv/mulDivUp against the spec—rounding direction mismatches are easy to miss and cause economic drift.
