generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 38
feat: gnosis cap reinstate #888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8b99428
feat: gnosis cap reinstate
brotherlymite 35b45aa
chore: bump aave helpers for e2e to work
brotherlymite 765dbac
chore: rerun diff
brotherlymite 3613d5c
chore: remove todo link
brotherlymite e0d892f
fix: recompile based on evm version
brotherlymite cc2ae44
fix: table name
brotherlymite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
209 changes: 209 additions & 0 deletions
209
...veV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_after.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule aave-helpers
updated
3 files
| +1 −1 | foundry.lock | |
| +1 −1 | lib/aave-address-book | |
| +1 −1 | src/CommonTestBase.sol |
63 changes: 63 additions & 0 deletions
63
...osisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
TepNik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }); | ||
| 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; | ||
| } | ||
| } | ||
33 changes: 33 additions & 0 deletions
33
...isInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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) | ||
| ); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.