From dbced78f101d8c67e68ae363bc507c8dc1a183b3 Mon Sep 17 00:00:00 2001 From: Eyal Ovadya Date: Wed, 28 Feb 2024 17:31:39 +0200 Subject: [PATCH] Scroll Caps Increase 20240228 --- ...0228_post_scroll_caps_increase_20240228.md | 38 +++++++++++++++++ src/ScrollCapsIncrease_20240228.s.sol | 41 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 diffs/pre_scroll_caps_increase_20240228_post_scroll_caps_increase_20240228.md create mode 100644 src/ScrollCapsIncrease_20240228.s.sol diff --git a/diffs/pre_scroll_caps_increase_20240228_post_scroll_caps_increase_20240228.md b/diffs/pre_scroll_caps_increase_20240228_post_scroll_caps_increase_20240228.md new file mode 100644 index 0000000..3af9198 --- /dev/null +++ b/diffs/pre_scroll_caps_increase_20240228_post_scroll_caps_increase_20240228.md @@ -0,0 +1,38 @@ +## Reserve changes + +### Reserve altered + +#### WETH ([0x5300000000000000000000000000000000000004](https://scrollscan.com/address/0x5300000000000000000000000000000000000004)) + +| description | value before | value after | +| --- | --- | --- | +| borrowCap | 400 WETH | 600 WETH | + + +#### wstETH ([0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32](https://scrollscan.com/address/0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 520 wstETH | 700 wstETH | + + +## Raw diff + +```json +{ + "reserves": { + "0x5300000000000000000000000000000000000004": { + "borrowCap": { + "from": 400, + "to": 600 + } + }, + "0xf610A9dfB7C89644979b4A0f27063E9e7d7Cda32": { + "supplyCap": { + "from": 520, + "to": 700 + } + } + } +} +``` \ No newline at end of file diff --git a/src/ScrollCapsIncrease_20240228.s.sol b/src/ScrollCapsIncrease_20240228.s.sol new file mode 100644 index 0000000..ee360a1 --- /dev/null +++ b/src/ScrollCapsIncrease_20240228.s.sol @@ -0,0 +1,41 @@ +// 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 - eyalovadya + */ +contract ScrollCapsIncrease_20240228 is CapsPlusRiskStewardScroll { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'scroll_caps_increase_20240228'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](2); + + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ScrollAssets.WETH_UNDERLYING, + EngineFlags.KEEP_CURRENT, + 600 + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ScrollAssets.wstETH_UNDERLYING, + 700, + EngineFlags.KEEP_CURRENT + ); + + return capUpdates; + } +}