Overview
This proposal turns on the HAI system controller.
Details
Turning the controller on involves updating the system's HAI oracle from the hardcoded one to the real one using the
UNI v3 HAI / WETH pool, and setting assorted parameters on the controller (e.g. noiseBarrier, kp, ki, perSecondCumulativeLeak)
More details regarding the choices behind these values can be found in this forum post.
More information on the controller, including definitions for the parameters referenced in this proposal, can be found in the HAI PID Controller Documentation.
This proposal will have 5 actions
1. Update the systemCoinOracle on the Oracle Relayer from the Hardcoded Oracle (HAI)
to the Denominated Oracle (HAI).
// 0x73797374656d436f696e4f7261636c6500000000000000000000000000000000
bytes32 systemCoinOracleParam = bytes32("systemCoinOracle");
// 0x5a1b8327f3b7584b999628398cdcf9844311a836 [address]
bytes denominatedHaiOracle = 0x0000000000000000000000005a1b8327f3b7584b999628398cdcf9844311a836
oracleRelayer.modifyParameters(systemCoinOracleParam, denominatedHaiOracle)
2. Set the controller noise barrier to 1 (no noise barrier).
// 0x6e6f697365426172726965720000000000000000000000000000000000000000
bytes32 noiseBarrierParam = bytes32("noiseBarrier")
// WAD = 1000000000000000000
bytes noiseBarrier = 0x000000000000000000000000000000000000000000000000016345785d8a0000
pidController.modifyParameters(noiseBarrierParam, noiseBarrier)
3. Set the controller Kp term to 1.54712579996991E-07
// 1.54712579996991E-07
// 0.000000154712579996991
// 0.000000154712579996991 * 10 ^ 18 = 154712579996.991 ~ 154712579997
// 0x6b70000000000000000000000000000000000000000000000000000000000000
bytes32 kpParam = bytes32("kp")
// 154712579997
bytes kp = 0x0000000000000000000000000000000000000000000000000000002405969f9d
pidController.modifyParameters(kpParam, kp)
4. Set the controller Ki term to 1.37853553658453E-14
// 1.37853553658453E-14
// 0.0000000000000137853553658453E-14
// 0.0000000000000137853553658453 * 10 ^ 18 = 13785.3553658453 ~ 13785
// 0x6b69000000000000000000000000000000000000000000000000000000000000
bytes32 kiParam = bytes32("ki")
// 13785
bytes ki = 0x00000000000000000000000000000000000000000000000000000000000035d9
pidController.modifyParameters(kiParam, ki)
5. Set the controller integral decay to a 90 day half-life
See original rate formula from MKR.
> bc -l <<< 'scale=27; e( l(.5)/(60 * 60 * 24 * 90) )'
.999999910860706061391497541
// 0x7065725365636f6e6443756d756c61746976654c65616b000000000000000000
bytes32 perSecondCumulativeLeakParam = bytes32("perSecondCumulativeLeak")
// .999999910860706061391497541 [RAY]
// .999999910860706061391497541 * 10 ^ 27
// 999_999_910_860_706_061_391_497_541
// uint256 constant HALF_LIFE_90_DAYS = 999_999_910_860_706_061_391_497_541;
bytes perSecondCumulativeLeak = 0x0000000000000000000000000000000000000000033b2e37cac21cae541c0945
pidController.modifyParameters(perSecondCumulativeLeakParam, perSecondCumulativeLeak)
Contracts referenced in this proposal
- Oracle Relayer -
0x6270403b908505F02Da05BE5c1956aBB59FDb3A6
- Hardcoded Oracle (HAI) -
0x8c212bCaE328669c8b045D467CB78b88e0BE0D39
- Denominated Oracle (HAI) -
0x5a1b8327f3b7584b999628398cdcf9844311a836
- PID Controller -
0x6f9aeC3c0DF4DF7A0Da66453a38B8C767972f609