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

# Compounding Model

{% hint style="info" %}
In order to provide maximum flexibility to both Depositors and Borrowers, interest payments are automatically integrated in Deposit and Borrow Balances and are compounded at every block.
{% endhint %}

To compute each Borrow Balance, we use a specific Denominated Currency called $$lToken$$. When a new Lending Pool is created for Token A, we create a $$lToken^A$$, whose price in Token A unit evolves as follows:

$$
L^A\_0=1 \hspace{1cm} and \hspace{1cm}
L^A\_{t+1}=L^A\_t (1+r\_tdt)
$$

where $$d\_t$$ is the time period expressed in years. \
\
By updating this price, each Borrow Balance can be easily incremented by the interest accrued during the period.

For Depositors, we follow a similar approach by introducing a Deposit Token, or $$dToken$$, that represents their ownership in a specific Lending Pool. As opposed to $$lToken$$ , these $$dTokens$$ are minted and transferred to Depositors in exchange for their deposits.

In order to materialize the accruing interest over deposits, $$dToken^A$$ will be convertible into an increasing amount of Token A. With $$R\_t$$being the Deposit rate, the price of $$dToken$$ in Token A Unit, or $$D^A\_t$$, evolves as follows:

$$
D^A\_0=1 \hspace{1cm} and \hspace{1cm}
D^A\_{t+dt}=D^A\_t (1+R\_tdt)
$$

Upon withdrawal, Depositors can redeem their $$dToken^A$$ for Token A at the current price, reflecting their deposits plus the interest earned.
