Controller Module
Autonomous interest rate governor
Last updated
Autonomous interest rate governor
Last updated
The Controller module autonomously adjusts the value of a global interest rate multiplier for troves based on the deviation of the spot market price from the peg price. Its goal is to minimize the peg error by adjusting the interest rate multiplier to influence the behaviour of trove owners.
The core idea of the controller is:
If the market price of yin
goes above peg, then the multiplier should drop below 1 to encourage users to forge new yin
. By decreasing interest rates across the board, it makes it cheaper for users to take on debt, thereby applying downward pressure on the market price of yin
by increasing the supply of yin
.
If the market price of yin
goes below peg, then the multiplier should increase above 1 to discourage users from forging new yin
and encourage trove owners to repay their existing debt. By increasing interest rates across the board, it makes it more expensive for users to take on debt, thereby applying upward pressure on the market price of yin
by decreasing the supply of yin
.
The controller is mostly a standard PI (Proportional-Integral) controller, except the error is first fed through a nonlinear function. This is done to better control how the controller reacts to errors of various magnitudes.
In concrete terms, thanks to this nonlinearity, the controller may not react very aggressively to an error of 0.01, but react 'disproportionately' more aggressively to an error of 0.015.
This is desirable because small deviations in the synthetic's price can happen for a number of benign reasons and should not necessarily be 'punished' by the controller, but larger deviations can be a sign of a true mismatch between supply and demand and must therefore be harshly corrected by the controller before they spiral out of control.
The Controller acts according to this formula:
Where:
is the error at time step
is the multiplier at time step
the term multiplied by is the proportional term
is the integral term at time step
the term multiplied by is the integral term
is the number of time steps that have passed since the last update to the controller
There are four parameters that can be tuned:
: the gain (i.e., multiplier/scalar) that is applied to the proportional term
: the gain that is applied to the integral term
& : control the 'severity' of the controller's reaction to price deviations from the peg in a nonlinear way