From f1efb3ea59acdfe9e2700c16008c07ba5b318f96 Mon Sep 17 00:00:00 2001 From: Eyal Ovadya Date: Tue, 19 Mar 2024 23:46:46 +0200 Subject: [PATCH] Gnosis Caps Increase 20240319 --- ...0319_post_gnosis_caps_increase_20240319.md | 61 +++++++++++++++++++ src/GnosisCapsIncrease_20240319.s.sol | 48 +++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 diffs/pre_gnosis_caps_increase_20240319_post_gnosis_caps_increase_20240319.md create mode 100644 src/GnosisCapsIncrease_20240319.s.sol diff --git a/diffs/pre_gnosis_caps_increase_20240319_post_gnosis_caps_increase_20240319.md b/diffs/pre_gnosis_caps_increase_20240319_post_gnosis_caps_increase_20240319.md new file mode 100644 index 0000000..759921c --- /dev/null +++ b/diffs/pre_gnosis_caps_increase_20240319_post_gnosis_caps_increase_20240319.md @@ -0,0 +1,61 @@ +## Reserve changes + +### Reserve altered + +#### USDC ([0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83](https://gnosisscan.io/address/0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 6,000,000 USDC | 7,400,000 USDC | +| borrowCap | 5,600,000 USDC | 7,400,000 USDC | + + +#### sDAI ([0xaf204776c7245bF4147c2612BF6e5972Ee483701](https://gnosisscan.io/address/0xaf204776c7245bF4147c2612BF6e5972Ee483701)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 10,000,000 sDAI | 20,000,000 sDAI | + + +#### WXDAI ([0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d](https://gnosisscan.io/address/0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 4,600,000 WXDAI | 9,200,000 WXDAI | +| borrowCap | 4,600,000 WXDAI | 9,200,000 WXDAI | + + +## Raw diff + +```json +{ + "reserves": { + "0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83": { + "borrowCap": { + "from": 5600000, + "to": 7400000 + }, + "supplyCap": { + "from": 6000000, + "to": 7400000 + } + }, + "0xaf204776c7245bF4147c2612BF6e5972Ee483701": { + "supplyCap": { + "from": 10000000, + "to": 20000000 + } + }, + "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": { + "borrowCap": { + "from": 4600000, + "to": 9200000 + }, + "supplyCap": { + "from": 4600000, + "to": 9200000 + } + } + } +} +``` \ No newline at end of file diff --git a/src/GnosisCapsIncrease_20240319.s.sol b/src/GnosisCapsIncrease_20240319.s.sol new file mode 100644 index 0000000..c325f44 --- /dev/null +++ b/src/GnosisCapsIncrease_20240319.s.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardGnosis} from '../scripts/CapsPlusRiskStewardGnosis.s.sol'; + +/** + * @title Update Caps on Gnosis V3 + * @author Chaos Labs + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-cap-on-v3-gnosis-03-19-2024/17038 + */ +contract GnosisCapsIncrease_20240319 is CapsPlusRiskStewardGnosis { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'gnosis_caps_increase_20240319'; + } + + /** + * @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( + AaveV3GnosisAssets.WXDAI_UNDERLYING, + 9_200_000, + 9_200_000 + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3GnosisAssets.USDC_UNDERLYING, + 7_400_000, + 7_400_000 + ); + + capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3GnosisAssets.sDAI_UNDERLYING, + 20_000_000, + EngineFlags.KEEP_CURRENT + ); + + return capUpdates; + } +}