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

# Protocol Math

The Agile protocol contracts use a system of exponential math, [Exponential.sol](https://github.com/agilefinance/agile-protocol/blob/master/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/Zn7ZpBW7pqNonWUD21Av" %}
[aToken and Underlying Decimals](/getting-started/protocol-math/atoken-and-underlying-decimals.md)
{% endcontent-ref %}

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

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

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