Skip to main content
Ban1

General concepts

On both LEC and HEC markets, the interest rate (or borrow APR) is computed using the same function. Regardless of the parameters, the interest rate’s behavior is always the same: as USG’s price decreases, the interest rate increases. The function used in Tangent’s markets allows to:
  • Limit the interest rate between two values;
  • Assign these two values ​​to the limits of a price range;
  • Control the convexity of the curve (i.e. the aggressivity with which the interest rate rises);
  • Implement an inflection point around which the convexity of the curve changes;
  • Control the transition velocity between convexities around the inflection point;
  • Modulate the shape of the curve (exponential, logarithm, sigmoid, etc).

Borrow APR

The formula to compute the interest rate (r(P)) depending on USG’s price is the following: r(P)=Rmin+(RmaxRmin)PmaxPPmaxPminα(P)\color{white} r(P) = R_{\min} + (R_{\max} - R_{\min}) \cdot \frac{P_{\max} - P}{P_{\max} - P_{\min}}^{\alpha(P)} Where:
  • P ⇒ the price of USG;
  • R_min ⇒ the minimum interest rate;
  • R_max ⇒ the maximum interest rate;
  • P_max ⇒ the price of USG at which the minimum interest rate (R_min) is applied;
  • P_min ⇒ the price of USG at which the maximum interest rate (R_max) is applied.
With: α(P)=α1+(α2α1)σ(k(PPinf))\color{white} α(P)=α1​+(α2​−α1​)⋅σ(k(P−P_{\inf}​)) And: σ(x)=11+ex\color{white} σ(x) = \frac{1}{1 + e^{-x}} Where:
  • α1 ⇒ the convexity of the curve before the inflection price (P_inf);
  • α2 ⇒ the convexity of the curve after the inflection price (P_inf);
  • k ⇒ the velocity of the transition between α1 & α2;
  • P_inf ⇒ the inflection price around which the convexity starts to change from α1 to α2.
If USG’s price is above P_max, the interest rate is always equal to R_min and, if USG’s price is below P_min, the interest rate is always equal to R_max. Such a formula allows to adapt the behavior of the interest rate curve to the nature of the collateral. For example, the system can allow a certain downward deviation in the price of USG to facilitate leverage (mostly for stablecoin collateral) by keeping the interest rate low below the inflection price. If the inflection price is crossed, the interest rate will rise aggressively, encouraging leveraged borrowers to deleverage, and thus protecting USG’s peg.

Borrow APY

Like most lending and CDP protocols, Tangent compounds interest every second on each loan’s outstanding debt. Therefore, the actual interest rate paid by borrowers is expressed as an APY. The borrow APY (y(P)) can be computed as follows: y(P)=er(P)1\color{white} y(P) = e^{r(P)} - 1

Examples

Below are three examples showing how the interest rate behaves depending on the chosen parameters.

Example 1

If we consider the following parameters:
  • R_min = 4%
  • R_max = 160%
  • P_max = $1
  • P_min = $0.98
  • α1 = α2 = 2
In the situation where α1 = α2, the value of P_inf and k doesn’t matter, and we obtain an exponential growth of the interest rate as USG’s price decreases. The interest rate curve is then as follows: lec1

Example 2

If we consider the following parameters:
  • R_min = 4%
  • R_max = 160%
  • P_max = $1
  • P_min = $0.98
  • α1 = 2
  • α2 = 4
  • P_inf = $0.99
  • k = 250
In the situation where α1 < α2, the convexity of the curve starts to change when the price of USG approaches the inflection price (P_inf), where the interest rate starts growing exponentially. The interest rate curve is then as follows: test

Example 3

If we consider the following parameters:
  • R_min = 4%
  • R_max = 160%
  • P_max = $1
  • P_min = $0.98
  • α1 = 0.5
  • α2 = 3
  • P_inf = $0.9925
  • k = 1000
In the situation where α1 < α2, and k is high, the convexity of the curve starts to change when the price of USG approaches the inflection price (P_inf), where the interest rate starts growing exponentially, to finally end with a logarithmic progression. The interest rate curve is then as follows: test