From 25cb42a47112ccc946bf44d94820ff62c2b77f5e Mon Sep 17 00:00:00 2001 From: Alice <121383428+Rozengarden@users.noreply.github.com> Date: Wed, 31 Jul 2024 20:32:57 +0200 Subject: [PATCH] [ACI] Set wstETH RF to 5% on all market (#382) * wstETH payload to 5% on all markets * Update src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol Co-authored-by: Harsh Pandey * Update src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol Co-authored-by: Harsh Pandey * New imports, new tests, new diffs --------- Co-authored-by: Harsh Pandey Co-authored-by: Marc Zeller <21088542+marczeller@users.noreply.github.com> Co-authored-by: marczeller --- ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...uceReserveFactorOnWstETH_20240716_after.md | 25 ++ ...m_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ ...e_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ ...m_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ ...s_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ ...m_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ ...n_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ ...l_ReduceReserveFactorOnWstETH_20240716.sol | 36 +++ ...ReduceReserveFactorOnWstETH_20240716.t.sol | 32 +++ .../ReduceReserveFactorOnWstETH.md | 33 +++ ...ReduceReserveFactorOnWstETH_20240716.s.sol | 240 ++++++++++++++++++ .../config.ts | 137 ++++++++++ 24 files changed, 1061 insertions(+) create mode 100644 diffs/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 diffs/AaveV3Base_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Base_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 diffs/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 diffs/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 diffs/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 diffs/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 diffs/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_after.md create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.t.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH.md create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol create mode 100644 src/20240716_Multi_ReduceReserveFactorOnWstETH/config.ts diff --git a/diffs/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..d96bce3d5 --- /dev/null +++ b/diffs/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0x5979D7b546E38E414F7E9822514be443A4800529](https://arbiscan.io/address/0x5979D7b546E38E414F7E9822514be443A4800529)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % [1500] | 5 % [500] | + + +## Raw diff + +```json +{ + "reserves": { + "0x5979D7b546E38E414F7E9822514be443A4800529": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Base_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Base_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Base_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Base_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..c165c727b --- /dev/null +++ b/diffs/AaveV3Base_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Base_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452](https://basescan.org/address/0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % [1500] | 5 % [500] | + + +## Raw diff + +```json +{ + "reserves": { + "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..b6381531f --- /dev/null +++ b/diffs/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0](https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % [1500] | 5 % [500] | + + +## Raw diff + +```json +{ + "reserves": { + "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..8926af79e --- /dev/null +++ b/diffs/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6](https://gnosisscan.io/address/0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % [1500] | 5 % [500] | + + +## Raw diff + +```json +{ + "reserves": { + "0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..c672f7402 --- /dev/null +++ b/diffs/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb](https://optimistic.etherscan.io/address/0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % | 5 % | + + +## Raw diff + +```json +{ + "reserves": { + "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..1561912fd --- /dev/null +++ b/diffs/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD](https://polygonscan.com/address/0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % [1500] | 5 % [500] | + + +## Raw diff + +```json +{ + "reserves": { + "0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_after.md b/diffs/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_after.md new file mode 100644 index 000000000..279a7f954 --- /dev/null +++ b/diffs/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_before_AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_after.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### wstETH ([0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32](https://scrollscan.com/address/0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32)) + +| description | value before | value after | +| --- | --- | --- | +| reserveFactor | 15 % [1500] | 5 % [500] | + + +## Raw diff + +```json +{ + "reserves": { + "0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32": { + "reserveFactor": { + "from": 1500, + "to": 500 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..8cb6c773f --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; +import {AaveV3PayloadArbitrum} from 'aave-helpers/v3-config-engine/AaveV3PayloadArbitrum.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadArbitrum { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3ArbitrumAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..6d151cdc1 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.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/ProtocolV3TestBase.sol'; +import {AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=arbitrum forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('arbitrum'), 232890608); + proposal = new AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716', + AaveV3Arbitrum.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..d165fc482 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3BaseAssets} from 'aave-address-book/AaveV3Base.sol'; +import {AaveV3PayloadBase} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Base_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadBase { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3BaseAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..738457f54 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Base_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Base_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=base forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Base_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Base_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('base'), 17182417); + proposal = new AaveV3Base_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Base_ReduceReserveFactorOnWstETH_20240716', + AaveV3Base.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..79909ff24 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; +import {AaveV3PayloadEthereum} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadEthereum { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3EthereumAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..79a790d11 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.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_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 20320832); + proposal = new AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716', + AaveV3Ethereum.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..c47457207 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; +import {AaveV3PayloadGnosis} from 'aave-helpers/v3-config-engine/AaveV3PayloadGnosis.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadGnosis { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3GnosisAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..6c83cec46 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=gnosis forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('gnosis'), 34999418); + proposal = new AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716', + AaveV3Gnosis.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..bf0e5c3ba --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol'; +import {AaveV3PayloadOptimism} from 'aave-helpers/v3-config-engine/AaveV3PayloadOptimism.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadOptimism { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3OptimismAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..31c139edc --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.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/ProtocolV3TestBase.sol'; +import {AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=optimism forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('optimism'), 122777686); + proposal = new AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716', + AaveV3Optimism.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..fc688eb8d --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygon.sol'; +import {AaveV3PayloadPolygon} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadPolygon { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3PolygonAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..8d2c73d94 --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.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/ProtocolV3TestBase.sol'; +import {AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=polygon forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 59439039); + proposal = new AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716', + AaveV3Polygon.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol new file mode 100644 index 000000000..7373d8f7b --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3ScrollAssets} from 'aave-address-book/AaveV3Scroll.sol'; +import {AaveV3PayloadScroll} from 'aave-helpers/v3-config-engine/AaveV3PayloadScroll.sol'; +import {EngineFlags} from 'aave-v3-periphery/contracts/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-periphery/contracts/v3-config-engine/IAaveV3ConfigEngine.sol'; +/** + * @title Reduce Reserve Factor on wstETH + * @author Aave Chan Initiative + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d + * - Discussion: https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1 + */ +contract AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716 is AaveV3PayloadScroll { + function borrowsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.BorrowUpdate[] memory) + { + IAaveV3ConfigEngine.BorrowUpdate[] + memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](1); + + borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({ + asset: AaveV3ScrollAssets.wstETH_UNDERLYING, + enabledToBorrow: EngineFlags.KEEP_CURRENT, + flashloanable: EngineFlags.KEEP_CURRENT, + stableRateModeEnabled: EngineFlags.KEEP_CURRENT, + borrowableInIsolation: EngineFlags.KEEP_CURRENT, + withSiloedBorrowing: EngineFlags.KEEP_CURRENT, + reserveFactor: 5_00 + }); + + return borrowUpdates; + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.t.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.t.sol new file mode 100644 index 000000000..e1ae8a22c --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Scroll} from 'aave-address-book/AaveV3Scroll.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Test for AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716 + * command: FOUNDRY_PROFILE=scroll forge test --match-path=src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.t.sol -vv + */ +contract AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716_Test is ProtocolV3TestBase { + AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('scroll'), 7500893); + proposal = new AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716', + AaveV3Scroll.POOL, + address(proposal) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH.md b/src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH.md new file mode 100644 index 000000000..de42062fc --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH.md @@ -0,0 +1,33 @@ +--- +title: "Reduce Reserve Factor on wstETH" +author: "Aave Chan Initiative" +discussions: "https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1" +snapshot: "https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d" +--- + +## Simple Summary + +For further alignment with the upcoming Lido Alliance proposals, this proposal will reduce the reserve factor for wstETH to 5%. + +## Motivation + +Aave and Lido have historically seen symbiotic growth, with stETH being one of the premier collaterals on Aave and leveraged staking being one of the most profitable use cases for both Aave DAO and Lido users. + +As part of the recently passed [TEMP CHECK proposal ](https://governance.aave.com/t/temp-check-deploy-a-lido-aave-v3-instance/17930) to create an isolated instance for wstETH borrowers, a number of other parameter changes were proposed to align Lido and Aave. + +This proposal implements the agreed reserve factor change for wstETH to 5%. + +## Specification + +On all networks, change wstETH Reserve Factor to 5%. + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.t.sol), [AaveV3Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.t.sol), [AaveV3Base](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Base_ReduceReserveFactorOnWstETH_20240716.t.sol), [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.t.sol), [AaveV3Scroll](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240716_Multi_ReduceReserveFactorOnWstETH/AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.t.sol) +- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d) +- [Discussion](https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol b/src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol new file mode 100644 index 000000000..e1f9dd83d --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol @@ -0,0 +1,240 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; +import {EthereumScript, PolygonScript, OptimismScript, ArbitrumScript, BaseScript, GnosisScript, ScrollScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol'; +import {AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716.sol'; +import {AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716.sol'; +import {AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716.sol'; +import {AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716.sol'; +import {AaveV3Base_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Base_ReduceReserveFactorOnWstETH_20240716.sol'; +import {AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716.sol'; +import {AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716} from './AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployEthereum chain=mainnet + * verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716).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/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployPolygon chain=polygon + * verify-command: FOUNDRY_PROFILE=polygon npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/137/run-latest.json + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716).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/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployOptimism chain=optimism + * verify-command: FOUNDRY_PROFILE=optimism npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/10/run-latest.json + */ +contract DeployOptimism is OptimismScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716).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/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployArbitrum chain=arbitrum + * verify-command: FOUNDRY_PROFILE=arbitrum npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/42161/run-latest.json + */ +contract DeployArbitrum is ArbitrumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716).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 Base + * deploy-command: make deploy-ledger contract=src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployBase chain=base + * verify-command: FOUNDRY_PROFILE=base npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/8453/run-latest.json + */ +contract DeployBase is BaseScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Base_ReduceReserveFactorOnWstETH_20240716).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 Gnosis + * deploy-command: make deploy-ledger contract=src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployGnosis chain=gnosis + * verify-command: FOUNDRY_PROFILE=gnosis npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/100/run-latest.json + */ +contract DeployGnosis is GnosisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716).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 Scroll + * deploy-command: make deploy-ledger contract=src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:DeployScroll chain=scroll + * verify-command: FOUNDRY_PROFILE=scroll npx catapulta-verify -b broadcast/ReduceReserveFactorOnWstETH_20240716.s.sol/534352/run-latest.json + */ +contract DeployScroll is ScrollScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716).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/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH_20240716.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](7); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction( + type(AaveV3Polygon_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[1] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsOptimism = new IPayloadsControllerCore.ExecutionAction[](1); + actionsOptimism[0] = GovV3Helpers.buildAction( + type(AaveV3Optimism_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[2] = GovV3Helpers.buildOptimismPayload(vm, actionsOptimism); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsArbitrum[0] = GovV3Helpers.buildAction( + type(AaveV3Arbitrum_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[3] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsBase = new IPayloadsControllerCore.ExecutionAction[](1); + actionsBase[0] = GovV3Helpers.buildAction( + type(AaveV3Base_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[4] = GovV3Helpers.buildBasePayload(vm, actionsBase); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsGnosis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsGnosis[0] = GovV3Helpers.buildAction( + type(AaveV3Gnosis_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[5] = GovV3Helpers.buildGnosisPayload(vm, actionsGnosis); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsScroll = new IPayloadsControllerCore.ExecutionAction[](1); + actionsScroll[0] = GovV3Helpers.buildAction( + type(AaveV3Scroll_ReduceReserveFactorOnWstETH_20240716).creationCode + ); + payloads[6] = GovV3Helpers.buildScrollPayload(vm, actionsScroll); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240716_Multi_ReduceReserveFactorOnWstETH/ReduceReserveFactorOnWstETH.md' + ) + ); + } +} diff --git a/src/20240716_Multi_ReduceReserveFactorOnWstETH/config.ts b/src/20240716_Multi_ReduceReserveFactorOnWstETH/config.ts new file mode 100644 index 000000000..f386e69af --- /dev/null +++ b/src/20240716_Multi_ReduceReserveFactorOnWstETH/config.ts @@ -0,0 +1,137 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + configFile: 'src/20240716_Multi_ReduceReserveFactorOnWstETH/config.ts', + author: 'Aave Chan Initiative', + pools: [ + 'AaveV3Ethereum', + 'AaveV3Polygon', + 'AaveV3Optimism', + 'AaveV3Arbitrum', + 'AaveV3Base', + 'AaveV3Gnosis', + 'AaveV3Scroll', + ], + title: 'Reduce Reserve Factor on wstETH', + shortName: 'ReduceReserveFactorOnWstETH', + date: '20240716', + discussion: 'https://governance.aave.com/t/arfc-reduce-reserve-factor-on-wsteth/18044/1', + snapshot: + 'https://snapshot.org/#/aave.eth/proposal/0x7ef3a8d68fa8a1b69d298aceddfafe9d2a24eefb19365d995c839b1cd1b0b97d', + votingNetwork: 'POLYGON', + }, + poolOptions: { + AaveV3Ethereum: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 20320832}, + }, + AaveV3Polygon: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 59439039}, + }, + AaveV3Optimism: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 122777686}, + }, + AaveV3Arbitrum: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 232890608}, + }, + AaveV3Base: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 17182417}, + }, + AaveV3Gnosis: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 34999418}, + }, + AaveV3Scroll: { + configs: { + BORROWS_UPDATE: [ + { + enabledToBorrow: 'KEEP_CURRENT', + flashloanable: 'KEEP_CURRENT', + stableRateModeEnabled: 'DISABLED', + borrowableInIsolation: 'DISABLED', + withSiloedBorrowing: 'DISABLED', + reserveFactor: '5', + asset: 'wstETH', + }, + ], + }, + cache: {blockNumber: 7500893}, + }, + }, +};