# Total LP supply & total debt accrual is wrong

Wild Credit's accrueAccount only adds a single user's interest to total debt/LP supply, corrupting utilization ratio and borrow rates protocol-wide.

- Payout: Audit contest
- Severity: medium
- Program: Wild Credit
- Found by: cmichel
- Disclosed: 2021-08-17
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2021-07-wildcredit-findings/issues/115
- Library page: https://bugbountylibrary.com/r/c4%3A2021-07-wildcredit%3AM-04
- Tags: area:web3 domain:web3 impact:integrity kind:contest platform:code4rena sev:medium tech:solidity technique:source-review vuln:accounting-error

**Target:** Solidity lending pool accrueAccount / interest accrual accounting
**Root cause:** accrue() updates cumulativeInterestRate but total debt and LP totalSupply are only incremented by the per-account interest of the updated user, not the entire new interest, so totals lag actual accrued interest.
**Steps:**
1. Single lender supplies $100k, single borrower borrows $70k; utilization 70%.
2. Time passes; supplier calls accrueAccount, minting supplier interest to LP totalSupply (e.g. $110k) while total debt stays $70k.
3. Utilization recomputes as 70/110=63% instead of rising, so borrowRatePerBlock drops.
4. Borrower later updates, total debt jumps, rate shifts again; rates are path-dependent on who calls accrue.
**How found:** Code reading of accrueAccount: noticed accrue() only updates cumulativeInterestRate and _accrueAccountInterest only touches the calling account, so global totals never receive the full interest.
**Insight:** In lazy-accrual lending pools, check that global totalDebt/totalSupply are incremented by the full accrued interest at each accrue, not just the per-user delta; otherwise utilization and rates become caller-order dependent.

