From b1a2ce3a9c45641ae57ac1fb9b0703c1059a4855 Mon Sep 17 00:00:00 2001 From: yonikesel Date: Thu, 28 Sep 2023 11:18:47 +0300 Subject: [PATCH] Mainnet Caps Increase 20230928 --- Makefile | 4 +- ...30928_post_mainnetCapsIncrease_20230928.md | 43 +++++++++++++++++++ src/MainnetCapsIncrease_20230928.s.sol | 42 ++++++++++++++++++ 3 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 diffs/pre_mainnetCapsIncrease_20230928_post_mainnetCapsIncrease_20230928.md create mode 100644 src/MainnetCapsIncrease_20230928.s.sol diff --git a/Makefile b/Makefile index 53c6b2d..808df32 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ mainnet-contract:; forge script ${contract_path} --rpc-url mainnet --sig "run(bo optimism-contract:; forge script ${contract_path} --rpc-url optimism --sig "run(bool)" false -vv arbitrum-contract:; forge script ${contract_path} --rpc-url arbitrum --sig "run(bool)" false -vv 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 # only emit mainnet-example:; forge script src/MainnetExample.s.sol:MainnetExample --rpc-url mainnet --sig "run(bool)" false -vv @@ -28,9 +29,6 @@ optimism-example:; forge script src/OptimismExample.s.sol:OptimismExample --rpc- arbitrum-example:; forge script src/ArbitrumExample.s.sol:ArbitrumExample --rpc-url arbitrum --sig "run(bool)" false -vv avalanche-example:; forge script src/AvalancheExample.s.sol:AvalancheExample --rpc-url avalanche --sig "run(bool)" false -vv -mainnet-contract:; forge script ${contract_path} --rpc-url mainnet --sig "run(bool)" false -vv -arbitrum-contract:; forge script ${contract_path} --rpc-url arbitrum --sig "run(bool)" false -vv -base-contract:; forge script ${contract_path} --rpc-url base --sig "run(bool)" false -vv # Broadcast to safe backend safe-mainnet-example:; forge script src/MainnetExample.s.sol:MainnetExample --rpc-url mainnet --sig "run(bool)" true -vv diff --git a/diffs/pre_mainnetCapsIncrease_20230928_post_mainnetCapsIncrease_20230928.md b/diffs/pre_mainnetCapsIncrease_20230928_post_mainnetCapsIncrease_20230928.md new file mode 100644 index 0000000..7c96140 --- /dev/null +++ b/diffs/pre_mainnetCapsIncrease_20230928_post_mainnetCapsIncrease_20230928.md @@ -0,0 +1,43 @@ +## Reserve changes + +### Reserve altered + +#### LUSD ([0x5f98805A4E8be255a32880FDeC7F6728C6568bA0](https://etherscan.io/address/0x5f98805A4E8be255a32880FDeC7F6728C6568bA0)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 12,000,000 LUSD | 18,000,000 LUSD | + + +#### USDT ([0xdAC17F958D2ee523a2206206994597C13D831ec7](https://etherscan.io/address/0xdAC17F958D2ee523a2206206994597C13D831ec7)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 300,000,000 USDT | 600,000,000 USDT | +| borrowCap | 250,000,000 USDT | 500,000,000 USDT | + + +## Raw diff + +```json +{ + "reserves": { + "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0": { + "supplyCap": { + "from": 12000000, + "to": 18000000 + } + }, + "0xdAC17F958D2ee523a2206206994597C13D831ec7": { + "borrowCap": { + "from": 250000000, + "to": 500000000 + }, + "supplyCap": { + "from": 300000000, + "to": 600000000 + } + } + } +} +``` \ No newline at end of file diff --git a/src/MainnetCapsIncrease_20230928.s.sol b/src/MainnetCapsIncrease_20230928.s.sol new file mode 100644 index 0000000..21eb58d --- /dev/null +++ b/src/MainnetCapsIncrease_20230928.s.sol @@ -0,0 +1,42 @@ +// 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-25-2023/14950 + */ +contract MainnetCapsIncrease_20230928 is CapsPlusRiskStewardMainnet { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'mainnetCapsIncrease_20230928'; + } + + /** + * @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( + AaveV3EthereumAssets.LUSD_UNDERLYING, + 18_000_000, + EngineFlags.KEEP_CURRENT + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.USDT_UNDERLYING, + 600_000_000, + 500_000_000 + ); + + return capUpdates; + } +}