# Balance Accounting

#### Balance Accounting

A `baseBalances` mapping stores the time-discounted cumulative yield earned at the latest `transfer`, `mint` or `burn` for an address. When multiplied by the cumulative yield, this `baseBalances` mapping returns the accrued rewards. To avoid any rounding errors caused by storing this intermediate state between `balanceOf` reads, `baseBalances` is stored in 27 decimals. This gives high enough accuracy so that the 18 decimal values returned by `balanceOf` are always accurate when formatted to 18 decimals. `WadRayMath` is used to convert and operate on and 27 and 18 decimal values.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kuma.bond/kuma-protocol/developers/smart-contract-architecture/kuma-interest-bearing-token-kibt/balance-accounting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
