From 4fda3134c4f7f2eb89a388fac61c6c05e73e35a0 Mon Sep 17 00:00:00 2001 From: Rozengarden Date: Fri, 22 Nov 2024 14:57:24 +0100 Subject: [PATCH] feat: USDS BR update --- ...eOnCoreAndPrimeInstances_20241122_after.md | 50 ++++++++++++++ ...eOnCoreAndPrimeInstances_20241122_after.md | 30 ++++++++ ...UpdateOnCoreAndPrimeInstances_20241122.sol | 44 ++++++++++++ ...dateOnCoreAndPrimeInstances_20241122.t.sol | 34 +++++++++ ...UpdateOnCoreAndPrimeInstances_20241122.sol | 37 ++++++++++ ...dateOnCoreAndPrimeInstances_20241122.t.sol | 34 +++++++++ ...BorrowRateUpdateOnCoreAndPrimeInstances.md | 69 +++++++++++++++++++ ...dateOnCoreAndPrimeInstances_20241122.s.sol | 68 ++++++++++++++++++ .../config.ts | 50 ++++++++++++++ 9 files changed, 416 insertions(+) create mode 100644 diffs/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md create mode 100644 diffs/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances.md create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol create mode 100644 src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/config.ts diff --git a/diffs/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md b/diffs/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md new file mode 100644 index 000000000..3c31dbb71 --- /dev/null +++ b/diffs/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md @@ -0,0 +1,50 @@ +## Reserve changes + +### Reserve altered + +#### sUSDe ([0x9D39A5DE30e57443BfF2A8307A4256c8797A3497](https://etherscan.io/address/0x9D39A5DE30e57443BfF2A8307A4256c8797A3497)) + +| description | value before | value after | +| --- | --- | --- | +| isFrozen | false | true | +| ltv | 0.05 % [5] | 0 % [0] | + + +#### USDS ([0xdC035D45d973E3EC169d2276DDab16f1e407384F](https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F)) + +| description | value before | value after | +| --- | --- | --- | +| maxVariableBorrowRate | 82 % | 84 % | +| variableRateSlope1 | 6.25 % | 8.25 % | +| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=62500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=7500000000000000000000000&maxVariableBorrowRate=820000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=82500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=7500000000000000000000000&maxVariableBorrowRate=840000000000000000000000000) | + +## Raw diff + +```json +{ + "reserves": { + "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497": { + "isFrozen": { + "from": false, + "to": true + }, + "ltv": { + "from": 5, + "to": 0 + } + } + }, + "strategies": { + "0xdC035D45d973E3EC169d2276DDab16f1e407384F": { + "maxVariableBorrowRate": { + "from": "820000000000000000000000000", + "to": "840000000000000000000000000" + }, + "variableRateSlope1": { + "from": "62500000000000000000000000", + "to": "82500000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md b/diffs/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md new file mode 100644 index 000000000..c90ccb35b --- /dev/null +++ b/diffs/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_before_AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_after.md @@ -0,0 +1,30 @@ +## Reserve changes + +### Reserves altered + +#### USDS ([0xdC035D45d973E3EC169d2276DDab16f1e407384F](https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F)) + +| description | value before | value after | +| --- | --- | --- | +| maxVariableBorrowRate | 82 % | 84 % | +| baseVariableBorrowRate | 6.25 % | 8.25 % | +| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=7500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=62500000000000000000000000&maxVariableBorrowRate=820000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=7500000000000000000000000&variableRateSlope2=750000000000000000000000000&optimalUsageRatio=920000000000000000000000000&baseVariableBorrowRate=82500000000000000000000000&maxVariableBorrowRate=840000000000000000000000000) | + +## Raw diff + +```json +{ + "strategies": { + "0xdC035D45d973E3EC169d2276DDab16f1e407384F": { + "baseVariableBorrowRate": { + "from": "62500000000000000000000000", + "to": "82500000000000000000000000" + }, + "maxVariableBorrowRate": { + "from": "820000000000000000000000000", + "to": "840000000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol new file mode 100644 index 000000000..c5d30aa41 --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3EthereumLido, AaveV3EthereumLidoAssets} from 'aave-address-book/AaveV3EthereumLido.sol'; +import {AaveV3PayloadEthereumLido} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereumLido.sol'; +import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title USDS borrow rate update on Core and Prime Instances + * @author Aave Chan Initiative + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901 + */ +contract AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 is + AaveV3PayloadEthereumLido +{ + function _postExecute() internal override { + AaveV3EthereumLido.POOL_CONFIGURATOR.setReserveFreeze( + AaveV3EthereumLidoAssets.sUSDe_UNDERLYING, + true + ); + } + + function rateStrategiesUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory) + { + IAaveV3ConfigEngine.RateStrategyUpdate[] + memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1); + rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({ + asset: AaveV3EthereumLidoAssets.USDS_UNDERLYING, + params: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: EngineFlags.KEEP_CURRENT, + baseVariableBorrowRate: EngineFlags.KEEP_CURRENT, + variableRateSlope1: 8_25, + variableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } +} diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol new file mode 100644 index 000000000..838e759f4 --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3EthereumLido} from 'aave-address-book/AaveV3EthereumLido.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol'; +import {AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol'; + +/** + * @dev Test for AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 + * command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol -vv + */ +contract AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_Test is + ProtocolV3TestBase +{ + AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 21243125); + proposal = new AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122', + AaveV3EthereumLido.POOL, + address(proposal) + ); + } +} diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol new file mode 100644 index 000000000..9fcc5104b --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; +import {AaveV3PayloadEthereum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol'; +import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title USDS borrow rate update on Core and Prime Instances + * @author Aave Chan Initiative + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901 + */ +contract AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 is + AaveV3PayloadEthereum +{ + function rateStrategiesUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory) + { + IAaveV3ConfigEngine.RateStrategyUpdate[] + memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1); + rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({ + asset: AaveV3EthereumAssets.USDS_UNDERLYING, + params: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: EngineFlags.KEEP_CURRENT, + baseVariableBorrowRate: 8_25, + variableRateSlope1: EngineFlags.KEEP_CURRENT, + variableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } +} diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol new file mode 100644 index 000000000..87e76f1c7 --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol @@ -0,0 +1,34 @@ +// 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/src/ProtocolV3TestBase.sol'; +import {AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol'; + +/** + * @dev Test for AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 + * command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol -vv + */ +contract AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122_Test is + ProtocolV3TestBase +{ + AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 21243091); + proposal = new AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122', + AaveV3Ethereum.POOL, + address(proposal) + ); + } +} diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances.md b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances.md new file mode 100644 index 000000000..11061d1e6 --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances.md @@ -0,0 +1,69 @@ +--- +title: "USDS borrow rate update on Core and Prime Instances" +author: "Aave Chan Initiative" +discussions: "https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901" +snapshot: "Direct-to-AIP" +--- + +## Simple Summary + +This proposal recommends increasing the USDS Core Instance Base Rate (currently at 6.25%) and Slope1 (currently at 6.25%) on Prime Market. + +Raising USDS borrowing rates ensures the SSR remains competitive, attracting demand while discouraging excessive borrowing at unsustainable levels. + +We also propose pausing sUSDe operations in the Prime instance to focus on scaling USDS liquidity in the Core Market, where there is significant demand. + +This is a Direct to AIP Proposal. + +## Motivation + +Recent observations in the market have highlighted issues stemming from **sUSDe** in the Prime instance: + +1. **sUSDeā€™s Impact on USDS Borrow Rate**:The presence of sUSDe is driving up the USDS Borrow Rate, creating pressure in the Prime Instance. The high rates pose a risk of cascading rebalances, particularly: + +- wstETH collateral migrates to Spark for USDS liquidity. +- ezETH loopers exit due to spiking wstETH borrow rates. +- Resulting in a significant outflow of AUM from the market. + +2. **Mismatch Between Liquidity and Risk**: + +- The liquidity needs of sUSDe are not being met effectively, leading to imbalance. +- The market is unable to accommodate the current sUSDe scale without affecting overall stability. + +While at same time there is substantial **Untapped Demand in the Core Instance**: + +- The substantial demand in the Core Instance presents an opportunity to scale USDS aggressively while mitigating risk. + +## Specification + +### 1. **Increase USDS Base Rate 2% on Core Instance and 2% Slope1 on Prime Instance** + +- Adjusting the borrow rate is a necessary step to manage the borrowing cost dynamics and balance the market risk posed by sUSDe. +- This adjustment should be implemented across both the Prime and Core Instances. + +### 2. **Pause sUSDe on Prime Instance** + +- Temporarily halt sUSDe operations in the Prime stance to stabilize the market and focus on optimizing the Core Instance. +- This pause will allow time to reassess the sizing of sUSDe based on available liquidity and market condition. + +| **Parameter** | **Current** | **Proposed** | **Change** | +| -------------- | ----------- | ------------ | ---------- | +| _Prime Market_ | | | | +| Base | 0.75% | 0.75% | No change | +| Slope1 | 6.25% | 8.25% | +2% | +| Slope2 | 75% | 75% | No change | +| _Core Market_ | | | | +| Base | 6.25% | 8.25% | +2% | +| Slope1 | 0.75% | 0.75% | No change | +| Slope2 | 75% | 75% | No change | + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol), [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.t.sol) +- Snapshot: Direct-to-AIP +- [Discussion](https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol new file mode 100644 index 000000000..bc72b3daa --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol'; +import {AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol'; +import {AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122} from './AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol:DeployEthereum chain=mainnet + * verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode + ); + address payload1 = GovV3Helpers.deployDeterministic( + type(AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](2); + actions[0] = GovV3Helpers.buildAction(payload0); + actions[1] = GovV3Helpers.buildAction(payload1); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122.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[](2); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode + ); + actionsEthereum[1] = GovV3Helpers.buildAction( + type(AaveV3EthereumLido_USDSBorrowRateUpdateOnCoreAndPrimeInstances_20241122).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/USDSBorrowRateUpdateOnCoreAndPrimeInstances.md' + ) + ); + } +} diff --git a/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/config.ts b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/config.ts new file mode 100644 index 000000000..39f5ed194 --- /dev/null +++ b/src/20241122_Multi_USDSBorrowRateUpdateOnCoreAndPrimeInstances/config.ts @@ -0,0 +1,50 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + configFile: 'src/20241122_Multi_IncreaseUSDSCoreAndPrimeInstanceBaseRateTo825/config.ts', + author: 'Aave Chan Initiative', + pools: ['AaveV3Ethereum', 'AaveV3EthereumLido'], + title: 'USDS borrow rate update on Core and Prime Instances', + shortName: 'USDSBorrowRateUpdateOnCoreAndPrimeInstances', + date: '20241122', + discussion: + 'https://governance.aave.com/t/arfc-usds-borrow-rate-update-on-core-and-prime-instances/19901', + snapshot: 'Direct-to-AIP', + votingNetwork: 'POLYGON', + }, + poolOptions: { + AaveV3Ethereum: { + configs: { + RATE_UPDATE_V3: [ + { + asset: 'USDS', + params: { + optimalUtilizationRate: '', + baseVariableBorrowRate: '8.25', + variableRateSlope1: '', + variableRateSlope2: '', + }, + }, + ], + }, + cache: {blockNumber: 21243091}, + }, + AaveV3EthereumLido: { + configs: { + RATE_UPDATE_V3: [ + { + asset: 'USDS', + params: { + optimalUtilizationRate: '', + baseVariableBorrowRate: '', + variableRateSlope1: '8.25', + variableRateSlope2: '', + }, + }, + ], + FREEZE: [{asset: 'sUSDe', shouldBeFrozen: true}], + }, + cache: {blockNumber: 21243125}, + }, + }, +};