# AMM Credit

Borrowing and lending is built with a constant product formula based on:

**A * C * I = P**

Where A is the amount of assets that can be borrowed, C is the collateral locked by borrowers, I is the real-time interest rate and P is the invariance constant product.

The interest rates and minimum collateral requirements change dynamically according to the constant product formula. Arbitrage traders normalize the rates whenever the protocol's interest rate or collateral factor stops being equal to the total market rates.

When adding liquidity, the value of A,C and I are calculated to maintain the same ratio such that:

**a = rA,c = rC,i = rI**

Last modified 11mo ago