Skip to content

Commit

Permalink
PI controller proposal (draft)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat committed Jul 25, 2024
1 parent 69edbee commit 0ed86ac
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 4 deletions.
45 changes: 41 additions & 4 deletions gov-input/mainnet/ModifyParameters-EnableController.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,52 @@
{
"chainid": 42161,
"description": "Enable the redemption rate controller mechanism",
"description": "Turn on OD Controller\n## Overview\n\nThis proposal turns on the OD redemption rate controller\n\n## Discussion\n\nSee forum discussion https://commonwealth.im/open-dollar-governance/discussion/17145-proposal-initial-collateral-factors-and-pi-controller-parameter-recommendations\n\nTurning the controller on involves updating the system's OD oracle from the hardcoded one to the real one using the [Camelot OD / WETH pool](https://info.camelot.exchange/pair/arbitrum/v3/0x824959a55907d5350e73e151ff48dabc5a37a657), and setting assorted parameters on the controller (e.g. noiseBarrier, kp, ki, perSecondCumulativeLeak)\n\n## Oracles\n\nNew oracles were deployed for OD/WETH pool using our audited [od-relayer oracles ](https://github.com/open-dollar/od-relayer/releases/tag/v1.7.2)\n\n```\nMAINNET_CHAINLINK_L2VALIDITY_ETH_USD_RELAYER = 0x4617Feb8B72167c3b8253a1327CddE44e54670Ce;\nMAINNET_CAMELOT_OD_WETH_RELAYER = 0x43261bFF12F8D26Ae3E3ef6924Eca6FA5c32f4b6;\nMAINNET_DENOMINATED_OD_USD_ORACLE = 0x53BA82f08639F5D0ac7b61471A6CAc0B2FAb7372;\n```\n\nThe OD/USD oracle 0x43261bFF12F8D26Ae3E3ef6924Eca6FA5c32f4b6 will be updated as the new `systemCoinOracle` in the Oracle Relayer.\n\n## PI Controller Settings\n\nThe intended settings are listed below, and also in the [Open Dollar Protocol Parameters](https://build.opendollar.com/Open-Dollar-Protocol-Parameters-bdd5be16b5774ce1b8f8a167be1ad3e9?pvs=4) document.\n\n\n#### pidControllerGains\n\nThe DAO has decided to update the controller gains (kp and ki) per the recommendations of the 0xSideQuest team. See the forum discussion for more details, including a final analytical report: https://commonwealth.im/open-dollar-governance/discussion/17145-proposal-initial-collateral-factors-and-pi-controller-parameter-recommendations\n\n```\nkp: 144_301_433_810 // WAD 1.443014338103e-07\nki: 16_442 // WAD 1.6442e-14 \n```\n\n#### oracleRelayerParams\n\nThis proposal updates the boundaries for the redemption rate.\n\n```\nredemptionRateUpperBound: 1000000074561623060142516377 // RAY\nredemptionRateLowerBound: 999999926985508341799701018 // RAY\n```\n\n#### pidControllerParams\n\nThis proposal makes a few additional changes to controller settings based on the recommendation of the HAI and Open Dollar community.\n\n- Set the noise barrier to 1e18 (no noise barrier)\n- Update perSecondCumulativeLeak from 30 day to 90 days\n\n```\nperSecondCumulativeLeak: 999_999_910_860_706_061_391_497_541 // HALF_LIFE_90_DAYS Decay constant for the integral deviation\nnoiseBarrier: 1000000000000000000, // No noise barrier\nfeedbackOutputLowerBound: -999999999999999999999999999, // (unbounded) Minimum limit for the redemption rate.\nfeedbackOutputUpperBound: RAD, // (unbounded) Maximum limit for the redemption rate\nintegralPeriodSize: 1 hours // Minimum duration required to calculate integral deviation\n```\n\n#### pidRateSetterParams\n\nNo change here.\n\n```\nupdateRateDelay: 1 hours // Time gap between successive redemption rate adjustments\n```\n\n---\n\nTo create your own proposal use the CLI tool [`od-governance-manager`](https://github.com/open-dollar/od-governance-manager) and submit a PR.\n\n",
"network": "mainnet",
"proposalType": "ModifyParameters",
"ODGovernor_Address": "",
"objectArray": [
{
"target": "0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"param": "systemCoinOracle",
"type": "address",
"data": "0x4617Feb8B72167c3b8253a1327CddE44e54670Ce"
"data": "0x53BA82f08639F5D0ac7b61471A6CAc0B2FAb7372"
},
{
"target": "0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"param": "redemptionRateUpperBound",
"type": "uint256",
"data": "1000000074561623060142516377"
},
{
"target": "0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"param": "redemptionRateLowerBound",
"type": "uint256",
"data": "999999926985508341799701018"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "kp",
"type": "int256",
"data": "144301433810"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "ki",
"type": "int256",
"data": "16442"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "noiseBarrier",
"type": "uint256",
"data": "1000000000000000000"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "perSecondCumulativeLeak",
"type": "uint256",
"data": "999999910860706061391497541"
}
],
"arrayLength": "1"
}
"arrayLength": "7"
}
81 changes: 81 additions & 0 deletions gov-output/mainnet/modifyParameters-7_25_2024-49101771.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"ODGovernor_Address": "0xf704735CE81165261156b41D33AB18a08803B86F",
"arrayLength": "7",
"calldatas": [
"0xda8a4bb873797374656d436f696e4f7261636c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002000000000000000000000000053ba82f08639f5d0ac7b61471a6cac0b2fab7372",
"0xda8a4bb8726564656d7074696f6e526174655570706572426f756e640000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000033b2e40aa90995de05e6899",
"0xda8a4bb8726564656d7074696f6e526174654c6f776572426f756e640000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000033b2e38aa88eaec113fca1a",
"0xda8a4bb86b700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000021990923d2",
"0xda8a4bb86b6900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000403a",
"0xda8a4bb86e6f697365426172726965720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000de0b6b3a7640000",
"0xda8a4bb87065725365636f6e6443756d756c61746976654c65616b000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000033b2e37cac21cae541c0945"
],
"chainid": 42161,
"description": "Turn on OD Controller\n## Overview\n\nThis proposal turns on the OD redemption rate controller\n\n## Discussion\n\nSee forum discussion https://commonwealth.im/open-dollar-governance/discussion/17145-proposal-initial-collateral-factors-and-pi-controller-parameter-recommendations\n\nTurning the controller on involves updating the system's OD oracle from the hardcoded one to the real one using the [Camelot OD / WETH pool](https://info.camelot.exchange/pair/arbitrum/v3/0x824959a55907d5350e73e151ff48dabc5a37a657), and setting assorted parameters on the controller (e.g. noiseBarrier, kp, ki, perSecondCumulativeLeak)\n\n## Oracles\n\nNew oracles were deployed for OD/WETH pool using our audited [od-relayer oracles ](https://github.com/open-dollar/od-relayer/releases/tag/v1.7.2)\n\n```\nMAINNET_CHAINLINK_L2VALIDITY_ETH_USD_RELAYER = 0x4617Feb8B72167c3b8253a1327CddE44e54670Ce;\nMAINNET_CAMELOT_OD_WETH_RELAYER = 0x43261bFF12F8D26Ae3E3ef6924Eca6FA5c32f4b6;\nMAINNET_DENOMINATED_OD_USD_ORACLE = 0x53BA82f08639F5D0ac7b61471A6CAc0B2FAb7372;\n```\n\nThe OD/USD oracle 0x43261bFF12F8D26Ae3E3ef6924Eca6FA5c32f4b6 will be updated as the new `systemCoinOracle` in the Oracle Relayer.\n\n## PI Controller Settings\n\nThe intended settings are listed below, and also in the [Open Dollar Protocol Parameters](https://build.opendollar.com/Open-Dollar-Protocol-Parameters-bdd5be16b5774ce1b8f8a167be1ad3e9?pvs=4) document.\n\n\n#### pidControllerGains\n\nThe DAO has decided to update the controller gains (kp and ki) per the recommendations of the 0xSideQuest team. See the forum discussion for more details, including a final analytical report: https://commonwealth.im/open-dollar-governance/discussion/17145-proposal-initial-collateral-factors-and-pi-controller-parameter-recommendations\n\n```\nkp: 144_301_433_810 // WAD 1.443014338103e-07\nki: 16_442 // WAD 1.6442e-14 \n```\n\n#### oracleRelayerParams\n\nThis proposal updates the boundaries for the redemption rate.\n\n```\nredemptionRateUpperBound: 1000000074561623060142516377 // RAY\nredemptionRateLowerBound: 999999926985508341799701018 // RAY\n```\n\n#### pidControllerParams\n\nThis proposal makes a few additional changes to controller settings based on the recommendation of the HAI and Open Dollar community.\n\n- Set the noise barrier to 1e18 (no noise barrier)\n- Update perSecondCumulativeLeak from 30 day to 90 days\n\n```\nperSecondCumulativeLeak: 999_999_910_860_706_061_391_497_541 // HALF_LIFE_90_DAYS Decay constant for the integral deviation\nnoiseBarrier: 1000000000000000000, // No noise barrier\nfeedbackOutputLowerBound: -999999999999999999999999999, // (unbounded) Minimum limit for the redemption rate.\nfeedbackOutputUpperBound: RAD, // (unbounded) Maximum limit for the redemption rate\nintegralPeriodSize: 1 hours // Minimum duration required to calculate integral deviation\n```\n\n#### pidRateSetterParams\n\nNo change here.\n\n```\nupdateRateDelay: 1 hours // Time gap between successive redemption rate adjustments\n```\n\n---\n\nTo create your own proposal use the CLI tool [`od-governance-manager`](https://github.com/open-dollar/od-governance-manager) and submit a PR.\n\n",
"descriptionHash": "0x438c2b3f3434451efcf867173a4a4c2c66dffd62dbd099eec7eed219ffc6ea2d",
"network": "mainnet",
"objectArray": [
{
"target": "0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"param": "systemCoinOracle",
"type": "address",
"data": "0x53BA82f08639F5D0ac7b61471A6CAc0B2FAb7372"
},
{
"target": "0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"param": "redemptionRateUpperBound",
"type": "uint256",
"data": "1000000074561623060142516377"
},
{
"target": "0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"param": "redemptionRateLowerBound",
"type": "uint256",
"data": "999999926985508341799701018"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "kp",
"type": "int256",
"data": "144301433810"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "ki",
"type": "int256",
"data": "16442"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "noiseBarrier",
"type": "uint256",
"data": "1000000000000000000"
},
{
"target": "0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"param": "perSecondCumulativeLeak",
"type": "uint256",
"data": "999999910860706061391497541"
}
],
"proposalId": "49101771980018385933421168827375781146312688972803345844503402129403791100270",
"proposalType": "ModifyParameters",
"targets": [
"0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"0x7404fc1F3796748FAE17011b57Fad9713185c1d6",
"0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C",
"0x51f0434645Aa8a98cFa9f0fE7b373297a95Fe92C"
],
"values": [
0,
0,
0,
0,
0,
0,
0
]
}

0 comments on commit 0ed86ac

Please sign in to comment.