Skip to content

Commit 495bcd6

Browse files
committed
feat: supplyCap updates
1 parent f5290a0 commit 495bcd6

2 files changed

Lines changed: 218 additions & 0 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
## Reserve changes
2+
3+
### Reserve altered
4+
5+
#### USCC ([0x14d60E7FDC0D71d8611742720E4C50E7a974020c](https://etherscan.io/address/0x14d60E7FDC0D71d8611742720E4C50E7a974020c))
6+
7+
| description | value before | value after |
8+
| --- | --- | --- |
9+
| supplyCap | 29,000,000 USCC | 15,000,000 USCC |
10+
11+
12+
#### GHO ([0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f](https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f))
13+
14+
| description | value before | value after |
15+
| --- | --- | --- |
16+
| supplyCap | 45,000,000 GHO | 35,000,000 GHO |
17+
18+
19+
#### USTB ([0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e](https://etherscan.io/address/0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e))
20+
21+
| description | value before | value after |
22+
| --- | --- | --- |
23+
| supplyCap | 1,800,000 USTB | 3,600,000 USTB |
24+
25+
26+
#### JAAA ([0x5a0F93D040De44e78F251b03c43be9CF317Dcf64](https://etherscan.io/address/0x5a0F93D040De44e78F251b03c43be9CF317Dcf64))
27+
28+
| description | value before | value after |
29+
| --- | --- | --- |
30+
| supplyCap | 40,000,000 JAAA | 10,000,000 JAAA |
31+
32+
33+
## Raw diff
34+
35+
```json
36+
{
37+
"reserves": {
38+
"0x14d60E7FDC0D71d8611742720E4C50E7a974020c": {
39+
"supplyCap": {
40+
"from": 29000000,
41+
"to": 15000000
42+
}
43+
},
44+
"0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f": {
45+
"supplyCap": {
46+
"from": 45000000,
47+
"to": 35000000
48+
}
49+
},
50+
"0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e": {
51+
"supplyCap": {
52+
"from": 1800000,
53+
"to": 3600000
54+
}
55+
},
56+
"0x5a0F93D040De44e78F251b03c43be9CF317Dcf64": {
57+
"supplyCap": {
58+
"from": 40000000,
59+
"to": 10000000
60+
}
61+
}
62+
},
63+
"raw": {
64+
"0xae05cd22df81871bc7cc2a04becfb516bfe332c8": {
65+
"label": null,
66+
"contract": "lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy",
67+
"balanceDiff": null,
68+
"nonceDiff": null,
69+
"stateDiff": {
70+
"0x11567aab4cd72d4842d11c42514ff879ac1d304b8bb2969ce8bddb1f43474e61": {
71+
"previousValue": "0x100000000000000000000000000001b774000000000000000106283c23282260",
72+
"newValue": "0x1000000000000000000000000000036ee8000000000000000106283c23282260"
73+
},
74+
"0x3e3cd529c7fd49079eabd02ec66b1f8c8d0cba5b926a12093d4fd96d7317f0c6": {
75+
"previousValue": "0x10000000000000000000000000002625a0000000000000000106290421981fa4",
76+
"newValue": "0x1000000000000000000000000000098968000000000000000106290421981fa4"
77+
},
78+
"0xd5ce75cb182c08131629ee08dd3321e186ca2940f202ad7ebc1489790f40d199": {
79+
"previousValue": "0x10000000000000000000000000001ba814000000000000000106290422602134",
80+
"newValue": "0x10000000000000000000000000000e4e1c000000000000000106290422602134"
81+
},
82+
"0xfd2dab4be6d07bba0109696859cf3ea9f610b92569d2a062e705af4b9c58ff16": {
83+
"previousValue": "0x10000000000000000000000000002aea540002160ec003e80512000000000000",
84+
"newValue": "0x10000000000000000000000000002160ec0002160ec003e80512000000000000"
85+
}
86+
}
87+
},
88+
"0xe6ec1f0ae6cd023bd0a9b4d0253bdc755103253c": {
89+
"label": null,
90+
"contract": null,
91+
"balanceDiff": null,
92+
"nonceDiff": null,
93+
"stateDiff": {
94+
"0x0000000000000000000000000000000000000000000000000000000000000005": {
95+
"previousValue": "0x000000000000000000000000000000000000000000000000000000000000002c",
96+
"newValue": "0x000000000000000000000000000000000000000000000000000000000000002d"
97+
}
98+
}
99+
}
100+
}
101+
}
102+
```
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {IPoolDataProvider} from 'aave-v3-origin/contracts/interfaces/IPoolDataProvider.sol';
5+
import {ProtocolV3HorizonTestBase, ReserveConfig} from 'tests/utils/ProtocolV3HorizonTestBase.sol';
6+
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book-latest/AaveV3EthereumHorizon.sol';
7+
8+
/**
9+
* @dev Test for GHO caps update via multisig transaction.
10+
* command: FOUNDRY_PROFILE=test forge test --match-contract AaveV3Horizon_MultiSupplyCaps_20260330 -vv
11+
*/
12+
contract AaveV3Horizon_MultiSupplyCaps_20260330 is ProtocolV3HorizonTestBase {
13+
address internal constant OPS_TARGET = 0x9641d764fc13c8B624c04430C7356C1C7C8102e2;
14+
bytes internal constant OPS_DATA =
15+
hex'8d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002640083cb1b4af26eef6463ac20afbac9c0e2e017202f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044571f03e500000000000000000000000014d60e7fdc0d71d8611742720e4c50e7a974020c0000000000000000000000000000000000000000000000000000000000e4e1c00083cb1b4af26eef6463ac20afbac9c0e2e017202f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044571f03e500000000000000000000000040d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f0000000000000000000000000000000000000000000000000000000002160ec00083cb1b4af26eef6463ac20afbac9c0e2e017202f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044571f03e500000000000000000000000043415eb6ff9db7e26a15b704e7a3edce97d31c4e000000000000000000000000000000000000000000000000000000000036ee800083cb1b4af26eef6463ac20afbac9c0e2e017202f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044571f03e50000000000000000000000005a0f93d040de44e78f251b03c43be9cf317dcf64000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000';
16+
uint256 internal constant OPS_NONCE = 44;
17+
18+
function setUp() public {
19+
vm.createSelectFork(vm.rpcUrl('mainnet'), 24770689);
20+
}
21+
22+
function _executeMultiSupplyCapsUpdate() internal {
23+
_executeOpsMultisigTx({to: OPS_TARGET, data: OPS_DATA, operation: 1, nonce: OPS_NONCE});
24+
}
25+
26+
/**
27+
* @dev Full test suite: snapshots, state diff, validations, e2e.
28+
*/
29+
function test_defaultProposalExecution() public {
30+
defaultTest_v3_3(
31+
'AaveV3Horizon_MultiSupplyCaps_20260330',
32+
_pool(),
33+
_executeMultiSupplyCapsUpdate
34+
);
35+
}
36+
37+
/**
38+
* @dev Custom before/after assertions for the GHO caps change.
39+
*/
40+
function test_GhoSupplyCapsChange() public {
41+
(, uint256 supplyCapBefore) = (
42+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
43+
AaveV3EthereumHorizonAssets.GHO_UNDERLYING
44+
)
45+
);
46+
assertEq(supplyCapBefore, 45_000_000, 'Supply cap before');
47+
_executeMultiSupplyCapsUpdate();
48+
49+
(, uint256 supplyCapAfter) = (
50+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
51+
AaveV3EthereumHorizonAssets.GHO_UNDERLYING
52+
)
53+
);
54+
assertEq(supplyCapAfter, 35_000_000, 'Supply cap after');
55+
}
56+
57+
/**
58+
* @dev Custom before/after assertions for the JAAA caps change.
59+
*/
60+
function test_JAAASupplyCapsChange() public {
61+
(, uint256 supplyCapBefore) = (
62+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
63+
AaveV3EthereumHorizonAssets.JAAA_UNDERLYING
64+
)
65+
);
66+
assertEq(supplyCapBefore, 40_000_000, 'Supply cap before');
67+
_executeMultiSupplyCapsUpdate();
68+
69+
(, uint256 supplyCapAfter) = (
70+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
71+
AaveV3EthereumHorizonAssets.JAAA_UNDERLYING
72+
)
73+
);
74+
assertEq(supplyCapAfter, 10_000_000, 'Supply cap after');
75+
}
76+
77+
/**
78+
* @dev Custom before/after assertions for the USCC caps change.
79+
*/
80+
function test_USCCSupplyCapsChange() public {
81+
(, uint256 supplyCapBefore) = (
82+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
83+
AaveV3EthereumHorizonAssets.USCC_UNDERLYING
84+
)
85+
);
86+
assertEq(supplyCapBefore, 29_000_000, 'Supply cap before');
87+
_executeMultiSupplyCapsUpdate();
88+
89+
(, uint256 supplyCapAfter) = (
90+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
91+
AaveV3EthereumHorizonAssets.USCC_UNDERLYING
92+
)
93+
);
94+
assertEq(supplyCapAfter, 15_000_000, 'Supply cap after');
95+
}
96+
97+
/**
98+
* @dev Custom before/after assertions for the USTB caps change.
99+
*/
100+
function test_USTBSupplyCapsChange() public {
101+
(, uint256 supplyCapBefore) = (
102+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
103+
AaveV3EthereumHorizonAssets.USTB_UNDERLYING
104+
)
105+
);
106+
assertEq(supplyCapBefore, 1_800_000, 'Supply cap before');
107+
_executeMultiSupplyCapsUpdate();
108+
109+
(, uint256 supplyCapAfter) = (
110+
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
111+
AaveV3EthereumHorizonAssets.USTB_UNDERLYING
112+
)
113+
);
114+
assertEq(supplyCapAfter, 3_600_000, 'Supply cap after');
115+
}
116+
}

0 commit comments

Comments
 (0)