diff --git a/diffs/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_before_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_after.md b/diffs/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_before_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_after.md new file mode 100644 index 000000000..9f385518b --- /dev/null +++ b/diffs/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_before_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_after.md @@ -0,0 +1,209 @@ +## Reserve changes + +### Reserve altered + +#### USDC.e ([0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0](https://gnosisscan.io/address/0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 USDC.e | 12,000,000 USDC.e | +| borrowCap | 1 USDC.e | 11,000,000 USDC.e | + + +#### WETH ([0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1](https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 WETH | 3,600 WETH | +| borrowCap | 1 WETH | 2,400 WETH | + + +#### wstETH ([0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6](https://gnosisscan.io/address/0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 wstETH | 15,000 wstETH | +| borrowCap | 1 wstETH | 150 wstETH | + + +#### GNO ([0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb](https://gnosisscan.io/address/0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 GNO | 140,000 GNO | +| borrowCap | 1 GNO | 20,000 GNO | + + +#### sDAI ([0xaf204776c7245bF4147c2612BF6e5972Ee483701](https://gnosisscan.io/address/0xaf204776c7245bF4147c2612BF6e5972Ee483701)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 sDAI | 24,000,000 sDAI | +| borrowCap | 0 sDAI | 1 sDAI | + + +#### EURe ([0xcB444e90D8198415266c6a2724b7900fb12FC56E](https://gnosisscan.io/address/0xcB444e90D8198415266c6a2724b7900fb12FC56E)) + +| description | value before | value after | +| --- | --- | --- | +| borrowCap | 1 EURe | 22,500,000 EURe | + + +#### WXDAI ([0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d](https://gnosisscan.io/address/0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 WXDAI | 4,000,000 WXDAI | +| borrowCap | 1 WXDAI | 3,700,000 WXDAI | + + +#### GHO ([0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73](https://gnosisscan.io/address/0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73)) + +| description | value before | value after | +| --- | --- | --- | +| supplyCap | 1 GHO | 1,500,000 GHO | +| borrowCap | 1 GHO | 1,400,000 GHO | + + +## Raw diff + +```json +{ + "reserves": { + "0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0": { + "borrowCap": { + "from": 1, + "to": 11000000 + }, + "supplyCap": { + "from": 1, + "to": 12000000 + } + }, + "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1": { + "borrowCap": { + "from": 1, + "to": 2400 + }, + "supplyCap": { + "from": 1, + "to": 3600 + } + }, + "0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": { + "borrowCap": { + "from": 1, + "to": 150 + }, + "supplyCap": { + "from": 1, + "to": 15000 + } + }, + "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb": { + "borrowCap": { + "from": 1, + "to": 20000 + }, + "supplyCap": { + "from": 1, + "to": 140000 + } + }, + "0xaf204776c7245bF4147c2612BF6e5972Ee483701": { + "borrowCap": { + "from": 0, + "to": 1 + }, + "supplyCap": { + "from": 1, + "to": 24000000 + } + }, + "0xcB444e90D8198415266c6a2724b7900fb12FC56E": { + "borrowCap": { + "from": 1, + "to": 22500000 + } + }, + "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": { + "borrowCap": { + "from": 1, + "to": 3700000 + }, + "supplyCap": { + "from": 1, + "to": 4000000 + } + }, + "0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73": { + "borrowCap": { + "from": 1, + "to": 1400000 + }, + "supplyCap": { + "from": 1, + "to": 1500000 + } + } + }, + "raw": { + "0x9a1f491b86d09fc1484b5fab10041b189b60756b": { + "label": "GovernanceV3Gnosis.PAYLOADS_CONTROLLER", + "contract": "lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy", + "balanceDiff": null, + "nonceDiff": null, + "stateDiff": { + "0xfc869d08d1790d4602743c5b6e4adb33c74c1d0d7c8c47359779d859193dcb05": { + "previousValue": "0x00690c5016000000000002000000000000000000000000000000000000000000", + "newValue": "0x00690c5016000000000003000000000000000000000000000000000000000000" + }, + "0xfc869d08d1790d4602743c5b6e4adb33c74c1d0d7c8c47359779d859193dcb06": { + "previousValue": "0x000000000000000000093a80000000000000693a749700000000000000000000", + "newValue": "0x000000000000000000093a80000000000000693a7497000000000000690c5017" + } + } + }, + "0xb50201558b00496a145fe76f7424749556e326d8": { + "label": "AaveV3Gnosis.POOL", + "contract": "lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy", + "balanceDiff": null, + "nonceDiff": null, + "stateDiff": { + "0x0fc8503df98d2edfc22ff983235893ec99bc6e901ad0d1a5f6fe097f182912c8": { + "previousValue": "0x100000000000000000000003e800000000100000000103e8a50629041e781d4c", + "newValue": "0x100000000000000000000003e8000b71b00000a7d8c003e8a50629041e781d4c" + }, + "0x12df0d1b66951018857a1fdeef40de02520a2969b89b7c09c2f52c5e04f1c6d4": { + "previousValue": "0x100000000000000000000000000019bfcc000000000103e88512000000000000", + "newValue": "0x100000000000000000000000000019bfcc00015752a003e88512000000000000" + }, + "0x8afb1de31eb6f791ce338dc0fcf3aabfcff3e4cbb1f6b2d44d14c58685cac66b": { + "previousValue": "0x100000000000000000000003e800000000100000000107d085122af814b412c0", + "newValue": "0x100000000000000000000003e80000222e0000004e2007d085122af814b412c0" + }, + "0x92f844314898b12448ab6e2a1cca9eec63a65c2047adeeaec3e6245d83e31c27": { + "previousValue": "0x100000000000000000000007d000000000100000000003e8811229041e781d4c", + "newValue": "0x100000000000000000000007d00016e360000000000103e8811229041e781d4c" + }, + "0xd65dfe8da0b5a761df1b1a8535b7c5e4a8bdd40bd305a11fa569ad02c896b907": { + "previousValue": "0x1000000000000000000000000000000000100000000103e88512000000000000", + "newValue": "0x1000000000000000000000000000016e360000155cc003e88512000000000000" + }, + "0xdc3a94d7e87a167cb82c63a89cbd0c50a0f30977be246f917292fdacf90d74dd": { + "previousValue": "0x100000000000000000000007d000000000100000000109c4a51229041e14189c", + "newValue": "0x100000000000000000000007d00003d090000038752009c4a51229041e14189c" + }, + "0xee00b8c53ccd9d92afea2ade430b34dbda7a33b87f08ad29d280d4683a389d07": { + "previousValue": "0x100000000000000000000103e800000000100000000101f4851229681edc1d4c", + "newValue": "0x100000000000000000000103e8000003a9800000009601f4851229681edc1d4c" + }, + "0xf377efb019ad32c4e8b988eeeb3b6ac930668f710207fdcf6b231ce4ccfa238a": { + "previousValue": "0x100000000000000000000103e800000000100000000105dc85122968206c1f40", + "newValue": "0x100000000000000000000103e8000000e1000000096005dc85122968206c1f40" + } + } + } + } +} +``` \ No newline at end of file diff --git a/foundry.lock b/foundry.lock index 4533db76b..02ebceb80 100644 --- a/foundry.lock +++ b/foundry.lock @@ -2,7 +2,7 @@ "lib/aave-helpers": { "branch": { "name": "main", - "rev": "0be4c07fb3475db44f6fa3c6fb8d32eaa130b9cc" + "rev": "7eec1e60b71e0904d7f1afa5743965b9524bf30a" } } } \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index cdf77f917..262c09d15 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,7 +5,7 @@ script = 'scripts' solc = '0.8.27' optimizer = true optimizer_runs = 200 -out = 'out' +out = 'out/shanghai' bytecode_hash = 'none' libs = ['lib'] remappings = [] @@ -26,6 +26,7 @@ optimizer = true optimizer_runs = 200 fs_permissions = [{ access = "write", path = "./reports" }] ffi = true +out = 'out/shanghai' evm_version = 'shanghai' cache_path = 'cache/shanghai' @@ -37,14 +38,17 @@ mode = '3' zksolc = '1.5.13' [profile.test] +out = 'out/cancun' evm_version = 'cancun' cache_path = 'cache/cancun' [profile.deploy] +out = 'out/shanghai' evm_version = 'shanghai' cache_path = 'cache/shanghai' [profile.linea] +out = 'out/london' evm_version = 'london' cache_path = 'cache/london' diff --git a/lib/aave-helpers b/lib/aave-helpers index 0be4c07fb..7eec1e60b 160000 --- a/lib/aave-helpers +++ b/lib/aave-helpers @@ -1 +1 @@ -Subproject commit 0be4c07fb3475db44f6fa3c6fb8d32eaa130b9cc +Subproject commit 7eec1e60b71e0904d7f1afa5743965b9524bf30a diff --git a/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol new file mode 100644 index 000000000..9c8d6dcc0 --- /dev/null +++ b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; +import {AaveV3PayloadGnosis} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadGnosis.sol'; +import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; + +/** + * @title Reinstate Supply and Borrow Caps on Aave V3 Gnosis Instance + * @author Chaos Labs + * - Discussion: https://governance.aave.com/t/direct-to-aip-reinstate-supply-and-borrow-caps-on-aave-v3-gnosis-instance/23373 + */ +contract AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106 is + AaveV3PayloadGnosis +{ + function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) { + IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](8); + + capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.WETH_UNDERLYING, + supplyCap: 3_600, + borrowCap: 2_400 + }); + capsUpdate[1] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.wstETH_UNDERLYING, + supplyCap: 15_000, + borrowCap: 150 + }); + capsUpdate[2] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.GNO_UNDERLYING, + supplyCap: 140_000, + borrowCap: 20_000 + }); + capsUpdate[3] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.WXDAI_UNDERLYING, + supplyCap: 4_000_000, + borrowCap: 3_700_000 + }); + capsUpdate[4] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.EURe_UNDERLYING, + supplyCap: EngineFlags.KEEP_CURRENT, + borrowCap: 22_500_000 + }); + capsUpdate[5] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.sDAI_UNDERLYING, + supplyCap: 24_000_000, + borrowCap: 1 + }); + capsUpdate[6] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.USDCe_UNDERLYING, + supplyCap: 12_000_000, + borrowCap: 11_000_000 + }); + capsUpdate[7] = IAaveV3ConfigEngine.CapsUpdate({ + asset: AaveV3GnosisAssets.GHO_UNDERLYING, + supplyCap: 1_500_000, + borrowCap: 1_400_000 + }); + + return capsUpdate; + } +} diff --git a/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol new file mode 100644 index 000000000..fd948a263 --- /dev/null +++ b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol'; + +import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol'; +import {AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106} from './AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol'; + +/** + * @dev Test for AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106 + * command: FOUNDRY_PROFILE=test forge test --match-path=src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol -vv + */ +contract AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_Test is + ProtocolV3TestBase +{ + AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106 internal proposal; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('gnosis'), 43004019); + proposal = new AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106', + AaveV3Gnosis.POOL, + address(proposal) + ); + } +} diff --git a/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance.md b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance.md new file mode 100644 index 000000000..e88d20846 --- /dev/null +++ b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance.md @@ -0,0 +1,47 @@ +--- +title: "Reinstate Supply and Borrow Caps on Aave V3 Gnosis Instance" +author: "Chaos Labs" +discussions: "https://governance.aave.com/t/direct-to-aip-reinstate-supply-and-borrow-caps-on-aave-v3-gnosis-instance/23373" +--- + +## Simple Summary + +The Gnosis protocol team has communicated its intention to reopen the canonical bridge, prompting us to initiate the governance process to restore the decreased caps. Specifically, we propose to reverse the previously implemented [freeze](https://governance.aave.com/t/chaos-labs-risk-stewards-decrease-supply-caps-on-aave-v3-11-03-25/23349#p-59595-overview-1) of all assets on the Gnosis Chain, restoring the supply and borrow caps to levels that marginally exceed the current supply and borrow balances. + +## Motivation + +Earlier reductions of the supply and borrow caps on the Gnosis instance were [proposed](https://governance.aave.com/t/chaos-labs-risk-stewards-decrease-supply-caps-on-aave-v3-11-03-25/23349#p-59595-overview-1) as a precautionary measure in response to the Balancer exploit. The pause of the bridge initiated by the Gnosis team aimed to maximize the chances of asset recovery but created a short-lived risk of mispricing. + +As the assets effectively became locked within the chain, the efficiency of pricing was at stake, as arbitrageurs were unable to maintain alignment between disjoined markets. This increased the likelihood of out-of-sync DEX prices relative to the oracle feeds used by the Aave instance. + +As previously [mentioned](https://governance.aave.com/t/chaos-labs-risk-stewards-decrease-supply-caps-on-aave-v3-11-03-25/23349/2), price deviations between DEX prices on the chain and the oracle feeds could cause some liquidatable positions to be unprofitable for the liquidator, potentially leading to the accrual of bad debt if the price changes were not to revert before the prices converge. + +With the Gnosis canonical bridge expected to reopen shortly, arbitrage activity is expected to resume, which should restore price alignment and market efficiency of the network. This proposal is therefore made in advance of the reopening, to ensure that once standard market operations resume, Aave can promptly restore lending activity on the Gnosis network without unnecessary restrictions. + +### Proposed Changes + +At the time of writing, the supply and borrow caps on a broad list of assets on the Gnosis instance are configured to one. Aiming to restore market dynamics to their pre-bridge-freeze state, we recommend increasing the caps to levels that align with both the risk profile of the instance, lending demand, and available on-chain liquidity. + +## Specification + +| Instance | Asset | Current Supply | Current Supply Cap | Recommended Supply Cap | Current Borrow | Current Borrow Cap | Recommended Borrow Cap | +| -------- | ------ | -------------- | ------------------ | ---------------------- | -------------- | ------------------ | ---------------------- | +| Gnosis | wstETH | 12,201 | 1 | 15,000 | 94 | 1 | 150 | +| Gnosis | sDAI | 17,500,552 | 1 | 24,000,000 | - | 0 | 1 | +| Gnosis | GNO | 94,532 | 1 | 140,000 | 15,252 | 1 | 20,000 | +| Gnosis | WETH | 2,762 | 1 | 3,600 | 1,811 | 1 | 2,400 | +| Gnosis | EURe | 13,537,147 | 27,000,000 | - | 12,194,512 | 1 | 22,500,000 | +| Gnosis | USDC.e | 7,805,609 | 1 | 12,000,000 | 6,246,190 | 1 | 11,000,000 | +| Gnosis | xDAI | 3,038,106 | 1 | 4,000,000 | 2,524,773 | 1 | 3,700,000 | +| Gnosis | GHO | 799,613 | 1 | 1,500,000 | 689,379 | 1 | 1,400,000 | + +## References + +- Implementation: [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol) +- Tests: [AaveV3Gnosis](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol) +- [Discussion](https://governance.aave.com/t/direct-to-aip-reinstate-supply-and-borrow-caps-on-aave-v3-gnosis-instance/23373) +- Snapshot: Direct to AIP + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.s.sol b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.s.sol new file mode 100644 index 000000000..069ffd182 --- /dev/null +++ b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.s.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol'; +import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol'; + +import {EthereumScript, GnosisScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol'; +import {AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106} from './AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol'; + +/** + * @dev Deploy Gnosis + * deploy-command: make deploy-ledger contract=src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.s.sol:DeployGnosis chain=gnosis + * verify-command: FOUNDRY_PROFILE=deploy npx catapulta-verify -b broadcast/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.s.sol/100/run-latest.json + */ +contract DeployGnosis is GnosisScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106).creationCode + ); + + // compose action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](1); + actions[0] = GovV3Helpers.buildAction(payload0); + + // register action at payloadsController + GovV3Helpers.createPayload(actions); + } +} + +/** + * @dev Create Proposal + * command: make deploy-ledger contract=src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); + + // compose actions for validation + { + IPayloadsControllerCore.ExecutionAction[] + memory actionsGnosis = new IPayloadsControllerCore.ExecutionAction[](1); + actionsGnosis[0] = GovV3Helpers.buildAction( + type(AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106).creationCode + ); + payloads[0] = GovV3Helpers.buildGnosisPayload(vm, actionsGnosis); + } + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovernanceV3Ethereum.VOTING_PORTAL_ETH_AVAX, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance.md' + ) + ); + } +} diff --git a/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/config.ts b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/config.ts new file mode 100644 index 000000000..874460711 --- /dev/null +++ b/src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/config.ts @@ -0,0 +1,31 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV3Gnosis'], + title: 'Reinstate Supply and Borrow Caps on Aave V3 Gnosis Instance', + shortName: 'ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance', + date: '20251106', + author: 'Chaos Labs', + discussion: + 'https://governance.aave.com/t/direct-to-aip-reinstate-supply-and-borrow-caps-on-aave-v3-gnosis-instance/23373', + snapshot: '', + votingNetwork: 'AVALANCHE', + }, + poolOptions: { + AaveV3Gnosis: { + configs: { + CAPS_UPDATE: [ + {asset: 'WETH', supplyCap: '3600', borrowCap: '2400'}, + {asset: 'wstETH', supplyCap: '150000', borrowCap: '150'}, + {asset: 'GNO', supplyCap: '140000', borrowCap: '20000'}, + {asset: 'WXDAI', supplyCap: '4000000', borrowCap: '3700000'}, + {asset: 'EURe', supplyCap: '', borrowCap: '22500000'}, + {asset: 'sDAI', supplyCap: '24000000', borrowCap: '1'}, + {asset: 'USDCe', supplyCap: '12000000', borrowCap: '11000000'}, + {asset: 'GHO', supplyCap: '1500000', borrowCap: '1400000'}, + ], + }, + cache: {blockNumber: 43004019}, + }, + }, +};