From a5696e02b847c90f238a55323987c95d3bacc270 Mon Sep 17 00:00:00 2001 From: Harsh Pandey Date: Mon, 27 Nov 2023 19:28:11 +0530 Subject: [PATCH] fix: deploy index and aip text (#94) --- .../AllowEmergencyAdminToFreezeOnAaveV2.md | 10 ++++++---- ...ergencyAdminToFreezeOnAaveV2_20231109.s.sol | 18 +++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2.md b/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2.md index 786938de0..531066fc4 100644 --- a/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2.md +++ b/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2.md @@ -6,16 +6,18 @@ discussions: "https://governance.aave.com/t/aave-v2-v3-security-incident-04-11-2 ## Simple Summary -Proposal to allow emergency admin to freeze reserves on Aave V2 pools - including Aave V2 AMM, Aave V2 on Ethereum, Polygon and Avalanche. +Proposal to allow the emergencyAdmin role to freeze reserves on Aave V2 pools - including Aave V2 AMM, Aave V2 Ethereum, Polygon, and Avalanche; same behavior as on Aave v3. Additionally, Liquidations Grace Sentinel is activated for Aave V2 AMM, following the same approach as [AIP 361](https://app.aave.com/governance/proposal/361/) ## Motivation -Similar to the Freezing Stewards [AIP 319](https://app.aave.com/governance/proposal/319/), in order to maintain security across all Aave V2 deployments, it is essential for the protocol to have up-to-date preventative functionality. +To be consistent with the approved Aave v3 approach of Freezing Stewards ([AIP 319](https://app.aave.com/governance/proposal/319/)), and maintain security across all Aave V2 deployments, the protocol needs to have up-to-date preventative functionality. + +Freezing is a less invasive mechanism compared with pause, which can already be done by the emergencyAdmin on v2. ## Specification -Updates the `freezeReserve()` function on the pool configurator to use the new `onlyPoolOrEmergencyAdmin` modifier which allows both the emergency admin and pool admin to freeze reserves. +The proposal payloads will update the `freezeReserve()` / `unfreezeReserve()` functions on the pool configurator contract to use the new `onlyPoolOrEmergencyAdmin` modifier, which allows both the emergency admin (Aave Guardian) and pool admin (governance Executor contract) to freeze and unfreeze reserves. On AaveV2Ethereum, AaveV2EthereumAMM, AaveV2Polygon and AaveV2Avalanche the proposal will call: @@ -27,7 +29,7 @@ In addition `LendingPoolCollateralManager` for Aave V2 AMM is updated analog to ## References -- Implementation: [EthereumPayload](https://github.com/bgd-labs/stable-rate-patch/blob/main/src/payloads/V2EthConfiguratorUpdatePayload.sol), [L2Payload](https://github.com/bgd-labs/stable-rate-patch/blob/main/src/payloads/V2L2ConfiguratorUpdatePayload.sol) +- Implementation: [Payload](https://github.com/bgd-labs/stable-rate-patch/blob/main/src/payloads/ConfiguratorUpdatePayload.sol), - Tests: [PoolConfiguratorTest](https://github.com/bgd-labs/stable-rate-patch/blob/main/tests/V2PoolConfigurator.t.sol), [PoolConfiguratorTestBase](https://github.com/bgd-labs/stable-rate-patch/blob/main/tests/V2PoolConfiguratorTestBase.t.sol) - [Discussion](https://governance.aave.com/t/aave-v2-v3-security-incident-04-11-2023/15335) diff --git a/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2_20231109.s.sol b/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2_20231109.s.sol index 2949efccd..16b36ef6e 100644 --- a/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2_20231109.s.sol +++ b/src/20231109_Multi_AllowEmergencyAdminToFreezeOnAaveV2/AllowEmergencyAdminToFreezeOnAaveV2_20231109.s.sol @@ -100,24 +100,24 @@ contract CreateProposal is EthereumScript { payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); IPayloadsControllerCore.ExecutionAction[] - memory actionsEthereumAmm = new IPayloadsControllerCore.ExecutionAction[](2); - actionsEthereum[0] = GovV3Helpers.buildAction(0xf75cBd975756C52aA7321d10E6aCA90e07835Dee); - payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereumAmm); + memory actionsEthereumAmm = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereumAmm[0] = GovV3Helpers.buildAction(0xf75cBd975756C52aA7321d10E6aCA90e07835Dee); + payloads[1] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereumAmm); IPayloadsControllerCore.ExecutionAction[] - memory actionsEthereumSentinel = new IPayloadsControllerCore.ExecutionAction[](3); + memory actionsEthereumSentinel = new IPayloadsControllerCore.ExecutionAction[](1); actionsEthereumSentinel[0] = GovV3Helpers.buildAction(0x9441B65EE553F70df9C77d45d3283B6BC24F222d); - payloads[1] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereumSentinel); + payloads[2] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereumSentinel); IPayloadsControllerCore.ExecutionAction[] - memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](4); + memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); actionsPolygon[0] = GovV3Helpers.buildAction(0x1AA25FdD7d55FA8a401D6EFba8e48874Ef730E55); - payloads[2] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + payloads[3] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); IPayloadsControllerCore.ExecutionAction[] - memory actionsAvalanche = new IPayloadsControllerCore.ExecutionAction[](5); + memory actionsAvalanche = new IPayloadsControllerCore.ExecutionAction[](1); actionsAvalanche[0] = GovV3Helpers.buildAction(0xD3DE4b3571744EB77946d65aBF01408902E92c4E); - payloads[3] = GovV3Helpers.buildAvalanchePayload(vm, actionsAvalanche); + payloads[4] = GovV3Helpers.buildAvalanchePayload(vm, actionsAvalanche); // create proposal vm.startBroadcast();