This post presents the options we have for ungoverning the RAI controller and explains a drawback with the current implementation.
Current RAI Controller
The system currently uses the absolute error between the market and redemption prices in order to compute rates. Using a percent error though produce consistent rates under RAI/USD price changes.
Rate Calculation
The mainnet RAI controller is currently only a P-controller, so the redemption rate is calculated as:
redemption_rate = Kp * (redemption_price - market_price)
where error = redemption_price - market_price
.
Since the error term is the absolute error between redemption and market prices, the resulting rate is dependent on the RAI/USD price.
In other words, a 1% market fluctuation will produce different rates for different RAI target prices ($2, $3, $4, etc).
Example
To demonstrate the issue with using absolute error, consider the two cases below, each with a different starting redemption price.
Each case shows the redemption and market prices(top), the absolute error(middle), and the resulting redemption rate(bottom).
You can see that, while both market prices experience fluctations of 1%, the scenario shown on the right produces much higher rates because of the larger redemption price.
Implications and Potential Solution
If the target price was to drift considerably from itās current value of approximately $3.0383, the system would produce rates of a much different magnitude.
Instead of an absolute error, the RAI controller could use a percent error to calculate a redemption rate:
pct_error = (redemption_price - market_price) / redemption_price
This would produce the same rates irrespective of the current redemption price. Thereās one caveat though.
If we want to match the above case rate behavior, we simply need to multiply the original Kp
by 3
:
rate_pct = rate_absolute
Kp_new * pct_error = Kp * absolute_error
Kp_new * 0.01 = Kp * 0.03
Kp_new = Kp * 0.03 / 0.01
Kp_new = 3 * Kp = 3 * 7.5e^{-8} = 2.25e^{-7}
And with these formulas, we now get the following scenarios:
Ungoverning the Controller
Controller ungovernance is set to happen in late summer 2022. It may seem thereās a long way to go but we must have a clear idea of the type of controller to use (absolute vs percentage error), whether the community may want to leverage an integral term as well as whether the Kp and Ki parameters can be changed within specific limits.
There are nine scenarios for the RAI controller:
- Use an absolute proportional controller with no option to change its parameters, ever
- Use an absolute proportional controller with the option to change its Kp value within specific bands (to be discussed which bands)
- Use a percentage proportional controller with no option to change its parameters, ever
- Use a percentage proportional controller with the option to change its Kp value within specific bands (to be discussed which bands)
- Use a proportional-integral controller (same four variations as above with percentage vs absolute and fixed vs governable Kp & Ki within certain bands)
- Deploy a controller and allow its implementation to be changed using predeployed smart contracts; here, RAI can have P or PI controllers already deployed where the community can change Kp/Ki values within certain bands as well as swap the controller logic between P, PI and their absolute and percentage error variations
This is a big decision for RAIās future so weād like to hear more people pitch in, specifically on whether controller parameters may be changed within certain bands and on whether the controller can have several predeployed implementations or a single one thatās set in stone.