Skip to content

Commit 09f2ecf

Browse files
feat: gnosis cap reinstate (#888)
* feat: gnosis cap reinstate * chore: bump aave helpers for e2e to work * chore: rerun diff * chore: remove todo link * fix: recompile based on evm version * fix: table name
1 parent e0b4484 commit 09f2ecf

9 files changed

+453
-3
lines changed
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
## Reserve changes
2+
3+
### Reserve altered
4+
5+
#### USDC.e ([0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0](https://gnosisscan.io/address/0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0))
6+
7+
| description | value before | value after |
8+
| --- | --- | --- |
9+
| supplyCap | 1 USDC.e | 12,000,000 USDC.e |
10+
| borrowCap | 1 USDC.e | 11,000,000 USDC.e |
11+
12+
13+
#### WETH ([0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1](https://gnosisscan.io/address/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1))
14+
15+
| description | value before | value after |
16+
| --- | --- | --- |
17+
| supplyCap | 1 WETH | 3,600 WETH |
18+
| borrowCap | 1 WETH | 2,400 WETH |
19+
20+
21+
#### wstETH ([0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6](https://gnosisscan.io/address/0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6))
22+
23+
| description | value before | value after |
24+
| --- | --- | --- |
25+
| supplyCap | 1 wstETH | 15,000 wstETH |
26+
| borrowCap | 1 wstETH | 150 wstETH |
27+
28+
29+
#### GNO ([0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb](https://gnosisscan.io/address/0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb))
30+
31+
| description | value before | value after |
32+
| --- | --- | --- |
33+
| supplyCap | 1 GNO | 140,000 GNO |
34+
| borrowCap | 1 GNO | 20,000 GNO |
35+
36+
37+
#### sDAI ([0xaf204776c7245bF4147c2612BF6e5972Ee483701](https://gnosisscan.io/address/0xaf204776c7245bF4147c2612BF6e5972Ee483701))
38+
39+
| description | value before | value after |
40+
| --- | --- | --- |
41+
| supplyCap | 1 sDAI | 24,000,000 sDAI |
42+
| borrowCap | 0 sDAI | 1 sDAI |
43+
44+
45+
#### EURe ([0xcB444e90D8198415266c6a2724b7900fb12FC56E](https://gnosisscan.io/address/0xcB444e90D8198415266c6a2724b7900fb12FC56E))
46+
47+
| description | value before | value after |
48+
| --- | --- | --- |
49+
| borrowCap | 1 EURe | 22,500,000 EURe |
50+
51+
52+
#### WXDAI ([0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d](https://gnosisscan.io/address/0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d))
53+
54+
| description | value before | value after |
55+
| --- | --- | --- |
56+
| supplyCap | 1 WXDAI | 4,000,000 WXDAI |
57+
| borrowCap | 1 WXDAI | 3,700,000 WXDAI |
58+
59+
60+
#### GHO ([0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73](https://gnosisscan.io/address/0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73))
61+
62+
| description | value before | value after |
63+
| --- | --- | --- |
64+
| supplyCap | 1 GHO | 1,500,000 GHO |
65+
| borrowCap | 1 GHO | 1,400,000 GHO |
66+
67+
68+
## Raw diff
69+
70+
```json
71+
{
72+
"reserves": {
73+
"0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0": {
74+
"borrowCap": {
75+
"from": 1,
76+
"to": 11000000
77+
},
78+
"supplyCap": {
79+
"from": 1,
80+
"to": 12000000
81+
}
82+
},
83+
"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1": {
84+
"borrowCap": {
85+
"from": 1,
86+
"to": 2400
87+
},
88+
"supplyCap": {
89+
"from": 1,
90+
"to": 3600
91+
}
92+
},
93+
"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6": {
94+
"borrowCap": {
95+
"from": 1,
96+
"to": 150
97+
},
98+
"supplyCap": {
99+
"from": 1,
100+
"to": 15000
101+
}
102+
},
103+
"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb": {
104+
"borrowCap": {
105+
"from": 1,
106+
"to": 20000
107+
},
108+
"supplyCap": {
109+
"from": 1,
110+
"to": 140000
111+
}
112+
},
113+
"0xaf204776c7245bF4147c2612BF6e5972Ee483701": {
114+
"borrowCap": {
115+
"from": 0,
116+
"to": 1
117+
},
118+
"supplyCap": {
119+
"from": 1,
120+
"to": 24000000
121+
}
122+
},
123+
"0xcB444e90D8198415266c6a2724b7900fb12FC56E": {
124+
"borrowCap": {
125+
"from": 1,
126+
"to": 22500000
127+
}
128+
},
129+
"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d": {
130+
"borrowCap": {
131+
"from": 1,
132+
"to": 3700000
133+
},
134+
"supplyCap": {
135+
"from": 1,
136+
"to": 4000000
137+
}
138+
},
139+
"0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73": {
140+
"borrowCap": {
141+
"from": 1,
142+
"to": 1400000
143+
},
144+
"supplyCap": {
145+
"from": 1,
146+
"to": 1500000
147+
}
148+
}
149+
},
150+
"raw": {
151+
"0x9a1f491b86d09fc1484b5fab10041b189b60756b": {
152+
"label": "GovernanceV3Gnosis.PAYLOADS_CONTROLLER",
153+
"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",
154+
"balanceDiff": null,
155+
"nonceDiff": null,
156+
"stateDiff": {
157+
"0xfc869d08d1790d4602743c5b6e4adb33c74c1d0d7c8c47359779d859193dcb05": {
158+
"previousValue": "0x00690c5016000000000002000000000000000000000000000000000000000000",
159+
"newValue": "0x00690c5016000000000003000000000000000000000000000000000000000000"
160+
},
161+
"0xfc869d08d1790d4602743c5b6e4adb33c74c1d0d7c8c47359779d859193dcb06": {
162+
"previousValue": "0x000000000000000000093a80000000000000693a749700000000000000000000",
163+
"newValue": "0x000000000000000000093a80000000000000693a7497000000000000690c5017"
164+
}
165+
}
166+
},
167+
"0xb50201558b00496a145fe76f7424749556e326d8": {
168+
"label": "AaveV3Gnosis.POOL",
169+
"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",
170+
"balanceDiff": null,
171+
"nonceDiff": null,
172+
"stateDiff": {
173+
"0x0fc8503df98d2edfc22ff983235893ec99bc6e901ad0d1a5f6fe097f182912c8": {
174+
"previousValue": "0x100000000000000000000003e800000000100000000103e8a50629041e781d4c",
175+
"newValue": "0x100000000000000000000003e8000b71b00000a7d8c003e8a50629041e781d4c"
176+
},
177+
"0x12df0d1b66951018857a1fdeef40de02520a2969b89b7c09c2f52c5e04f1c6d4": {
178+
"previousValue": "0x100000000000000000000000000019bfcc000000000103e88512000000000000",
179+
"newValue": "0x100000000000000000000000000019bfcc00015752a003e88512000000000000"
180+
},
181+
"0x8afb1de31eb6f791ce338dc0fcf3aabfcff3e4cbb1f6b2d44d14c58685cac66b": {
182+
"previousValue": "0x100000000000000000000003e800000000100000000107d085122af814b412c0",
183+
"newValue": "0x100000000000000000000003e80000222e0000004e2007d085122af814b412c0"
184+
},
185+
"0x92f844314898b12448ab6e2a1cca9eec63a65c2047adeeaec3e6245d83e31c27": {
186+
"previousValue": "0x100000000000000000000007d000000000100000000003e8811229041e781d4c",
187+
"newValue": "0x100000000000000000000007d00016e360000000000103e8811229041e781d4c"
188+
},
189+
"0xd65dfe8da0b5a761df1b1a8535b7c5e4a8bdd40bd305a11fa569ad02c896b907": {
190+
"previousValue": "0x1000000000000000000000000000000000100000000103e88512000000000000",
191+
"newValue": "0x1000000000000000000000000000016e360000155cc003e88512000000000000"
192+
},
193+
"0xdc3a94d7e87a167cb82c63a89cbd0c50a0f30977be246f917292fdacf90d74dd": {
194+
"previousValue": "0x100000000000000000000007d000000000100000000109c4a51229041e14189c",
195+
"newValue": "0x100000000000000000000007d00003d090000038752009c4a51229041e14189c"
196+
},
197+
"0xee00b8c53ccd9d92afea2ade430b34dbda7a33b87f08ad29d280d4683a389d07": {
198+
"previousValue": "0x100000000000000000000103e800000000100000000101f4851229681edc1d4c",
199+
"newValue": "0x100000000000000000000103e8000003a9800000009601f4851229681edc1d4c"
200+
},
201+
"0xf377efb019ad32c4e8b988eeeb3b6ac930668f710207fdcf6b231ce4ccfa238a": {
202+
"previousValue": "0x100000000000000000000103e800000000100000000105dc85122968206c1f40",
203+
"newValue": "0x100000000000000000000103e8000000e1000000096005dc85122968206c1f40"
204+
}
205+
}
206+
}
207+
}
208+
}
209+
```

foundry.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"lib/aave-helpers": {
33
"branch": {
44
"name": "main",
5-
"rev": "0be4c07fb3475db44f6fa3c6fb8d32eaa130b9cc"
5+
"rev": "7eec1e60b71e0904d7f1afa5743965b9524bf30a"
66
}
77
}
88
}

foundry.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ script = 'scripts'
55
solc = '0.8.27'
66
optimizer = true
77
optimizer_runs = 200
8-
out = 'out'
8+
out = 'out/shanghai'
99
bytecode_hash = 'none'
1010
libs = ['lib']
1111
remappings = []
@@ -26,6 +26,7 @@ optimizer = true
2626
optimizer_runs = 200
2727
fs_permissions = [{ access = "write", path = "./reports" }]
2828
ffi = true
29+
out = 'out/shanghai'
2930
evm_version = 'shanghai'
3031
cache_path = 'cache/shanghai'
3132

@@ -37,14 +38,17 @@ mode = '3'
3738
zksolc = '1.5.13'
3839

3940
[profile.test]
41+
out = 'out/cancun'
4042
evm_version = 'cancun'
4143
cache_path = 'cache/cancun'
4244

4345
[profile.deploy]
46+
out = 'out/shanghai'
4447
evm_version = 'shanghai'
4548
cache_path = 'cache/shanghai'
4649

4750
[profile.linea]
51+
out = 'out/london'
4852
evm_version = 'london'
4953
cache_path = 'cache/london'
5054

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol';
5+
import {AaveV3PayloadGnosis} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadGnosis.sol';
6+
import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol';
7+
import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
8+
9+
/**
10+
* @title Reinstate Supply and Borrow Caps on Aave V3 Gnosis Instance
11+
* @author Chaos Labs
12+
* - Discussion: https://governance.aave.com/t/direct-to-aip-reinstate-supply-and-borrow-caps-on-aave-v3-gnosis-instance/23373
13+
*/
14+
contract AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106 is
15+
AaveV3PayloadGnosis
16+
{
17+
function capsUpdates() public pure override returns (IAaveV3ConfigEngine.CapsUpdate[] memory) {
18+
IAaveV3ConfigEngine.CapsUpdate[] memory capsUpdate = new IAaveV3ConfigEngine.CapsUpdate[](8);
19+
20+
capsUpdate[0] = IAaveV3ConfigEngine.CapsUpdate({
21+
asset: AaveV3GnosisAssets.WETH_UNDERLYING,
22+
supplyCap: 3_600,
23+
borrowCap: 2_400
24+
});
25+
capsUpdate[1] = IAaveV3ConfigEngine.CapsUpdate({
26+
asset: AaveV3GnosisAssets.wstETH_UNDERLYING,
27+
supplyCap: 15_000,
28+
borrowCap: 150
29+
});
30+
capsUpdate[2] = IAaveV3ConfigEngine.CapsUpdate({
31+
asset: AaveV3GnosisAssets.GNO_UNDERLYING,
32+
supplyCap: 140_000,
33+
borrowCap: 20_000
34+
});
35+
capsUpdate[3] = IAaveV3ConfigEngine.CapsUpdate({
36+
asset: AaveV3GnosisAssets.WXDAI_UNDERLYING,
37+
supplyCap: 4_000_000,
38+
borrowCap: 3_700_000
39+
});
40+
capsUpdate[4] = IAaveV3ConfigEngine.CapsUpdate({
41+
asset: AaveV3GnosisAssets.EURe_UNDERLYING,
42+
supplyCap: EngineFlags.KEEP_CURRENT,
43+
borrowCap: 22_500_000
44+
});
45+
capsUpdate[5] = IAaveV3ConfigEngine.CapsUpdate({
46+
asset: AaveV3GnosisAssets.sDAI_UNDERLYING,
47+
supplyCap: 24_000_000,
48+
borrowCap: 1
49+
});
50+
capsUpdate[6] = IAaveV3ConfigEngine.CapsUpdate({
51+
asset: AaveV3GnosisAssets.USDCe_UNDERLYING,
52+
supplyCap: 12_000_000,
53+
borrowCap: 11_000_000
54+
});
55+
capsUpdate[7] = IAaveV3ConfigEngine.CapsUpdate({
56+
asset: AaveV3GnosisAssets.GHO_UNDERLYING,
57+
supplyCap: 1_500_000,
58+
borrowCap: 1_400_000
59+
});
60+
61+
return capsUpdate;
62+
}
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol';
5+
6+
import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol';
7+
import {AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106} from './AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.sol';
8+
9+
/**
10+
* @dev Test for AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106
11+
* command: FOUNDRY_PROFILE=test forge test --match-path=src/20251106_AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance/AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106.t.sol -vv
12+
*/
13+
contract AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106_Test is
14+
ProtocolV3TestBase
15+
{
16+
AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106 internal proposal;
17+
18+
function setUp() public {
19+
vm.createSelectFork(vm.rpcUrl('gnosis'), 43004019);
20+
proposal = new AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106();
21+
}
22+
23+
/**
24+
* @dev executes the generic test suite including e2e and config snapshots
25+
*/
26+
function test_defaultProposalExecution() public {
27+
defaultTest(
28+
'AaveV3Gnosis_ReinstateSupplyAndBorrowCapsOnAaveV3GnosisInstance_20251106',
29+
AaveV3Gnosis.POOL,
30+
address(proposal)
31+
);
32+
}
33+
}

0 commit comments

Comments
 (0)