> For the complete documentation index, see [llms.txt](https://docs.belugas.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.belugas.io/getting-started/protocol-math.md).

# Protocol Math

The Belugas protocol contracts use a system of exponential math, [Exponential.sol](https://github.com/Belugas-Protocol/belugas-protocol/blob/main/contracts/Exponential.sol), in order to represent fractional quantities with sufficient precision.

Most numbers are represented as a mantissa, an unsigned integer scaled by `1 * 10 ^ 18`, in order to perform basic math at a high level of precision.

{% content-ref url="/pages/6SlR0ihkrR4rYq4VrOs8" %}
[bToken and Underlying Decimals](/getting-started/protocol-math/atoken-and-underlying-decimals.md)
{% endcontent-ref %}

{% content-ref url="/pages/fV5PUK3lmLqhbVNxt8Ze" %}
[Interpreting Exchange Rates](/getting-started/protocol-math/interpreting-exchange-rates.md)
{% endcontent-ref %}

{% content-ref url="/pages/YnRXEggYfTGV4RDI03tC" %}
[Calculating Accrued Interest](/getting-started/protocol-math/calculating-accrued-interest.md)
{% endcontent-ref %}

{% content-ref url="/pages/kpc5gRjO6fvt8FKdK5Qh" %}
[Calculating the APY Using Rate Per Block](/getting-started/protocol-math/calculating-the-apy-using-rate-per-block.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.belugas.io/getting-started/protocol-math.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.
