From 0f5702fff4af32a5e28cc4a5b8b585f7a9c1b703 Mon Sep 17 00:00:00 2001 From: yonikesel Date: Sat, 16 Sep 2023 23:28:03 +0300 Subject: [PATCH] Caps Increase 20230916 --- Makefile | 5 +++ ...16_post_arbitrum_caps_increase_20230916.md | 25 +++++++++++++ ...30916_post_metis_caps_increase_20230916.md | 25 +++++++++++++ ...16_post_optimism_caps_increase_20230916.md | 25 +++++++++++++ src/ArbitrumCapsIncrease_20230916.s.sol | 36 +++++++++++++++++++ src/MetisCapsIncrease_20230916.s.sol | 29 +++++++++++++++ src/OptimismCapsIncrease_20230916.s.sol | 36 +++++++++++++++++++ 7 files changed, 181 insertions(+) create mode 100644 diffs/pre_arbitrum_caps_increase_20230916_post_arbitrum_caps_increase_20230916.md create mode 100644 diffs/pre_metis_caps_increase_20230916_post_metis_caps_increase_20230916.md create mode 100644 diffs/pre_optimism_caps_increase_20230916_post_optimism_caps_increase_20230916.md create mode 100644 src/ArbitrumCapsIncrease_20230916.s.sol create mode 100644 src/MetisCapsIncrease_20230916.s.sol create mode 100644 src/OptimismCapsIncrease_20230916.s.sol diff --git a/Makefile b/Makefile index 613d742..032e0cd 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ git-diff : @mkdir -p diffs @printf '%s\n%s\n%s\n' "\`\`\`diff" "$$(git diff --no-index --diff-algorithm=patience --ignore-space-at-eol ${before} ${after})" "\`\`\`" > diffs/${out}.md +mainnet-contract:; forge script ${contract_path} --rpc-url mainnet --sig "run(bool)" false -vv +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 + # only emit mainnet-example:; forge script src/MainnetExample.s.sol:MainnetExample --rpc-url mainnet --sig "run(bool)" false -vv polygon-example:; forge script src/PolygonExample.s.sol:PolygonExample --rpc-url polygon --sig "run(bool)" false -vv diff --git a/diffs/pre_arbitrum_caps_increase_20230916_post_arbitrum_caps_increase_20230916.md b/diffs/pre_arbitrum_caps_increase_20230916_post_arbitrum_caps_increase_20230916.md new file mode 100644 index 0000000..025f78d --- /dev/null +++ b/diffs/pre_arbitrum_caps_increase_20230916_post_arbitrum_caps_increase_20230916.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### LUSD ([0x93b346b6BC2548dA6A1E7d98E9a421B42541425b](https://arbiscan.io/address/0x93b346b6BC2548dA6A1E7d98E9a421B42541425b)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1,400,000 LUSD | 1,800,000 LUSD | + + +## Raw diff + +```json +{ + "reserves": { + "0x93b346b6BC2548dA6A1E7d98E9a421B42541425b": { + "supplyCap": { + "from": 1400000, + "to": 1800000 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/pre_metis_caps_increase_20230916_post_metis_caps_increase_20230916.md b/diffs/pre_metis_caps_increase_20230916_post_metis_caps_increase_20230916.md new file mode 100644 index 0000000..8bdbd7d --- /dev/null +++ b/diffs/pre_metis_caps_increase_20230916_post_metis_caps_increase_20230916.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### Metis ([0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000](https://andromeda-explorer.metis.io/address/0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 60,000 Metis | 120,000 Metis | + + +## Raw diff + +```json +{ + "reserves": { + "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000": { + "supplyCap": { + "from": 60000, + "to": 120000 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/pre_optimism_caps_increase_20230916_post_optimism_caps_increase_20230916.md b/diffs/pre_optimism_caps_increase_20230916_post_optimism_caps_increase_20230916.md new file mode 100644 index 0000000..d9bcf83 --- /dev/null +++ b/diffs/pre_optimism_caps_increase_20230916_post_optimism_caps_increase_20230916.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### LINK ([0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6](https://optimistic.etherscan.io/address/0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 160,000 LINK | 210,000 LINK | + + +## Raw diff + +```json +{ + "reserves": { + "0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6": { + "supplyCap": { + "from": 160000, + "to": 210000 + } + } + } +} +``` \ No newline at end of file diff --git a/src/ArbitrumCapsIncrease_20230916.s.sol b/src/ArbitrumCapsIncrease_20230916.s.sol new file mode 100644 index 0000000..26bb37d --- /dev/null +++ b/src/ArbitrumCapsIncrease_20230916.s.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardArbitrum} from '../scripts/CapsPlusRiskStewardArbitrum.s.sol'; + +/** + * @title Update Caps on Arbitrum V3 + * @author @yonikesel - ChaosLabsInc + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-aave-v3-09-12-2023/14832 + */ +contract ArbitrumCapsIncrease_20230916 is CapsPlusRiskStewardArbitrum { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'arbitrum_caps_increase_20230916'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](1); + + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ArbitrumAssets.LUSD_UNDERLYING, + 1_800_000, + EngineFlags.KEEP_CURRENT + ); + + return capUpdates; + } +} diff --git a/src/MetisCapsIncrease_20230916.s.sol b/src/MetisCapsIncrease_20230916.s.sol new file mode 100644 index 0000000..3f9e622 --- /dev/null +++ b/src/MetisCapsIncrease_20230916.s.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3MetisAssets} from 'aave-address-book/AaveV3Metis.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardMetis} from '../scripts/CapsPlusRiskStewardMetis.s.sol'; + +contract MetisCapsIncrease20230916 is CapsPlusRiskStewardMetis { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'metis_caps_increase_20230916'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](1); + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3MetisAssets.Metis_UNDERLYING, + 120_000, + EngineFlags.KEEP_CURRENT + ); + return capUpdates; + } +} diff --git a/src/OptimismCapsIncrease_20230916.s.sol b/src/OptimismCapsIncrease_20230916.s.sol new file mode 100644 index 0000000..e8bbe52 --- /dev/null +++ b/src/OptimismCapsIncrease_20230916.s.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardOptimism} from '../scripts/CapsPlusRiskStewardOptimism.s.sol'; + +/** + * @title Update Caps on Optimism V3 + * @author @ChaosLabsInc + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-aave-v3-09-12-2023/14832 + */ +contract OptimismCapsIncrease_20230916 is CapsPlusRiskStewardOptimism { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'optimism_caps_increase_20230916'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](1); + + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3OptimismAssets.LINK_UNDERLYING, + 210_000, + EngineFlags.KEEP_CURRENT + ); + + return capUpdates; + } +}