From 7547c8d60aedef0d10da74aec549463a2a8631cc Mon Sep 17 00:00:00 2001 From: Eyal Ovadya Date: Thu, 15 Feb 2024 18:47:19 -0800 Subject: [PATCH 1/3] Scroll Caps Increase 20240214 --- Makefile | 1 + ...0214_post_scroll_caps_increase_20240214.md | 51 +++++++++++++++++++ foundry.toml | 1 + scripts/CapsPlusRiskStewardScroll.s.sol | 10 ++++ src/ScrollCapsIncrease_20240214.s.sol | 48 +++++++++++++++++ 5 files changed, 111 insertions(+) create mode 100644 diffs/pre_scroll_caps_increase_20240214_post_scroll_caps_increase_20240214.md create mode 100644 scripts/CapsPlusRiskStewardScroll.s.sol create mode 100644 src/ScrollCapsIncrease_20240214.s.sol diff --git a/Makefile b/Makefile index 31b507c..21c9b88 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ arbitrum-contract:; forge script ${contract_path} --rpc-url arbitrum --sig "run( metis-contract:; forge script ${contract_path} --rpc-url metis --sig "run(bool)" false -vv base-contract:; forge script ${contract_path} --rpc-url base --sig "run(bool)" false -vv gnosis-contract:; forge script ${contract_path} --rpc-url gnosis --sig "run(bool)" false -vv +scroll-contract:; forge script ${contract_path} --rpc-url scroll --sig "run(bool)" false -vv # only emit mainnet-example:; forge script src/MainnetExample.s.sol:MainnetExample --rpc-url mainnet --sig "run(bool)" false -vv diff --git a/diffs/pre_scroll_caps_increase_20240214_post_scroll_caps_increase_20240214.md b/diffs/pre_scroll_caps_increase_20240214_post_scroll_caps_increase_20240214.md new file mode 100644 index 0000000..1d5007a --- /dev/null +++ b/diffs/pre_scroll_caps_increase_20240214_post_scroll_caps_increase_20240214.md @@ -0,0 +1,51 @@ +## Reserve changes + +### Reserve altered + +#### USDC ([0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4](https://scrollscan.com/address/0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1,000,000 USDC | 2,000,000 USDC | + + +#### WETH ([0x5300000000000000000000000000000000000004](https://scrollscan.com/address/0x5300000000000000000000000000000000000004)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 240 WETH | 480 WETH | + + +#### wstETH ([0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32](https://scrollscan.com/address/0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 130 wstETH | 260 wstETH | + + +## Raw diff + +```json +{ + "reserves": { + "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4": { + "supplyCap": { + "from": 1000000, + "to": 2000000 + } + }, + "0x5300000000000000000000000000000000000004": { + "supplyCap": { + "from": 240, + "to": 480 + } + }, + "0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32": { + "supplyCap": { + "from": 130, + "to": 260 + } + } + } +} +``` \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index f58dfe6..a010db1 100644 --- a/foundry.toml +++ b/foundry.toml @@ -20,6 +20,7 @@ harmony = "${RPC_HARMONY}" metis = "${RPC_METIS}" base = "${RPC_BASE}" gnosis = "${RPC_GNOSIS}" +scroll = "${RPC_SCROLL}" [etherscan] mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 } diff --git a/scripts/CapsPlusRiskStewardScroll.s.sol b/scripts/CapsPlusRiskStewardScroll.s.sol new file mode 100644 index 0000000..e88036d --- /dev/null +++ b/scripts/CapsPlusRiskStewardScroll.s.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol'; +import {AaveV3Scroll} from 'aave-address-book/AaveV3Scroll.sol'; +import {CapsPlusRiskStewardBase} from './CapsPlusRiskStewardBase.s.sol'; + +abstract contract CapsPlusRiskStewardScroll is CapsPlusRiskStewardBase { + constructor() CapsPlusRiskStewardBase(AaveV3Scroll.POOL, AaveV3Scroll.CAPS_PLUS_RISK_STEWARD) {} +} diff --git a/src/ScrollCapsIncrease_20240214.s.sol b/src/ScrollCapsIncrease_20240214.s.sol new file mode 100644 index 0000000..3beca44 --- /dev/null +++ b/src/ScrollCapsIncrease_20240214.s.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3ScrollAssets} from 'aave-address-book/AaveV3Scroll.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardScroll} from '../scripts/CapsPlusRiskStewardScroll.s.sol'; + +/** + * @title Update Caps on Scroll V3 + * @author Chaos Labs + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-caps-on-v3-scroll-02-14-2024/16626 + */ +contract ScrollCapsIncrease_20240214 is CapsPlusRiskStewardScroll { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'scroll_caps_increase_20240214'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](3); + + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ScrollAssets.USDC_UNDERLYING, + 2_000_000, + EngineFlags.KEEP_CURRENT + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ScrollAssets.WETH_UNDERLYING, + 480, + EngineFlags.KEEP_CURRENT + ); + + capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ScrollAssets.wstETH_UNDERLYING, + 260, + EngineFlags.KEEP_CURRENT + ); + + return capUpdates; + } +} From 609d74c676b2236cb275e3ee3aad5ca982c61cd7 Mon Sep 17 00:00:00 2001 From: Eyal Ovadya Date: Thu, 15 Feb 2024 18:48:12 -0800 Subject: [PATCH 2/3] Fix --- src/ScrollCapsIncrease_20240214.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScrollCapsIncrease_20240214.s.sol b/src/ScrollCapsIncrease_20240214.s.sol index 3beca44..089dc34 100644 --- a/src/ScrollCapsIncrease_20240214.s.sol +++ b/src/ScrollCapsIncrease_20240214.s.sol @@ -8,7 +8,7 @@ import {CapsPlusRiskStewardScroll} from '../scripts/CapsPlusRiskStewardScroll.s. /** * @title Update Caps on Scroll V3 - * @author Chaos Labs + * @author Chaos Labs - eyalovadya * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-caps-on-v3-scroll-02-14-2024/16626 */ contract ScrollCapsIncrease_20240214 is CapsPlusRiskStewardScroll { From 9ab13356ecdf2ee8bb5488d9d6099809cd782f4d Mon Sep 17 00:00:00 2001 From: Eyal Ovadya Date: Thu, 15 Feb 2024 18:59:07 -0800 Subject: [PATCH 3/3] Update submodules to latest commit --- 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 ee8a24e..0641952 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit ee8a24e7799574386224853ad4bb15f3b470490f +Subproject commit 06419522596afacd00604a8ab0a1e532cc6399ae diff --git a/lib/aave-helpers b/lib/aave-helpers index 1adaebd..7da64a6 160000 --- a/lib/aave-helpers +++ b/lib/aave-helpers @@ -1 +1 @@ -Subproject commit 1adaebd6fe409770e3a2d56560e0127df85b3e2e +Subproject commit 7da64a6c8dfac96578d99b4f59c221a5f79e463b diff --git a/lib/forge-std b/lib/forge-std index 87a2a0a..1d0766b 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 87a2a0afc5fafd6297538a45a52ac19e71a84562 +Subproject commit 1d0766bc5d814f117c7b1e643828f7d85024fb51