Kord.Fi Lending Contracts use three following indices: deposit_index , net_credit_index and gross_credit_index.
- deposit_index – is an index that shows the growth of deposits by Lenders;
- gross_credit_index – index that tracks the growth of Farmers’ total debt;
- net_credit_index – supplementary index, that indicates the growth of the Farmers' debt portion that is directly owed to Lenders.
Each one of these three indices is calculated in a similar piecewise-linear manner according to a formula:
Therefore, a regular update of these indices is required to limit their maximum values and thus the error compared to the “fair” operation of taking them to the nth power. Since we are dealing with fixed arithmetic operations it is necessary to specify the rounding type: net_credit_index and gross_credit_index are rounded above, while deposit_index is rounded below Thus, conceptually the only difference between the way these indices are calculated is the interest rate type we use for each one of them:
Variable used in its computation
Each successive rate is calculated based on its previous value:
If contract is powered down (is_working=False) net_credit_rate and deposit_rate are automatically assigned values of zero.