From 2881402013009af0dd49692e47e65ac23ff7d211 Mon Sep 17 00:00:00 2001 From: Eyal Ovadya Date: Wed, 15 May 2024 20:45:16 +0300 Subject: [PATCH] Increase Caps On Arbitrum Ethereum and Gnosis --- lib/aave-address-book | 2 +- lib/aave-helpers | 2 +- lib/forge-std | 2 +- src/ArbitrumCapsIncrease_20240515.s.sol | 36 +++++++++++++++++++++ src/GnosisCapsIncrease_20240515.s.sol | 36 +++++++++++++++++++++ src/MainnetCapsIncrease_20240515.s.sol | 42 +++++++++++++++++++++++++ 6 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 src/ArbitrumCapsIncrease_20240515.s.sol create mode 100644 src/GnosisCapsIncrease_20240515.s.sol create mode 100644 src/MainnetCapsIncrease_20240515.s.sol diff --git a/lib/aave-address-book b/lib/aave-address-book index 0641952..8b1a6c5 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit 06419522596afacd00604a8ab0a1e532cc6399ae +Subproject commit 8b1a6c5b022b60eb4a71f85d11f8a584a8c487af diff --git a/lib/aave-helpers b/lib/aave-helpers index 7da64a6..8e1340b 160000 --- a/lib/aave-helpers +++ b/lib/aave-helpers @@ -1 +1 @@ -Subproject commit 7da64a6c8dfac96578d99b4f59c221a5f79e463b +Subproject commit 8e1340b890cef83117a4b319bea395b26991c0aa diff --git a/lib/forge-std b/lib/forge-std index 1d0766b..d44c4fb 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 1d0766bc5d814f117c7b1e643828f7d85024fb51 +Subproject commit d44c4fbbb9ff054fb334babbdd34f9b6e899b3d6 diff --git a/src/ArbitrumCapsIncrease_20240515.s.sol b/src/ArbitrumCapsIncrease_20240515.s.sol new file mode 100644 index 0000000..f6fabd9 --- /dev/null +++ b/src/ArbitrumCapsIncrease_20240515.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 Chaos Labs + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-ethereum-arbitrum-and-gnosis-05-14-2024/17705 + */ +contract ArbitrumCapsIncrease_20240515 is CapsPlusRiskStewardArbitrum { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'arbitrum_caps_increase_20240515'; + } + + /** + * @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.weETH_UNDERLYING, + 32_000, + 3200 + ); + + return capUpdates; + } +} diff --git a/src/GnosisCapsIncrease_20240515.s.sol b/src/GnosisCapsIncrease_20240515.s.sol new file mode 100644 index 0000000..257b049 --- /dev/null +++ b/src/GnosisCapsIncrease_20240515.s.sol @@ -0,0 +1,36 @@ +// 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-caps-on-v3-ethereum-arbitrum-and-gnosis-05-14-2024/17705 + */ +contract GnosisCapsIncrease_20240515 is CapsPlusRiskStewardGnosis { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'gnosis_caps_increase_20240515'; + } + + /** + * @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( + AaveV3GnosisAssets.GNO_UNDERLYING, + EngineFlags.KEEP_CURRENT, + 4400 + ); + + return capUpdates; + } +} diff --git a/src/MainnetCapsIncrease_20240515.s.sol b/src/MainnetCapsIncrease_20240515.s.sol new file mode 100644 index 0000000..98580de --- /dev/null +++ b/src/MainnetCapsIncrease_20240515.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 Increase 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-arbitrum-and-gnosis-05-14-2024/17705 + */ +contract MainnetCapsIncrease_20240515 is CapsPlusRiskStewardMainnet { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'mainnetCapsIncrease_20240515'; + } + + /** + * @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.PYUSD_UNDERLYING, + 60_000_000, + 48_000_000 + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.weETH_UNDERLYING, + 200_000, + EngineFlags.KEEP_CURRENT + ); + + return capUpdates; + } +}