Formulas and Calculations

The Throttle Module relies on various formulas and calculations to achieve its functionality

Throttle function

t(r,s,m,(LD,ΔVbΔVs))(ΔB,H)<(x,y)t(r, s, m, \left(\frac{L}{D}, \frac{\Delta V_b}{\Delta V_s}\right)) \rightarrow (\Delta B, H) < (x, y)

Rule for comparing pairs is as following:

a,b,c,dQ, (a,b)<(c,d)    (a<b and c<d)\forall a, b, c, d \in \mathbb{Q},\ (a, b) < (c, d) \iff (a < b \text{ and } c < d)

Where:

  • rr: Borrowing rate

  • ss: Throttle surcharge

  • mm: Multiplier on borrowing amount

  • LD\frac{L}{D}: Potential liquidation amount at risk over market depth

  • ΔVbΔVs\frac{ΔV_b}{ΔV_s}: Rate of increase in borrowing velocity versus supply velocity

  • (ΔB,H)(ΔB,H) : Output tuple representing delta in borrowing/supply and market health factor

  • (x,y)(x,y): Threshold values for output control

  • Q\mathbb{Q} is set of all rational numbers

This means that:

  1. Throttle Function is calculated

  2. Output values are compared with Threshold Values

  3. Further actions are based on the result of comparison


Borrowing and supply velocities

Borrowing velocity, Vb=Net increase in borrowing (USD)Wallets transacted per epoch\text{Borrowing velocity, } V_b = \frac{\text{Net increase in borrowing (USD)}}{\text{Wallets transacted per epoch}}
Supply velocity, Vs=Net increase in supply (USD)Wallets transacted per epoch\text{Supply velocity, } V_s = \frac{\text{Net increase in supply (USD)}}{\text{Wallets transacted per epoch}}

Rate of change of these velocities

ΔB=Rate of change of Vb,ΔS=Rate of change of Vs\Delta B = \text{Rate of change of } V_b, \quad \Delta S = \text{Rate of change of } V_s

Borrow Rate Calculations

If ΔBΔSCritical levelrnew=mr+s\text{If } \frac{\Delta B}{\Delta S} \geq \text{Critical level} \Rightarrow r_{\text{new}} = m \cdot r + s

Where rnewr_{new} is a new borrow rate after applying multiplier and surcharge


Total pool at risk ratio

If sudden 50% downside risk, then:

if Pat riskPtotal<x no action neededif xPat riskPtotal<yadjust borrow/supply rates gradually+emit warningsif Pat riskPtotalyadjust rates immediately and liquidateif\ \frac{P_{\text{at risk}}}{P_{\text{total}}} \lt x \Rightarrow \ no \ action \ needed \newline if \ x\leq \frac{P_{\text{at risk}}}{P_{\text{total}}} \lt y \Rightarrow adjust\ borrow/supply\ rates\ gradually+emit\ warnings \newline if\ \frac{P_{\text{at risk}}}{P_{\text{total}}} \geq y \Rightarrow adjust\ rates\ immediately\ and\ liquidate

Where:

xx - primary threshold

yy - secondary threshold

PatriskP_{at-risk} - pool value at risk

PtotalP_{total} - total value of pool

x<yx < y


Rate Adjustment Formula

Adjusted borrow rate=Base Borrow Rate×(1+Multiplier×(ΔSΔBCR))+ SurchargeAdjusted\ borrow\ rate = Base\ Borrow\ Rate×(1+Multiplier×(\frac{ΔS}{ΔB}−CR))\\ + \ Surcharge

Last updated