From 78067c8de2510f2df83801c90fad5f574363f746 Mon Sep 17 00:00:00 2001 From: Marc Zeller Date: Wed, 8 Nov 2023 11:08:12 +0000 Subject: [PATCH 1/2] init --- ...um_GHOIncreaseBorrowRate_20231108_after.md | 43 +++++++++++++++ ...thereum_GHOIncreaseBorrowRate_20231108.sol | 22 ++++++++ ...ereum_GHOIncreaseBorrowRate_20231108.t.sol | 32 ++++++++++++ .../GHOIncreaseBorrowRate.md | 37 +++++++++++++ .../GHOIncreaseBorrowRate_20231108.s.sol | 52 +++++++++++++++++++ .../config.json | 19 +++++++ 6 files changed, 205 insertions(+) create mode 100644 diffs/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_before_AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_after.md create mode 100644 src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol create mode 100644 src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol create mode 100644 src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate.md create mode 100644 src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol create mode 100644 src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/config.json diff --git a/diffs/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_before_AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_after.md b/diffs/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_before_AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_after.md new file mode 100644 index 000000000..bf9de31f0 --- /dev/null +++ b/diffs/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_before_AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_after.md @@ -0,0 +1,43 @@ +## Reserve changes + +### Reserves altered + +#### GHO ([0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f](https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f)) + +| description | value before | value after | +| --- | --- | --- | +| interestRateStrategy | [0x1255fC8DC8E76761995aCF544eea54f1B7fB0459](https://etherscan.io/address/0x1255fC8DC8E76761995aCF544eea54f1B7fB0459) | [0xE7C0AE65f7D52E121654eEa0A57b4af0894F6D27](https://etherscan.io/address/0xE7C0AE65f7D52E121654eEa0A57b4af0894F6D27) | +| baseVariableBorrowRate | 3 % | 4.72 % | +| interestRate | ![before](/.assets/014307f374497fc89005a570ba007728a33c0203.svg) | ![after](/.assets/b88e72716b27c4283bf4287c6417a41bc5b4a2b4.svg) | + +## Raw diff + +```json +{ + "reserves": { + "0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f": { + "interestRateStrategy": { + "from": "0x1255fC8DC8E76761995aCF544eea54f1B7fB0459", + "to": "0xE7C0AE65f7D52E121654eEa0A57b4af0894F6D27" + } + } + }, + "strategies": { + "0xE7C0AE65f7D52E121654eEa0A57b4af0894F6D27": { + "from": null, + "to": { + "baseStableBorrowRate": 0, + "baseVariableBorrowRate": "47200000000000000000000000", + "maxExcessStableToTotalDebtRatio": 0, + "maxExcessUsageRatio": 0, + "optimalStableToTotalDebtRatio": 0, + "optimalUsageRatio": 0, + "stableRateSlope1": 0, + "stableRateSlope2": 0, + "variableRateSlope1": 0, + "variableRateSlope2": 0 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol new file mode 100644 index 000000000..b7788903b --- /dev/null +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; + +/** + * @title GHO - Increase Borrow Rate + * @author @Marczeller - ACI + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x9789e054e29f63da5713368be2dd0b4006f4564ef5e48c9d5e994ec20e932e35 + * - Discussion: https://governance.aave.com/t/arfc-gho-increase-borrow-rate/15271 + */ +contract AaveV3Ethereum_GHOIncreaseBorrowRate_20231108 { + + address public constant INTEREST_RATE_STRATEGY = 0xE7C0AE65f7D52E121654eEa0A57b4af0894F6D27; + + function execute() external { + AaveV3Ethereum.POOL_CONFIGURATOR.setReserveInterestRateStrategyAddress( + AaveV3EthereumAssets.GHO_UNDERLYING, + INTEREST_RATE_STRATEGY + ); + } +} diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol new file mode 100644 index 000000000..b2422a4d7 --- /dev/null +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Ethereum_GHOIncreaseBorrowRate_20231108} from './AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol'; + +/** + * @dev Test for AaveV3Ethereum_GHOIncreaseBorrowRate_20231108 + * command: make test-contract filter=AaveV3Ethereum_GHOIncreaseBorrowRate_20231108 + */ +contract AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_Test is ProtocolV3TestBase { + AaveV3Ethereum_GHOIncreaseBorrowRate_20231108 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 18526797); + proposal = new AaveV3Ethereum_GHOIncreaseBorrowRate_20231108(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Ethereum_GHOIncreaseBorrowRate_20231108', + AaveV3Ethereum.POOL, + address(proposal) + ); + } +} diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate.md b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate.md new file mode 100644 index 000000000..813e8d46f --- /dev/null +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate.md @@ -0,0 +1,37 @@ +--- +title: "GHO - Increase Borrow Rate" +author: "@Marczeller - ACI" +discussions: "https://governance.aave.com/t/arfc-gho-increase-borrow-rate/15271" +--- + +## Simple Summary + +This publication proposes increasing the GHO Borrow Rate from 3.00% to 4.72%, slightly below the proposed sDAI rate. + +## Motivation + +By increasing the borrow rate to 4.72%, the goal is to improve the peg by reducing the incentive to mint GHO relative to other stable coins. As a result, GHO's growth is expected to slow. This publication prioritises returning GHO to peg over growth. + +After implementing this proposal, the community can continue with the current plan, direct-to-AIP process for 50 bps increments every 30 days, as long as the GHO peg is outside 0,995<>1,005 monthly average price range, up to 5.5% borrow rate. + +## Specification + +Asset: GHO +Contract Address: 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f +Current Borrow Rate: 3.00% +Proposed Borrow Rate: 4.72% +New discounted Borrow Rate: ~3.31% + +The discount for stkAave holders remains unchanged at 30%. +The Aave Facilitator Bucket Level is to remain at 35.00M units + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol) +- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x9789e054e29f63da5713368be2dd0b4006f4564ef5e48c9d5e994ec20e932e35) +- [Discussion](https://governance.aave.com/t/arfc-gho-increase-borrow-rate/15271) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol new file mode 100644 index 000000000..6a9ff9770 --- /dev/null +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV3Ethereum_GHOIncreaseBorrowRate_20231108} from './AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.sol'; + +/** + * @dev Deploy Ethereum + * command: make deploy-ledger contract=src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol:DeployEthereum chain=mainnet + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + AaveV3Ethereum_GHOIncreaseBorrowRate_20231108 payload0 = new AaveV3Ethereum_GHOIncreaseBorrowRate_20231108(); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(address(payload0)); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction(address(0)); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal2_5( + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate.md' + ) + ); + } +} diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/config.json b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/config.json new file mode 100644 index 000000000..aeb6666e3 --- /dev/null +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/config.json @@ -0,0 +1,19 @@ +{ + "rootOptions": { + "pools": [ + "AaveV3Ethereum" + ], + "title": "GHO - Increase Borrow Rate", + "shortName": "GHOIncreaseBorrowRate", + "date": "20231108", + "author": "@Marczeller - ACI", + "discussion": "https://governance.aave.com/t/arfc-gho-increase-borrow-rate/15271", + "snapshot": "https://snapshot.org/#/aave.eth/proposal/0x9789e054e29f63da5713368be2dd0b4006f4564ef5e48c9d5e994ec20e932e35" + }, + "poolOptions": { + "AaveV3Ethereum": { + "configs": {}, + "features": [] + } + } +} \ No newline at end of file From a3d72f12e56a28a98e20eb6482d394f55e72cb51 Mon Sep 17 00:00:00 2001 From: marczeller Date: Wed, 8 Nov 2023 14:40:34 +0100 Subject: [PATCH 2/2] payload deployed --- .assets/380953098cfaf9c52baabfd063712d8e6bcef690.svg | 1 - .assets/541043868751fc5ea1344f681b00906bdf734fdf.svg | 1 - .assets/64a0110786c519e361963abb7399874664375a85.svg | 1 - .assets/b5cb0fd07fde8594230045982589445fc02ace52.svg | 1 - .../AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol | 2 +- .../GHOIncreaseBorrowRate_20231108.s.sol | 2 +- 6 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 .assets/380953098cfaf9c52baabfd063712d8e6bcef690.svg delete mode 100644 .assets/541043868751fc5ea1344f681b00906bdf734fdf.svg delete mode 100644 .assets/64a0110786c519e361963abb7399874664375a85.svg delete mode 100644 .assets/b5cb0fd07fde8594230045982589445fc02ace52.svg diff --git a/.assets/380953098cfaf9c52baabfd063712d8e6bcef690.svg b/.assets/380953098cfaf9c52baabfd063712d8e6bcef690.svg deleted file mode 100644 index 8cd0062ea..000000000 --- a/.assets/380953098cfaf9c52baabfd063712d8e6bcef690.svg +++ /dev/null @@ -1 +0,0 @@ - Borrow APR, variableBorrow APR, stableUtilization Rate0%25%50%75%100%0%50%100%Optimal 80%Optimal 80% \ No newline at end of file diff --git a/.assets/541043868751fc5ea1344f681b00906bdf734fdf.svg b/.assets/541043868751fc5ea1344f681b00906bdf734fdf.svg deleted file mode 100644 index 58300478c..000000000 --- a/.assets/541043868751fc5ea1344f681b00906bdf734fdf.svg +++ /dev/null @@ -1 +0,0 @@ - Borrow APR, variableBorrow APR, stableUtilization Rate0%25%50%75%100%0%50%100%Optimal 90%Optimal 90% \ No newline at end of file diff --git a/.assets/64a0110786c519e361963abb7399874664375a85.svg b/.assets/64a0110786c519e361963abb7399874664375a85.svg deleted file mode 100644 index 1b4f85f56..000000000 --- a/.assets/64a0110786c519e361963abb7399874664375a85.svg +++ /dev/null @@ -1 +0,0 @@ - Borrow APR, variableBorrow APR, stableUtilization Rate0%25%50%75%100%0%50%100%Optimal 90%Optimal 90% \ No newline at end of file diff --git a/.assets/b5cb0fd07fde8594230045982589445fc02ace52.svg b/.assets/b5cb0fd07fde8594230045982589445fc02ace52.svg deleted file mode 100644 index 59dc7a873..000000000 --- a/.assets/b5cb0fd07fde8594230045982589445fc02ace52.svg +++ /dev/null @@ -1 +0,0 @@ - Borrow APR, variableBorrow APR, stableUtilization Rate0%25%50%75%100%0%200%Optimal 45%Optimal 45% \ No newline at end of file diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol index b2422a4d7..bb49dee49 100644 --- a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/AaveV3Ethereum_GHOIncreaseBorrowRate_20231108.t.sol @@ -15,7 +15,7 @@ contract AaveV3Ethereum_GHOIncreaseBorrowRate_20231108_Test is ProtocolV3TestBas AaveV3Ethereum_GHOIncreaseBorrowRate_20231108 internal proposal; function setUp() public { - vm.createSelectFork(vm.rpcUrl('mainnet'), 18526797); + vm.createSelectFork(vm.rpcUrl('mainnet'), 18527567); proposal = new AaveV3Ethereum_GHOIncreaseBorrowRate_20231108(); } diff --git a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol index 6a9ff9770..d845ae190 100644 --- a/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol +++ b/src/20231108_AaveV3Ethereum_GHOIncreaseBorrowRate/GHOIncreaseBorrowRate_20231108.s.sol @@ -36,7 +36,7 @@ contract CreateProposal is EthereumScript { // compose actions for validation IPayloadsControllerCore.ExecutionAction[] memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); - actionsEthereum[0] = GovV3Helpers.buildAction(address(0)); + actionsEthereum[0] = GovV3Helpers.buildAction(0xA2DE136BFd7ff998C825229FdeBfAF77726c43eC); payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); // create proposal