diff --git a/Makefile b/Makefile index 613d742..64770b9 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,10 @@ 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 safe-polygon-example:; forge script src/PolygonExample.s.sol:PolygonExample --rpc-url polygon --sig "run(bool)" true -vv diff --git a/diffs/pre_arbitrum_caps_increase_20230901_post_arbitrum_caps_increase_20230901.md b/diffs/pre_arbitrum_caps_increase_20230901_post_arbitrum_caps_increase_20230901.md new file mode 100644 index 0000000..a559330 --- /dev/null +++ b/diffs/pre_arbitrum_caps_increase_20230901_post_arbitrum_caps_increase_20230901.md @@ -0,0 +1,51 @@ +## Reserve changes + +### Reserve altered + +#### wstETH ([0x5979D7b546E38E414F7E9822514be443A4800529](https://arbiscan.io/address/0x5979D7b546E38E414F7E9822514be443A4800529)) + +| description | value before | value after | +| --- | --- | --- | +| borrowCap | 800 wstETH | 1,600 wstETH | + + +#### LUSD ([0x93b346b6BC2548dA6A1E7d98E9a421B42541425b](https://arbiscan.io/address/0x93b346b6BC2548dA6A1E7d98E9a421B42541425b)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 900,000 LUSD | 1,400,000 LUSD | + + +#### LINK ([0xf97f4df75117a78c1A5a0DBb814Af92458539FB4](https://arbiscan.io/address/0xf97f4df75117a78c1A5a0DBb814Af92458539FB4)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 810,000 LINK | 1,300,000 LINK | + + +## Raw diff + +```json +{ + "reserves": { + "0x5979D7b546E38E414F7E9822514be443A4800529": { + "borrowCap": { + "from": 800, + "to": 1600 + } + }, + "0x93b346b6BC2548dA6A1E7d98E9a421B42541425b": { + "supplyCap": { + "from": 900000, + "to": 1400000 + } + }, + "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4": { + "supplyCap": { + "from": 810000, + "to": 1300000 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/pre_base_caps_increase_20230901_post_base_caps_increase_20230901.md b/diffs/pre_base_caps_increase_20230901_post_base_caps_increase_20230901.md new file mode 100644 index 0000000..cfc32a7 --- /dev/null +++ b/diffs/pre_base_caps_increase_20230901_post_base_caps_increase_20230901.md @@ -0,0 +1,25 @@ +## Reserve changes + +### Reserves altered + +#### cbETH ([0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22](https://basescan.org/address/0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22)) + +| description | value before | value after | +| --- | --- | --- | +| borrowCap | 100 cbETH | 200 cbETH | + + +## Raw diff + +```json +{ + "reserves": { + "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22": { + "borrowCap": { + "from": 100, + "to": 200 + } + } + } +} +``` \ No newline at end of file diff --git a/diffs/pre_mainnetCapsIncrease_20230901_post_mainnetCapsIncrease_20230901.md b/diffs/pre_mainnetCapsIncrease_20230901_post_mainnetCapsIncrease_20230901.md new file mode 100644 index 0000000..6bea17b --- /dev/null +++ b/diffs/pre_mainnetCapsIncrease_20230901_post_mainnetCapsIncrease_20230901.md @@ -0,0 +1,48 @@ +## Reserve changes + +### Reserve altered + +#### wstETH ([0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0](https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 600,000 wstETH | 750,000 wstETH | +| borrowCap | 12,000 wstETH | 24,000 wstETH | + + +#### RPL ([0xD33526068D116cE69F19A9ee46F0bd304F21A51f](https://etherscan.io/address/0xD33526068D116cE69F19A9ee46F0bd304F21A51f)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 210,000 RPL | 420,000 RPL | +| borrowCap | 105,000 RPL | 160,000 RPL | + + +## Raw diff + +```json +{ + "reserves": { + "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": { + "borrowCap": { + "from": 12000, + "to": 24000 + }, + "supplyCap": { + "from": 600000, + "to": 750000 + } + }, + "0xD33526068D116cE69F19A9ee46F0bd304F21A51f": { + "borrowCap": { + "from": 105000, + "to": 160000 + }, + "supplyCap": { + "from": 210000, + "to": 420000 + } + } + } +} +``` \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 6c22e18..b474197 100644 --- a/foundry.toml +++ b/foundry.toml @@ -18,6 +18,7 @@ arbitrum = "${RPC_ARBITRUM}" fantom = "${RPC_FANTOM}" harmony = "${RPC_HARMONY}" metis = "${RPC_METIS}" +base = "${RPC_BASE}" [etherscan] mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 } diff --git a/scripts/CapsPlusRiskStewardBaseChain.s.sol b/scripts/CapsPlusRiskStewardBaseChain.s.sol new file mode 100644 index 0000000..eaefec0 --- /dev/null +++ b/scripts/CapsPlusRiskStewardBaseChain.s.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol'; +import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol'; +import {CapsPlusRiskStewardBase} from './CapsPlusRiskStewardBase.s.sol'; + +abstract contract CapsPlusRiskStewardBaseChain is CapsPlusRiskStewardBase { + constructor() CapsPlusRiskStewardBase(AaveV3Base.POOL, AaveV3Base.CAPS_PLUS_RISK_STEWARD) {} +} diff --git a/src/ArbitrumCapsIncrease_20230901.s.sol b/src/ArbitrumCapsIncrease_20230901.s.sol new file mode 100644 index 0000000..4a23121 --- /dev/null +++ b/src/ArbitrumCapsIncrease_20230901.s.sol @@ -0,0 +1,51 @@ +// 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-08-29-2023/14688 + */ +contract ArbitrumCapsIncrease_20230901 is CapsPlusRiskStewardArbitrum { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'arbitrum_caps_increase_20230901'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](3); + + // LUSD + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ArbitrumAssets.LUSD_UNDERLYING, + 1_400_000, + EngineFlags.KEEP_CURRENT + ); + + // LINK + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ArbitrumAssets.LINK_UNDERLYING, + 1_300_000, + EngineFlags.KEEP_CURRENT + ); + + // wstETH + capUpdates[2] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3ArbitrumAssets.wstETH_UNDERLYING, + EngineFlags.KEEP_CURRENT, + 1_600 + ); + + return capUpdates; + } +} diff --git a/src/BaseCapsIncrease_20230901.s.sol b/src/BaseCapsIncrease_20230901.s.sol new file mode 100644 index 0000000..9eaf26e --- /dev/null +++ b/src/BaseCapsIncrease_20230901.s.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3BaseAssets} from 'aave-address-book/AaveV3Base.sol'; +import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {CapsPlusRiskStewardBaseChain} from '../scripts/CapsPlusRiskStewardBaseChain.s.sol'; + +/** + * @title Update Caps on Base V3 + * @author Chaos Labs + * - Discussion: https://governance.aave.com/t/arfc-chaos-labs-risk-stewards-increase-supply-and-borrow-caps-on-v3-08-29-2023/14688 + */ +contract BaseCapsIncrease_20230901 is CapsPlusRiskStewardBaseChain { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'base_caps_increase_20230901'; + } + + /** + * @return IAaveV3ConfigEngine.CapsUpdate[] capUpdates to be performed + */ + function capsUpdates() internal pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capUpdates = new IAaveV3ConfigEngine.CapsUpdate[](1); + + // cbETH + capUpdates[0] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3BaseAssets.cbETH_UNDERLYING, + EngineFlags.KEEP_CURRENT, + 200 + ); + + return capUpdates; + } +} diff --git a/src/MainnetCapsIncrease_20230901.s.sol b/src/MainnetCapsIncrease_20230901.s.sol new file mode 100644 index 0000000..ef43708 --- /dev/null +++ b/src/MainnetCapsIncrease_20230901.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-08-29-2023/14688 + */ +contract MainnetCapsIncrease_20230901 is CapsPlusRiskStewardMainnet { + /** + * @return string name identifier used for the diff + */ + function name() internal pure override returns (string memory) { + return 'mainnetCapsIncrease_20230901'; + } + + /** + * @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.RPL_UNDERLYING, + 420_000, + 160_000 + ); + + capUpdates[1] = IAaveV3ConfigEngine.CapsUpdate( + AaveV3EthereumAssets.wstETH_UNDERLYING, + 750_000, + 24_000 + ); + + return capUpdates; + } +}