# Interest rate

Last updated

Last updated

If the borrower's loan amount is less than Maximum loan amount, the borrowing time is T, the value of the NFT pledged by the borrower is V, the amount of the borrower's token is M. When the NFT holder pledges a NFT, the contract can automatically calculate the maximum loan amount based in the corresponding pool, as well as its interest rate. Different loan amounts have different interest rates. The specific calculation method is as follows:

When $a_1$、$a_2$、$a_3$……$a_n$are borrowed from n fund pairs, in each fund pair, the number of tokens borrowed should be less than the total amount of the pair , that is, $a_n$<=$x_{nm}$. Then $a_1$、$a_2$、$a_3$……$a_n$ need to meet the following constraints:

$\begin{cases}
M=a_1+a_{2}+……a_{n} \\
\frac {a_1+a_1*x_1r*T}{V*x_1c}+\frac {a_2+a_2*x_2r*T}{V*x_2c}+……+\frac {a_n+a_n*x_nr*T}{V*x_nc}<1\\
\end{cases}$

Then its comprehensive interest rate is:

$AverageRate=\frac {a_1*x_1r+a_2*x_2r+...+a_n*x_nr}{V}$

The solution with the lowest AverageRate, which meets all the above conditions, is the optimal solution provided by the platform. The interest rate is fixed, and the borrowers can borrow any value that is less than the maximum loan amount, and the system will find the optimal combination of liquidity token pairs that meet the above constraints with a lowest interest rate.