From bc6cb8c2474e2ca9a09e757e07269139f2295eb6 Mon Sep 17 00:00:00 2001 From: Alice <121383428+Rozengarden@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:34:45 +0100 Subject: [PATCH] feat: CL recommendation on WBTC Uopt & RF (#532) --- ...actorAndUOptimalIncrease_20241120_after.md | 44 +++++ ...actorAndUOptimalIncrease_20241120_after.md | 44 +++++ ...actorAndUOptimalIncrease_20241120_after.md | 44 +++++ ...actorAndUOptimalIncrease_20241120_after.md | 48 ++++++ ...erveFactorAndUOptimalIncrease_20241120.sol | 55 +++++++ ...veFactorAndUOptimalIncrease_20241120.t.sol | 32 ++++ ...erveFactorAndUOptimalIncrease_20241120.sol | 55 +++++++ ...veFactorAndUOptimalIncrease_20241120.t.sol | 32 ++++ ...erveFactorAndUOptimalIncrease_20241120.sol | 55 +++++++ ...veFactorAndUOptimalIncrease_20241120.t.sol | 32 ++++ ...erveFactorAndUOptimalIncrease_20241120.sol | 55 +++++++ ...veFactorAndUOptimalIncrease_20241120.t.sol | 32 ++++ .../WBTCReserveFactorAndUOptimalIncrease.md | 70 ++++++++ ...veFactorAndUOptimalIncrease_20241120.s.sol | 150 ++++++++++++++++++ .../config.ts | 120 ++++++++++++++ 15 files changed, 868 insertions(+) create mode 100644 diffs/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md create mode 100644 diffs/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md create mode 100644 diffs/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md create mode 100644 diffs/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease.md create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol create mode 100644 src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/config.ts diff --git a/diffs/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md b/diffs/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md new file mode 100644 index 000000000..9d00eda70 --- /dev/null +++ b/diffs/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md @@ -0,0 +1,44 @@ +## Reserve changes + +### Reserves altered + +#### WBTC ([0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f](https://arbiscan.io/address/0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 20 % [2000] | 50 % [5000] | +| optimalUsageRatio | 45 % | 80 % | +| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=450000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | + +## Emodes changed + +### EMode: Stablecoins(id: 1) + + + +### EMode: ETH correlated(id: 2) + + + +## Raw diff + +```json +{ + "reserves": { + "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f": { + "reserveFactor": { + "from": 2000, + "to": 5000 + } + } + }, + "strategies": { + "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f": { + "optimalUsageRatio": { + "from": "450000000000000000000000000", + "to": "800000000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md b/diffs/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md new file mode 100644 index 000000000..495604a7a --- /dev/null +++ b/diffs/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md @@ -0,0 +1,44 @@ +## Reserve changes + +### Reserves altered + +#### WBTC ([0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599](https://etherscan.io/address/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 20 % [2000] | 50 % [5000] | +| optimalUsageRatio | 45 % | 80 % | +| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=450000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | + +## Emodes changed + +### EMode: ETH correlated(id: 1) + + + +### EMode: sUSDe Stablecoins(id: 2) + + + +## Raw diff + +```json +{ + "reserves": { + "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599": { + "reserveFactor": { + "from": 2000, + "to": 5000 + } + } + }, + "strategies": { + "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599": { + "optimalUsageRatio": { + "from": "450000000000000000000000000", + "to": "800000000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md b/diffs/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md new file mode 100644 index 000000000..31c026ce8 --- /dev/null +++ b/diffs/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md @@ -0,0 +1,44 @@ +## Reserve changes + +### Reserves altered + +#### WBTC ([0x68f180fcCe6836688e9084f035309E29Bf0A2095](https://optimistic.etherscan.io/address/0x68f180fcCe6836688e9084f035309E29Bf0A2095)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 20 % [2000] | 50 % [5000] | +| optimalUsageRatio | 45 % | 80 % | +| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=450000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | + +## Emodes changed + +### EMode: Stablecoins(id: 1) + + + +### EMode: ETH correlated(id: 2) + + + +## Raw diff + +```json +{ + "reserves": { + "0x68f180fcCe6836688e9084f035309E29Bf0A2095": { + "reserveFactor": { + "from": 2000, + "to": 5000 + } + } + }, + "strategies": { + "0x68f180fcCe6836688e9084f035309E29Bf0A2095": { + "optimalUsageRatio": { + "from": "450000000000000000000000000", + "to": "800000000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md b/diffs/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md new file mode 100644 index 000000000..d8df55857 --- /dev/null +++ b/diffs/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_before_AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_after.md @@ -0,0 +1,48 @@ +## Reserve changes + +### Reserves altered + +#### WBTC ([0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6](https://polygonscan.com/address/0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 20 % [2000] | 50 % [5000] | +| optimalUsageRatio | 45 % | 80 % | +| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=450000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | + +## Emodes changed + +### EMode: Stablecoins(id: 1) + + + +### EMode: MATIC correlated(id: 2) + + + +### EMode: ETH correlated(id: 3) + + + +## Raw diff + +```json +{ + "reserves": { + "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6": { + "reserveFactor": { + "from": 2000, + "to": 5000 + } + } + }, + "strategies": { + "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6": { + "optimalUsageRatio": { + "from": "450000000000000000000000000", + "to": "800000000000000000000000000" + } + } + } +} +``` \ No newline at end of file diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol new file mode 100644 index 000000000..d3b3ed565 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; +import {AaveV3PayloadArbitrum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadArbitrum.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 WBTC Reserve Factor and UOptimal Increase + * @author Aave Chan Initiative + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596 + */ +contract AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120 is AaveV3PayloadArbitrum { + function rateStrategiesUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory) + { + IAaveV3ConfigEngine.RateStrategyUpdate[] + memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1); + rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({ + asset: AaveV3ArbitrumAssets.WBTC_UNDERLYING, + params: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: 80_00, + baseVariableBorrowRate: EngineFlags.KEEP_CURRENT, + variableRateSlope1: EngineFlags.KEEP_CURRENT, + variableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3ArbitrumAssets.WBTC_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 50_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol new file mode 100644 index 000000000..0cd53b7e8 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol'; +import {AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; + +/** + * @dev Test for AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120 + * command: FOUNDRY_PROFILE=arbitrum forge test --match-path=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol -vv + */ +contract AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120_Test is ProtocolV3TestBase { + AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('arbitrum'), 276532623); + proposal = new AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120', + AaveV3Arbitrum.POOL, + address(proposal) + ); + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol new file mode 100644 index 000000000..9d7f154f4 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol @@ -0,0 +1,55 @@ +// 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 WBTC Reserve Factor and UOptimal Increase + * @author Aave Chan Initiative + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596 + */ +contract AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120 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.WBTC_UNDERLYING, + params: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: 80_00, + baseVariableBorrowRate: EngineFlags.KEEP_CURRENT, + variableRateSlope1: EngineFlags.KEEP_CURRENT, + variableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3EthereumAssets.WBTC_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 50_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol new file mode 100644 index 000000000..dffa5e34f --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.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/src/ProtocolV3TestBase.sol'; +import {AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; + +/** + * @dev Test for AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120 + * command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol -vv + */ +contract AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120_Test is ProtocolV3TestBase { + AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 21230828); + proposal = new AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120', + AaveV3Ethereum.POOL, + address(proposal) + ); + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol new file mode 100644 index 000000000..eca72f78b --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol'; +import {AaveV3PayloadOptimism} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadOptimism.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 WBTC Reserve Factor and UOptimal Increase + * @author Aave Chan Initiative + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596 + */ +contract AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120 is AaveV3PayloadOptimism { + function rateStrategiesUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory) + { + IAaveV3ConfigEngine.RateStrategyUpdate[] + memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1); + rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({ + asset: AaveV3OptimismAssets.WBTC_UNDERLYING, + params: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: 80_00, + baseVariableBorrowRate: EngineFlags.KEEP_CURRENT, + variableRateSlope1: EngineFlags.KEEP_CURRENT, + variableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3OptimismAssets.WBTC_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 50_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol new file mode 100644 index 000000000..9618bdb8b --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Optimism} from 'aave-address-book/AaveV3Optimism.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol'; +import {AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; + +/** + * @dev Test for AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120 + * command: FOUNDRY_PROFILE=optimism forge test --match-path=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol -vv + */ +contract AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120_Test is ProtocolV3TestBase { + AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('optimism'), 128264864); + proposal = new AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120', + AaveV3Optimism.POOL, + address(proposal) + ); + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol new file mode 100644 index 000000000..f09b57e05 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygon.sol'; +import {AaveV3PayloadPolygon} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadPolygon.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 WBTC Reserve Factor and UOptimal Increase + * @author Aave Chan Initiative + * - Snapshot: Direct-to-AIP + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596 + */ +contract AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120 is AaveV3PayloadPolygon { + function rateStrategiesUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory) + { + IAaveV3ConfigEngine.RateStrategyUpdate[] + memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](1); + rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({ + asset: AaveV3PolygonAssets.WBTC_UNDERLYING, + params: IAaveV3ConfigEngine.InterestRateInputData({ + optimalUsageRatio: 80_00, + baseVariableBorrowRate: EngineFlags.KEEP_CURRENT, + variableRateSlope1: EngineFlags.KEEP_CURRENT, + variableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3PolygonAssets.WBTC_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 50_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol new file mode 100644 index 000000000..27662e4fd --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Polygon} from 'aave-address-book/AaveV3Polygon.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol'; +import {AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; + +/** + * @dev Test for AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120 + * command: FOUNDRY_PROFILE=polygon forge test --match-path=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol -vv + */ +contract AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120_Test is ProtocolV3TestBase { + AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 64525193); + proposal = new AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120', + AaveV3Polygon.POOL, + address(proposal) + ); + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease.md b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease.md new file mode 100644 index 000000000..04d596273 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease.md @@ -0,0 +1,70 @@ +--- +title: " WBTC Reserve Factor and UOptimal Increase " +author: "Aave Chan Initiative" +discussions: "https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596" +snapshot: "Direct-to-AIP" +--- + +## Simple Summary + +Chaos Labs recommends adjusting WBTC’s parameters on all Aave V3 instances to increase the Aave DAO revenue while optimizing to meet the demand from yield-bearing BTC collateral assets. In this proposal, we recommend the following changes to WBTC: + +- Increasing the Reserve Factor +- Increasing the UOptimal + +## Motivation + +The incoming addition of BTC correlated E-Modes with the launch of Aave v3.2 Liquid E-Modes, and the increasing popularity of staked, yield-bearing BTC assets is expected to boost the demand for borrowing non-yield-bearing assets like WBTC. + +Given WBTC’s historical use mainly as a collateral asset and its supply being largely unaffected by changes in the supply rate, we see this as an opportunity to significantly boost DAO revenue without adversely impacting WBTC deposits. + +The adjustments to the Reserve Factor and UOptimal are designed to manage this increased demand while ensuring the protocol’s stability and attractiveness. + +### Reserve Factor + +WBTC has historically been an asset predominantly used as collateral, as evidenced by the borrow distribution, where stablecoins represent over 87% of the borrows against WBTC collateral. Additionally, more than 99% of the current WBTC supply is enabled as collateral, further supporting its primary use case within the market. + +As illustrated in the plot below, previous increases in the supply rate for WBTC have not significantly boosted deposits. While the protocol attracted over $2.5B in WBTC, the supply rate never exceeded 0.15%, a minimal and inconsequential yield. This indicates that most WBTC suppliers are largely indifferent to supply rates, using WBTC primarily as collateral rather than for yield generation. + +Given the minimal impact of WBTC’s supply rate on its supply behavior, we propose raising WBTC’s Reserve Factor from 20% to 50%. A similar change was done for weETH shortly after the launch of incentives and it had a positive effect on aligning the users with the market’s main goal. + +This substantial increase is also expected to significantly boost revenue for the Aave protocol, with additional revenue growth anticipated as the introduction of BTC/BTC E-Modes drives further borrow demand for WBTC. + +Chaos Labs will closely monitor the market and user’s behavior and will recommend further adjustments to the Reserve Factor accordingly. + +### UOptimal + +We recommend increasing UOptimal from 45% to 80%. This adjustment will accommodate a higher utilization rate, enabling the market to meet an increase in borrow demand. The current Kink set at 45% is optimal for assets that either lack significant borrow demand or are yield-bearing. However, with the emergence and growth of liquid-staked BTC assets, WBTC transitions from a category of limited borrow demand to one with substantial borrow demand. This shift necessitates the recommended change in UOptimal to better align with the new market dynamics. + +While this adjustment will lead to a further reduction in the supply rate, we anticipate it will not negatively impact WBTC supply. + +### Revenue + +Given the current market’s minimal borrow demand and low supply rates, these changes are unlikely to negatively impact existing users and suppliers. Following the adjustments, the APY for supplying WBTC on Ethereum is expected to decrease from 0.0414% to 0.0146%. In turn, we anticipate that the DAO’s annual revenue from all the WBTC markets will increase by over 40% before the addition of new BTC/BTC E-Modes. + +## Specification + +By implementing these recommendations, Aave adapts itself to the evolving market while improving the DAO’s revenue. As always, Chaos Labs will continue monitoring market conditions closely and recommend additional adjustments to ensure Aave’s safety and efficiency. + +| **Parameter** | **Current Value** | Recommended Value | +| -------------- | ----------------- | ----------------- | +| Reserve Factor | 20% | 50% | +| UOptimal | 45% | 80% | + +We recommend applying the changes to the following V3 deployments: + +- Ethereum - Main +- Optimism +- Arbitrum +- Polygon + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.t.sol) +- Snapshot: Direct-to-AIP +- [Discussion](https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol new file mode 100644 index 000000000..8348caed9 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol @@ -0,0 +1,150 @@ +// 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, PolygonScript, OptimismScript, ArbitrumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol'; +import {AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; +import {AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; +import {AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; +import {AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120} from './AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol:DeployEthereum chain=mainnet + * verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Polygon + * deploy-command: make deploy-ledger contract=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol:DeployPolygon chain=polygon + * verify-command: FOUNDRY_PROFILE=polygon npx catapulta-verify -b broadcast/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol/137/run-latest.json + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Optimism + * deploy-command: make deploy-ledger contract=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol:DeployOptimism chain=optimism + * verify-command: FOUNDRY_PROFILE=optimism npx catapulta-verify -b broadcast/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol/10/run-latest.json + */ +contract DeployOptimism is OptimismScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Arbitrum + * deploy-command: make deploy-ledger contract=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol:DeployArbitrum chain=arbitrum + * verify-command: FOUNDRY_PROFILE=arbitrum npx catapulta-verify -b broadcast/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol/42161/run-latest.json + */ +contract DeployArbitrum is ArbitrumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease_20241120.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](4); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction( + type(AaveV3Polygon_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + payloads[1] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsOptimism = new IPayloadsControllerCore.ExecutionAction[](1); + actionsOptimism[0] = GovV3Helpers.buildAction( + type(AaveV3Optimism_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + payloads[2] = GovV3Helpers.buildOptimismPayload(vm, actionsOptimism); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsArbitrum[0] = GovV3Helpers.buildAction( + type(AaveV3Arbitrum_WBTCReserveFactorAndUOptimalIncrease_20241120).creationCode + ); + payloads[3] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/WBTCReserveFactorAndUOptimalIncrease.md' + ) + ); + } +} diff --git a/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/config.ts b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/config.ts new file mode 100644 index 000000000..6e3cf0c90 --- /dev/null +++ b/src/20241120_Multi_WBTCReserveFactorAndUOptimalIncrease/config.ts @@ -0,0 +1,120 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + author: 'Aave Chan Initiative', + pools: ['AaveV3Ethereum', 'AaveV3Polygon', 'AaveV3Optimism', 'AaveV3Arbitrum'], + title: ' WBTC Reserve Factor and UOptimal Increase ', + shortName: 'WBTCReserveFactorAndUOptimalIncrease', + date: '20241120', + discussion: + 'https://governance.aave.com/t/arfc-chaos-labs-risk-parameter-updates-wbtc-reserve-factor-and-uoptimal-increase-10-25-24/19596', + snapshot: 'Direct-to-AIP', + votingNetwork: 'POLYGON', + }, + poolOptions: { + AaveV3Ethereum: { + configs: { + RATE_UPDATE_V3: [ + { + asset: 'WBTC', + params: { + optimalUtilizationRate: '80', + baseVariableBorrowRate: '', + variableRateSlope1: '', + variableRateSlope2: '', + }, + }, + ], + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + borrowableInIsolation: 'KEEP_CURRENT', + withSiloedBorrowing: 'KEEP_CURRENT', + reserveFactor: '50', + asset: 'WBTC', + }, + ], + }, + cache: {blockNumber: 21230828}, + }, + AaveV3Polygon: { + configs: { + RATE_UPDATE_V3: [ + { + asset: 'WBTC', + params: { + optimalUtilizationRate: '80', + baseVariableBorrowRate: '', + variableRateSlope1: '', + variableRateSlope2: '', + }, + }, + ], + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + borrowableInIsolation: 'KEEP_CURRENT', + withSiloedBorrowing: 'KEEP_CURRENT', + reserveFactor: '50', + asset: 'WBTC', + }, + ], + }, + cache: {blockNumber: 64525193}, + }, + AaveV3Optimism: { + configs: { + RATE_UPDATE_V3: [ + { + asset: 'WBTC', + params: { + optimalUtilizationRate: '80', + baseVariableBorrowRate: '', + variableRateSlope1: '', + variableRateSlope2: '', + }, + }, + ], + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + borrowableInIsolation: 'KEEP_CURRENT', + withSiloedBorrowing: 'KEEP_CURRENT', + reserveFactor: '50', + asset: 'WBTC', + }, + ], + }, + cache: {blockNumber: 128264864}, + }, + AaveV3Arbitrum: { + configs: { + RATE_UPDATE_V3: [ + { + asset: 'WBTC', + params: { + optimalUtilizationRate: '80', + baseVariableBorrowRate: '', + variableRateSlope1: '', + variableRateSlope2: '', + }, + }, + ], + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + borrowableInIsolation: 'KEEP_CURRENT', + withSiloedBorrowing: 'KEEP_CURRENT', + reserveFactor: '50', + asset: 'WBTC', + }, + ], + }, + cache: {blockNumber: 276532623}, + }, + }, +};