From 0389a7cdb578c0453f5c424a02620284bc083041 Mon Sep 17 00:00:00 2001 From: Natanela <37778340+Natanela@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:19:16 +0200 Subject: [PATCH] Chaos Labs V2 Ethereum and Polygon LT Reductions (#113) * Chaos Labs V2 Ethereum and Polygon LT Reductions * Reduce LTVs to 0 on Polygon V2 * Add config file * Update md file with polygon LTV * Update LTs * fix comments * update payload addresses * lint --------- Co-authored-by: yonikesel --- ...umAndPolygonLTReductions_20231205_after.md | 259 ++++++++++++++++++ ...umAndPolygonLTReductions_20231205_after.md | 120 ++++++++ ...thereumAndPolygonLTReductions_20231205.sol | 150 ++++++++++ ...ereumAndPolygonLTReductions_20231205.t.sol | 203 ++++++++++++++ ...thereumAndPolygonLTReductions_20231205.sol | 57 ++++ ...ereumAndPolygonLTReductions_20231205.t.sol | 97 +++++++ ...aosLabsV2EthereumAndPolygonLTReductions.md | 75 +++++ ...ereumAndPolygonLTReductions_20231205.s.sol | 78 ++++++ .../config.json | 25 ++ 9 files changed, 1064 insertions(+) create mode 100644 diffs/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md create mode 100644 diffs/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions.md create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol create mode 100644 src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/config.json diff --git a/diffs/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md b/diffs/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md new file mode 100644 index 000000000..cc93ea278 --- /dev/null +++ b/diffs/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md @@ -0,0 +1,259 @@ +## Reserve changes + +### Reserve altered + +#### BAT ([0x0D8775F648430679A709E98d2b0Cb6250d2887EF](https://etherscan.io/address/0x0D8775F648430679A709E98d2b0Cb6250d2887EF)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 1 % | 0.05 % | + + +#### MANA ([0x0F5D2fB29fb7d3CFeE444a200298f468908cC942](https://etherscan.io/address/0x0F5D2fB29fb7d3CFeE444a200298f468908cC942)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 29 % | 0.05 % | + + +#### YFI ([0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e](https://etherscan.io/address/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 32 % | 0.05 % | + + +#### 1INCH ([0x111111111117dC0aa78b770fA6A738034120C302](https://etherscan.io/address/0x111111111117dC0aa78b770fA6A738034120C302)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 1 % | 0.05 % | + + +#### DPI ([0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b](https://etherscan.io/address/0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 5 % | 0.05 % | + + +#### UNI ([0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 55 % | 40 % | + + +#### REN ([0x408e41876cCCDC0F92210600ef50372656052a38](https://etherscan.io/address/0x408e41876cCCDC0F92210600ef50372656052a38)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 18 % | 0.05 % | + + +#### CVX ([0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B](https://etherscan.io/address/0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 24 % | 0.05 % | + + +#### LINK ([0x514910771AF9Ca656af840dff83E8264EcF986CA](https://etherscan.io/address/0x514910771AF9Ca656af840dff83E8264EcF986CA)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 80 % | 75 % | + + +#### xSUSHI ([0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272](https://etherscan.io/address/0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 1 % | 0.05 % | + + +#### FEI ([0x956F47F50A910163D8BF957Cf5846D573E7f87CA](https://etherscan.io/address/0x956F47F50A910163D8BF957Cf5846D573E7f87CA)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 1 % | 0.05 % | + + +#### MKR ([0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2](https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 28 % | 26 % | + + +#### SNX ([0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F](https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 30 % | 0.05 % | + + +#### ENS ([0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72](https://etherscan.io/address/0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 38 % | 30 % | + + +#### CRV ([0xD533a949740bb3306d119CC777fa900bA034cd52](https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 30 % | 25 % | + + +#### ZRX ([0xE41d2489571d322189246DaFA5ebDe1F4699F498](https://etherscan.io/address/0xE41d2489571d322189246DaFA5ebDe1F4699F498)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 24 % | 18 % | + + +#### ENJ ([0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c](https://etherscan.io/address/0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 44 % | 0.05 % | + + +#### BAL ([0xba100000625a3754423978a60c9317c58a424e3D](https://etherscan.io/address/0xba100000625a3754423978a60c9317c58a424e3D)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 1 % | 0.05 % | + + +#### KNC ([0xdd974D5C2e2928deA5F71b9825b8b646686BD200](https://etherscan.io/address/0xdd974D5C2e2928deA5F71b9825b8b646686BD200)) + +| description | value before | value after | +| --- | --- | --- | +| liquidationThreshold | 1 % | 0.05 % | + + +## Raw diff + +```json +{ + "reserves": { + "0x0D8775F648430679A709E98d2b0Cb6250d2887EF": { + "liquidationThreshold": { + "from": 100, + "to": 5 + } + }, + "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942": { + "liquidationThreshold": { + "from": 2900, + "to": 5 + } + }, + "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e": { + "liquidationThreshold": { + "from": 3200, + "to": 5 + } + }, + "0x111111111117dC0aa78b770fA6A738034120C302": { + "liquidationThreshold": { + "from": 100, + "to": 5 + } + }, + "0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b": { + "liquidationThreshold": { + "from": 500, + "to": 5 + } + }, + "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": { + "liquidationThreshold": { + "from": 5500, + "to": 4000 + } + }, + "0x408e41876cCCDC0F92210600ef50372656052a38": { + "liquidationThreshold": { + "from": 1800, + "to": 5 + } + }, + "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B": { + "liquidationThreshold": { + "from": 2400, + "to": 5 + } + }, + "0x514910771AF9Ca656af840dff83E8264EcF986CA": { + "liquidationThreshold": { + "from": 8000, + "to": 7500 + } + }, + "0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272": { + "liquidationThreshold": { + "from": 100, + "to": 5 + } + }, + "0x956F47F50A910163D8BF957Cf5846D573E7f87CA": { + "liquidationThreshold": { + "from": 100, + "to": 5 + } + }, + "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2": { + "liquidationThreshold": { + "from": 2800, + "to": 2600 + } + }, + "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F": { + "liquidationThreshold": { + "from": 3000, + "to": 5 + } + }, + "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72": { + "liquidationThreshold": { + "from": 3800, + "to": 3000 + } + }, + "0xD533a949740bb3306d119CC777fa900bA034cd52": { + "liquidationThreshold": { + "from": 3000, + "to": 2500 + } + }, + "0xE41d2489571d322189246DaFA5ebDe1F4699F498": { + "liquidationThreshold": { + "from": 2400, + "to": 1800 + } + }, + "0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c": { + "liquidationThreshold": { + "from": 4400, + "to": 5 + } + }, + "0xba100000625a3754423978a60c9317c58a424e3D": { + "liquidationThreshold": { + "from": 100, + "to": 5 + } + }, + "0xdd974D5C2e2928deA5F71b9825b8b646686BD200": { + "liquidationThreshold": { + "from": 100, + "to": 5 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md b/diffs/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md new file mode 100644 index 000000000..62c90adfa --- /dev/null +++ b/diffs/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_before_AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_after.md @@ -0,0 +1,120 @@ +## Reserve changes + +### Reserve altered + +#### SUSHI ([0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a](https://polygonscan.com/address/0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a)) + +| description | value before | value after | +| --- | --- | --- | +| ltv | 20 % | 0 % | +| liquidationThreshold | 45 % | 0.05 % | + + +#### CRV ([0x172370d5Cd63279eFa6d502DAB29171933a610AF](https://polygonscan.com/address/0x172370d5Cd63279eFa6d502DAB29171933a610AF)) + +| description | value before | value after | +| --- | --- | --- | +| ltv | 20 % | 0 % | +| liquidationThreshold | 45 % | 0.05 % | + + +#### GHST ([0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7](https://polygonscan.com/address/0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7)) + +| description | value before | value after | +| --- | --- | --- | +| ltv | 25 % | 0 % | +| liquidationThreshold | 40 % | 0.05 % | + + +#### LINK ([0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39](https://polygonscan.com/address/0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39)) + +| description | value before | value after | +| --- | --- | --- | +| ltv | 50 % | 0 % | +| liquidationThreshold | 65 % | 0.05 % | + + +#### DPI ([0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369](https://polygonscan.com/address/0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369)) + +| description | value before | value after | +| --- | --- | --- | +| ltv | 20 % | 0 % | +| liquidationThreshold | 45 % | 0.05 % | + + +#### BAL ([0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3](https://polygonscan.com/address/0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3)) + +| description | value before | value after | +| --- | --- | --- | +| ltv | 20 % | 0 % | +| liquidationThreshold | 45 % | 0.05 % | + + +## Raw diff + +```json +{ + "reserves": { + "0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a": { + "liquidationThreshold": { + "from": 4500, + "to": 5 + }, + "ltv": { + "from": 2000, + "to": 0 + } + }, + "0x172370d5Cd63279eFa6d502DAB29171933a610AF": { + "liquidationThreshold": { + "from": 4500, + "to": 5 + }, + "ltv": { + "from": 2000, + "to": 0 + } + }, + "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7": { + "liquidationThreshold": { + "from": 4000, + "to": 5 + }, + "ltv": { + "from": 2500, + "to": 0 + } + }, + "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39": { + "liquidationThreshold": { + "from": 6500, + "to": 5 + }, + "ltv": { + "from": 5000, + "to": 0 + } + }, + "0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369": { + "liquidationThreshold": { + "from": 4500, + "to": 5 + }, + "ltv": { + "from": 2000, + "to": 0 + } + }, + "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3": { + "liquidationThreshold": { + "from": 4500, + "to": 5 + }, + "ltv": { + "from": 2000, + "to": 0 + } + } + } +} +``` \ No newline at end of file diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol new file mode 100644 index 000000000..92832a9af --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; + +/** + * @title Chaos Labs V2 Ethereum and Polygon LT Reductions + * @author Chaos Labs + * - Snapshot: “Direct-to-AIP” + * - Discussion: https://governance.aave.com/t/arfc-v2-ethereum-and-polygon-lt-reductions-12-04-2023/15747 + */ +contract AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 is + IProposalGenericExecutor +{ + function execute() external { + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.CRV_UNDERLYING, + 0, + 25_00, + 108_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.CVX_UNDERLYING, + 0, + 5, + 108_50 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.DPI_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.ENJ_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.ENS_UNDERLYING, + 0, + 30_00, + 108_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.LINK_UNDERLYING, + 0, + 75_00, + 107_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.MANA_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.MKR_UNDERLYING, + 0, + 26_00, + 107_50 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.REN_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.SNX_UNDERLYING, + 0, + 5, + 107_50 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.UNI_UNDERLYING, + 0, + 40_00, + 109_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.YFI_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.ZRX_UNDERLYING, + 0, + 18_00, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.ONE_INCH_UNDERLYING, + 0, + 5, + 108_50 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.BAL_UNDERLYING, + 0, + 5, + 108_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.BAT_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.KNC_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.FEI_UNDERLYING, + 0, + 5, + 110_00 + ); + + AaveV2Ethereum.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2EthereumAssets.xSUSHI_UNDERLYING, + 0, + 5, + 110_00 + ); + } +} diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol new file mode 100644 index 000000000..e460458b9 --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol @@ -0,0 +1,203 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV2TestBase, ReserveConfig} from 'aave-helpers/ProtocolV2TestBase.sol'; +import {AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205} from './AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol'; + +/** + * @dev Test for AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 + * command: make test-contract filter=AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 + */ +contract AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_Test is + ProtocolV2TestBase +{ + AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 18720737); + proposal = new AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + (ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( + 'AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205', + AaveV2Ethereum.POOL, + address(proposal) + ); + + address[] memory assetsChanged = new address[](19); + + assetsChanged[0] = AaveV2EthereumAssets.CRV_UNDERLYING; + assetsChanged[1] = AaveV2EthereumAssets.CVX_UNDERLYING; + assetsChanged[2] = AaveV2EthereumAssets.DPI_UNDERLYING; + assetsChanged[3] = AaveV2EthereumAssets.ENJ_UNDERLYING; + assetsChanged[4] = AaveV2EthereumAssets.ENS_UNDERLYING; + assetsChanged[5] = AaveV2EthereumAssets.LINK_UNDERLYING; + assetsChanged[6] = AaveV2EthereumAssets.MANA_UNDERLYING; + assetsChanged[7] = AaveV2EthereumAssets.MKR_UNDERLYING; + assetsChanged[8] = AaveV2EthereumAssets.REN_UNDERLYING; + assetsChanged[9] = AaveV2EthereumAssets.SNX_UNDERLYING; + assetsChanged[10] = AaveV2EthereumAssets.UNI_UNDERLYING; + assetsChanged[11] = AaveV2EthereumAssets.YFI_UNDERLYING; + assetsChanged[12] = AaveV2EthereumAssets.ZRX_UNDERLYING; + assetsChanged[13] = AaveV2EthereumAssets.ONE_INCH_UNDERLYING; + assetsChanged[14] = AaveV2EthereumAssets.BAL_UNDERLYING; + assetsChanged[15] = AaveV2EthereumAssets.BAT_UNDERLYING; + assetsChanged[16] = AaveV2EthereumAssets.KNC_UNDERLYING; + assetsChanged[17] = AaveV2EthereumAssets.FEI_UNDERLYING; + assetsChanged[18] = AaveV2EthereumAssets.xSUSHI_UNDERLYING; + + _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged); + + { + ReserveConfig memory CRV_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.CRV_UNDERLYING + ); + CRV_UNDERLYING_CONFIG.liquidationThreshold = 25_00; + _validateReserveConfig(CRV_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory CVX_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.CVX_UNDERLYING + ); + CVX_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(CVX_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory DPI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.DPI_UNDERLYING + ); + DPI_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(DPI_UNDERLYING_CONFIG, allConfigsAfter); + } + + { + ReserveConfig memory ENJ_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.ENJ_UNDERLYING + ); + ENJ_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(ENJ_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory ENS_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.ENS_UNDERLYING + ); + ENS_UNDERLYING_CONFIG.liquidationThreshold = 30_00; + _validateReserveConfig(ENS_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory LINK_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.LINK_UNDERLYING + ); + LINK_UNDERLYING_CONFIG.liquidationThreshold = 75_00; + _validateReserveConfig(LINK_UNDERLYING_CONFIG, allConfigsAfter); + } + + { + ReserveConfig memory MANA_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.MANA_UNDERLYING + ); + MANA_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(MANA_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory MKR_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.MKR_UNDERLYING + ); + MKR_UNDERLYING_CONFIG.liquidationThreshold = 26_00; + _validateReserveConfig(MKR_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory REN_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.REN_UNDERLYING + ); + REN_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(REN_UNDERLYING_CONFIG, allConfigsAfter); + } + + { + ReserveConfig memory SNX_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.SNX_UNDERLYING + ); + SNX_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(SNX_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory UNI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.UNI_UNDERLYING + ); + UNI_UNDERLYING_CONFIG.liquidationThreshold = 40_00; + _validateReserveConfig(UNI_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory YFI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.YFI_UNDERLYING + ); + YFI_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(YFI_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory ZRX_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.ZRX_UNDERLYING + ); + ZRX_UNDERLYING_CONFIG.liquidationThreshold = 18_00; + _validateReserveConfig(ZRX_UNDERLYING_CONFIG, allConfigsAfter); + } + + { + ReserveConfig memory ONE_INCH_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.ONE_INCH_UNDERLYING + ); + ONE_INCH_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(ONE_INCH_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory BAL_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.BAL_UNDERLYING + ); + BAL_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(BAL_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory BAT_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.BAT_UNDERLYING + ); + BAT_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(BAT_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory KNC_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.KNC_UNDERLYING + ); + KNC_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(KNC_UNDERLYING_CONFIG, allConfigsAfter); + } + + { + ReserveConfig memory FEI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.FEI_UNDERLYING + ); + FEI_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(FEI_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory xSUSHI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2EthereumAssets.xSUSHI_UNDERLYING + ); + xSUSHI_UNDERLYING_CONFIG.liquidationThreshold = 5; + _validateReserveConfig(xSUSHI_UNDERLYING_CONFIG, allConfigsAfter); + } + } +} diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol new file mode 100644 index 000000000..4eabb0787 --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV2PayloadPolygon} from 'aave-helpers/v2-config-engine/AaveV2PayloadPolygon.sol'; +import {AaveV2Polygon, AaveV2PolygonAssets} from 'aave-address-book/AaveV2Polygon.sol'; + +/** + * @title Chaos Labs V2 Ethereum and Polygon LT Reductions + * @author Chaos Labs + * - Snapshot: “Direct-to-AIP” + * - Discussion: https://governance.aave.com/t/arfc-v2-ethereum-and-polygon-lt-reductions-12-04-2023/15747 + */ +contract AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 is AaveV2PayloadPolygon { + function _postExecute() internal override { + AaveV2Polygon.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2PolygonAssets.SUSHI_UNDERLYING, + 0, + 5, + 11000 + ); + + AaveV2Polygon.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2PolygonAssets.DPI_UNDERLYING, + 0, + 5, + 11000 + ); + + AaveV2Polygon.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2PolygonAssets.BAL_UNDERLYING, + 0, + 5, + 11000 + ); + + AaveV2Polygon.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2PolygonAssets.CRV_UNDERLYING, + 0, + 5, + 11000 + ); + + AaveV2Polygon.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2PolygonAssets.GHST_UNDERLYING, + 0, + 5, + 11250 + ); + + AaveV2Polygon.POOL_CONFIGURATOR.configureReserveAsCollateral( + AaveV2PolygonAssets.LINK_UNDERLYING, + 0, + 5, + 10750 + ); + } +} diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol new file mode 100644 index 000000000..8d6f4baac --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV2Polygon, AaveV2PolygonAssets} from 'aave-address-book/AaveV2Polygon.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV2TestBase, ReserveConfig} from 'aave-helpers/ProtocolV2TestBase.sol'; +import {AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205} from './AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol'; + +/** + * @dev Test for AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 + * command: make test-contract filter=AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 + */ +contract AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205_Test is + ProtocolV2TestBase +{ + AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('polygon'), 50773537); + proposal = new AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + (ReserveConfig[] memory allConfigsBefore, ReserveConfig[] memory allConfigsAfter) = defaultTest( + 'AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205', + AaveV2Polygon.POOL, + address(proposal) + ); + + address[] memory assetsChanged = new address[](6); + + assetsChanged[0] = AaveV2PolygonAssets.SUSHI_UNDERLYING; + assetsChanged[1] = AaveV2PolygonAssets.DPI_UNDERLYING; + assetsChanged[2] = AaveV2PolygonAssets.BAL_UNDERLYING; + assetsChanged[3] = AaveV2PolygonAssets.CRV_UNDERLYING; + assetsChanged[4] = AaveV2PolygonAssets.GHST_UNDERLYING; + assetsChanged[5] = AaveV2PolygonAssets.LINK_UNDERLYING; + + _noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged); + + { + ReserveConfig memory SUSHI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2PolygonAssets.SUSHI_UNDERLYING + ); + SUSHI_UNDERLYING_CONFIG.liquidationThreshold = 5; + SUSHI_UNDERLYING_CONFIG.ltv = 0; + _validateReserveConfig(SUSHI_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory DPI_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2PolygonAssets.DPI_UNDERLYING + ); + DPI_UNDERLYING_CONFIG.liquidationThreshold = 5; + DPI_UNDERLYING_CONFIG.ltv = 0; + _validateReserveConfig(DPI_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory BAL_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2PolygonAssets.BAL_UNDERLYING + ); + BAL_UNDERLYING_CONFIG.liquidationThreshold = 5; + BAL_UNDERLYING_CONFIG.ltv = 0; + _validateReserveConfig(BAL_UNDERLYING_CONFIG, allConfigsAfter); + } + + { + ReserveConfig memory CRV_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2PolygonAssets.CRV_UNDERLYING + ); + CRV_UNDERLYING_CONFIG.liquidationThreshold = 5; + CRV_UNDERLYING_CONFIG.ltv = 0; + _validateReserveConfig(CRV_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory GHST_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2PolygonAssets.GHST_UNDERLYING + ); + GHST_UNDERLYING_CONFIG.liquidationThreshold = 5; + GHST_UNDERLYING_CONFIG.ltv = 0; + _validateReserveConfig(GHST_UNDERLYING_CONFIG, allConfigsAfter); + + ReserveConfig memory LINK_UNDERLYING_CONFIG = _findReserveConfig( + allConfigsBefore, + AaveV2PolygonAssets.LINK_UNDERLYING + ); + LINK_UNDERLYING_CONFIG.liquidationThreshold = 5; + LINK_UNDERLYING_CONFIG.ltv = 0; + _validateReserveConfig(LINK_UNDERLYING_CONFIG, allConfigsAfter); + } + } +} diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions.md b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions.md new file mode 100644 index 000000000..7e111f313 --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions.md @@ -0,0 +1,75 @@ +--- +title: "Chaos Labs V2 Ethereum and Polygon LT Reductions" +author: "Chaos Labs" +discussions: "https://governance.aave.com/t/arfc-v2-ethereum-and-polygon-lt-reductions-12-04-2023/15747" +--- + +## Simple Summary + +A proposal to reduce Liquidation Thresholds on Aave V2 Ethereum and Polygon. + +## Motivation + +Following the [v2 deprecation framework](https://governance.aave.com/t/arfc-aave-v2-markets-deprecation-plan/14870), Chaos Labs and Gauntlet advise implementing the subsequent parameter changes to the frozen assets on Aave v2 Ethereum and Polygon + +_As Liquidation Threshold reductions may lead to user accounts being eligible for liquidations upon their approval, we want to clarify the full implications to the community at each step. We will publicly communicate the planned amendments and list of affected accounts leading to the on-chain execution._ + +The full governance post can be found [here](https://governance.aave.com/t/arfc-v2-ethereum-and-polygon-lt-reductions-12-04-2023/15747) + +## Specification + +Chaos and Gauntlet align on the aggressive approach to expedite the deprecation of several assets on V2, with a potential for ~$120K in total value eligible for liquidation, at the time of posting this proposal + +### **Aave v2 Ethereum** + +| Asset | Current LT | Chaos Rec LT | Value Liquidated ($) | Accounts Liquidated | +| ------ | ---------- | ------------ | -------------------- | ------------------- | +| CRV | 30% | 25% | 126 | 1 | +| CVX | 24% | 0.05% | 33.24K | 2 | +| DPI | 5% | 0.05% | - | - | +| ENJ | 44% | 0.05% | 4.64K | 14 | +| ENS | 38% | 30% | 2.7K | 9 | +| LINK | 80% | 75% | 3.63K | 9 | +| MANA | 29% | 0.05% | 25.55K | 13 | +| MKR | 28% | 26% | 72 | 2 | +| REN | 18% | 0.05% | 2.24K | 6 | +| SNX | 30% | 0.05% | 10.55K | 20 | +| UNI | 55% | 40% | 2.16K | 14 | +| YFI | 32% | 0.05% | 20.24K | 10 | +| ZRX | 24% | 18% | - | - | +| 1INCH | 1% | 0.05% | - | - | +| BAL | 1% | 0.05% | - | - | +| BAT | 1% | 0.05% | - | - | +| KNC | 1% | 0.05% | - | - | +| FEI | 1% | 0.05% | - | - | +| xSUSHI | 1% | 0.05% | - | - | + +| | Value liquidated | Accounts liquidated | +| ----- | ---------------- | ------------------- | +| Total | $106,024 | 103 | + +### **Aave v2 Polygon** + +| Asset | Current LT | Chaos Rec LT | Chaos Rec LTV | Value Liquidated ($) | Accounts Liquidated | +| ----- | ---------- | ------------ | ------------- | -------------------- | ------------------- | +| SUSHI | 45% | 0.05% | 0% | 13 | 3 | +| DPI | 45% | 0.05% | 0% | 40 | 2 | +| BAL | 45% | 0.05% | 0% | 1.2K | 15 | +| CRV | 45% | 0.05% | 0% | 127 | 11 | +| GHST | 40% | 0.05% | 0% | 7.7K | 10 | +| LINK | 65% | 0.05% | 0% | 6.6K | 26 | + +| | Value liquidated | Accounts liquidated | +| ----- | ---------------- | ------------------- | +| Total | $15,600 | 69 | + +## References + +- Implementation: [AaveV2Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol), [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol) +- Tests: [AaveV2Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol), [AaveV2Polygon](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.t.sol) +- Snapshot: Direct-to-AIP +- [Discussion](https://governance.aave.com/t/arfc-v2-ethereum-and-polygon-lt-reductions-12-04-2023/15747) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol new file mode 100644 index 000000000..d4263099b --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript, PolygonScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205} from './AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol'; +import {AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205} from './AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205.sol'; + +/** + * @dev Deploy Ethereum + * command: make deploy-ledger contract=src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol:DeployEthereum chain=mainnet + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 payload0 = new AaveV2Ethereum_ChaosLabsV2EthereumAndPolygonLTReductions_20231205(); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(address(payload0)); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Deploy Polygon + * command: make deploy-ledger contract=src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol:DeployPolygon chain=polygon + */ +contract DeployPolygon is PolygonScript { + function run() external broadcast { + // deploy payloads + AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205 payload0 = new AaveV2Polygon_ChaosLabsV2EthereumAndPolygonLTReductions_20231205(); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(address(payload0)); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions_20231205.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](2); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction(0x41b08a9C1dddBfdBFBb46973A17f76FF06A7d3D6); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsPolygon = new IPayloadsControllerCore.ExecutionAction[](1); + actionsPolygon[0] = GovV3Helpers.buildAction(0xf64C196f2Cd0D00D280140a138674EFbacE18572); + payloads[1] = GovV3Helpers.buildPolygonPayload(vm, actionsPolygon); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal2_5( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/ChaosLabsV2EthereumAndPolygonLTReductions.md' + ) + ); + } +} diff --git a/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/config.json b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/config.json new file mode 100644 index 000000000..a77ca546f --- /dev/null +++ b/src/20231205_Multi_ChaosLabsV2EthereumAndPolygonLTReductions/config.json @@ -0,0 +1,25 @@ +{ + "rootOptions": { + "author": "Chaos Labs", + "pools": ["AaveV2Ethereum", "AaveV2Polygon"], + "title": "Chaos Labs V2 Ethereum and Polygon LT Reductions", + "discussion": "https://governance.aave.com/t/arfc-v2-ethereum-and-polygon-lt-reductions-12-04-2023/15747", + "shortName": "ChaosLabsV2EthereumAndPolygonLTReductions", + "date": "20231205", + "snapshot": "“Direct-to-AIP”" + }, + "poolOptions": { + "AaveV2Ethereum": { + "configs": {}, + "cache": { + "blockNumber": 18720737 + } + }, + "AaveV2Polygon": { + "configs": {}, + "cache": { + "blockNumber": 50773537 + } + } + } +}