From 1676a8eedc3ac733f56fcb2258f287cd8f6e5423 Mon Sep 17 00:00:00 2001 From: yonikesel Date: Wed, 6 Sep 2023 22:56:58 +0300 Subject: [PATCH 1/3] Ethereum V3 Caps Update --- src/MainnetCapsIncrease_20230906.s.sol | 54 ++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/MainnetCapsIncrease_20230906.s.sol diff --git a/src/MainnetCapsIncrease_20230906.s.sol b/src/MainnetCapsIncrease_20230906.s.sol new file mode 100644 index 0000000..00f6ca7 --- /dev/null +++ b/src/MainnetCapsIncrease_20230906.s.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardMainnet} from '../scripts/CapsPlusRiskStewardMainnet.s.sol'; +import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; + +/** + * @title Update Borrow Caps on Ethereum V3 + * @author @ChaosLabsInc + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-ethereum-09-05-2023/14764 + */ +contract MainnetCapsIncrease_20230906 is CapsPlusRiskStewardMainnet { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'mainnetCapsIncrease_20230906'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](4); + + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.RPL_UNDERLYING, + 840_000, + EngineFlags.KEEP_CURRENT + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.MKR_UNDERLYING, + 15_000, + 3_000 + ); + + capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.UNI_UNDERLYING, + 4_000_000, + EngineFlags.KEEP_CURRENT + ); + + capUpdates[3] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.cbETH_UNDERLYING, + EngineFlags.KEEP_CURRENT, + 2_400 + ); + + return capUpdates; + } +} From 7b4dfbb31c6862782db76bdaa15c344025e5135b Mon Sep 17 00:00:00 2001 From: yonikesel Date: Thu, 7 Sep 2023 11:14:51 +0300 Subject: [PATCH 2/3] update git modules --- lib/aave-address-book | 2 +- lib/aave-helpers | 2 +- lib/forge-std | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aave-address-book b/lib/aave-address-book index 9c5828a..5f2424a 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit 9c5828aa6f428a40f3ff72be6399eca7575a3697 +Subproject commit 5f2424a89e4174914b397351eaeb56376748f913 diff --git a/lib/aave-helpers b/lib/aave-helpers index 60dd764..8460740 160000 --- a/lib/aave-helpers +++ b/lib/aave-helpers @@ -1 +1 @@ -Subproject commit 60dd764f9914ad08230601a8c07b42a30d433d3c +Subproject commit 84607407f1d29791a4e4bcb6bcb33990e67d7b4a diff --git a/lib/forge-std b/lib/forge-std index b00f504..1d9650e 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit b00f504daf0bdd8cf2e67973e2c86bd213cda400 +Subproject commit 1d9650e951204a0ddce9ff89c32f1997984cef4d From 274b75c204f8d85fdc761b2c800c79a687e83d9e Mon Sep 17 00:00:00 2001 From: yonikesel Date: Thu, 7 Sep 2023 11:17:51 +0300 Subject: [PATCH 3/3] update diff --- ...30906_post_mainnetCapsIncrease_20230906.md | 69 +++++++++++++++++++ scripts/CapsPlusRiskStewardBase.s.sol | 4 +- 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 diffs/pre_mainnetCapsIncrease_20230906_post_mainnetCapsIncrease_20230906.md diff --git a/diffs/pre_mainnetCapsIncrease_20230906_post_mainnetCapsIncrease_20230906.md b/diffs/pre_mainnetCapsIncrease_20230906_post_mainnetCapsIncrease_20230906.md new file mode 100644 index 0000000..e10c552 --- /dev/null +++ b/diffs/pre_mainnetCapsIncrease_20230906_post_mainnetCapsIncrease_20230906.md @@ -0,0 +1,69 @@ +## Reserve changes + +### Reserve altered + +#### UNI ([0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 2,000,000 UNI | 4,000,000 UNI | + + +#### MKR ([0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2](https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 10,000 MKR | 15,000 MKR | +| borrowCap | 1,500 MKR | 3,000 MKR | + + +#### cbETH ([0xBe9895146f7AF43049ca1c1AE358B0541Ea49704](https://etherscan.io/address/0xBe9895146f7AF43049ca1c1AE358B0541Ea49704)) + +| description | value before | value after | +| --- | --- | --- | +| borrowCap | 1,200 cbETH | 2,400 cbETH | + + +#### RPL ([0xD33526068D116cE69F19A9ee46F0bd304F21A51f](https://etherscan.io/address/0xD33526068D116cE69F19A9ee46F0bd304F21A51f)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 420,000 RPL | 840,000 RPL | + + +## Raw diff + +```json +{ + "reserves": { + "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": { + "supplyCap": { + "from": 2000000, + "to": 4000000 + } + }, + "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2": { + "borrowCap": { + "from": 1500, + "to": 3000 + }, + "supplyCap": { + "from": 10000, + "to": 15000 + } + }, + "0xBe9895146f7AF43049ca1c1AE358B0541Ea49704": { + "borrowCap": { + "from": 1200, + "to": 2400 + } + }, + "0xD33526068D116cE69F19A9ee46F0bd304F21A51f": { + "supplyCap": { + "from": 420000, + "to": 840000 + } + } + } +} +``` \ No newline at end of file diff --git a/scripts/CapsPlusRiskStewardBase.s.sol b/scripts/CapsPlusRiskStewardBase.s.sol index f8e8ef0..33fda0e 100644 --- a/scripts/CapsPlusRiskStewardBase.s.sol +++ b/scripts/CapsPlusRiskStewardBase.s.sol @@ -8,9 +8,9 @@ import {IPool} from 'aave-address-book/AaveV3.sol'; import {CapsPlusRiskSteward} from 'aave-helpers/riskstewards/CapsPlusRiskSteward.sol'; import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; -import {ProtocolV3_0_1TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; -abstract contract CapsPlusRiskStewardBase is ProtocolV3_0_1TestBase { +abstract contract CapsPlusRiskStewardBase is ProtocolV3TestBase { error FailedUpdate(); IPool immutable POOL; CapsPlusRiskSteward immutable STEWARD;