Skip to content

Commit e9a3492

Browse files
authored
feat: gho IR update (#5)
1 parent 3f3b77b commit e9a3492

2 files changed

Lines changed: 149 additions & 0 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
## Reserve changes
2+
3+
### Reserves altered
4+
5+
#### GHO ([0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f](https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f))
6+
7+
| description | value before | value after |
8+
| --- | --- | --- |
9+
| maxVariableBorrowRate | 3.25 % | 2.75 % |
10+
| baseVariableBorrowRate | 3.25 % | 2.75 % |
11+
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=0&variableRateSlope2=0&optimalUsageRatio=990000000000000000000000000&baseVariableBorrowRate=32500000000000000000000000&maxVariableBorrowRate=32500000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=0&variableRateSlope2=0&optimalUsageRatio=990000000000000000000000000&baseVariableBorrowRate=27500000000000000000000000&maxVariableBorrowRate=27500000000000000000000000) |
12+
13+
## Raw diff
14+
15+
```json
16+
{
17+
"strategies": {
18+
"0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f": {
19+
"baseVariableBorrowRate": {
20+
"from": "32500000000000000000000000",
21+
"to": "27500000000000000000000000"
22+
},
23+
"maxVariableBorrowRate": {
24+
"from": "32500000000000000000000000",
25+
"to": "27500000000000000000000000"
26+
}
27+
}
28+
},
29+
"raw": {
30+
"0x87593272c06f4fc49ec2942ebda0972d2f1ab521": {
31+
"label": null,
32+
"contract": null,
33+
"balanceDiff": null,
34+
"nonceDiff": null,
35+
"stateDiff": {
36+
"0x8464d39f2e013f742832d01b64507041c699fe53e2b530f6afd3f7345d1a56ff": {
37+
"previousValue": "0x00000000000000000000000000000000000000000000000000000000014526ac",
38+
"newValue": "0x00000000000000000000000000000000000000000000000000000000011326ac"
39+
}
40+
}
41+
},
42+
"0xae05cd22df81871bc7cc2a04becfb516bfe332c8": {
43+
"label": null,
44+
"contract": "lib/aave-umbrella/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy",
45+
"balanceDiff": null,
46+
"nonceDiff": null,
47+
"stateDiff": {
48+
"0xfd2dab4be6d07bba0109696859cf3ea9f610b92569d2a062e705af4b9c58ff17": {
49+
"previousValue": "0x000000000003a8b35a10686b388acc92000000000342247f06b4ece14305dcd7",
50+
"newValue": "0x00000000000318bff17b99906f4ddd9e0000000003422b46f7cfdd5f9c6dbb2b"
51+
},
52+
"0xfd2dab4be6d07bba0109696859cf3ea9f610b92569d2a062e705af4b9c58ff18": {
53+
"previousValue": "0x00000000001ae22487c1042af080000000000000034bef77c6ca8416910757b1",
54+
"newValue": "0x000000000016bf59fcb70386cb80000000000000034c21e15c205970a47de302"
55+
},
56+
"0xfd2dab4be6d07bba0109696859cf3ea9f610b92569d2a062e705af4b9c58ff19": {
57+
"previousValue": "0x00000000000000000000000069b72cff00000000000000000000000000000000",
58+
"newValue": "0x00000000000000000000000069baa15700000000000000000000000000000000"
59+
},
60+
"0xfd2dab4be6d07bba0109696859cf3ea9f610b92569d2a062e705af4b9c58ff1e": {
61+
"previousValue": "0x0000000000000000000000000000000000000000000000066144807d7489192e",
62+
"newValue": "0x00000000000000000000000000000000000000000000000cf055b1fb3144fa48"
63+
}
64+
}
65+
},
66+
"0xe6ec1f0ae6cd023bd0a9b4d0253bdc755103253c": {
67+
"label": null,
68+
"contract": null,
69+
"balanceDiff": null,
70+
"nonceDiff": null,
71+
"stateDiff": {
72+
"0x0000000000000000000000000000000000000000000000000000000000000005": {
73+
"previousValue": "0x000000000000000000000000000000000000000000000000000000000000002b",
74+
"newValue": "0x000000000000000000000000000000000000000000000000000000000000002c"
75+
}
76+
}
77+
}
78+
}
79+
}
80+
```
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
import {IDefaultInterestRateStrategyV2} from 'aave-v3-origin/contracts/interfaces/IDefaultInterestRateStrategyV2.sol';
5+
import {ProtocolV3HorizonTestBase} from 'tests/utils/ProtocolV3HorizonTestBase.sol';
6+
import {AaveV3EthereumHorizonAssets} from 'aave-address-book-latest/AaveV3EthereumHorizon.sol';
7+
8+
/**
9+
* @dev Test for GHO interest rate update via multisig transaction.
10+
* command: FOUNDRY_PROFILE=test forge test --match-contract AaveV3Horizon_GHO_IR_20260318_Test -vv
11+
*/
12+
contract AaveV3Horizon_GHO_IR_20260318_Test is ProtocolV3HorizonTestBase {
13+
address internal constant OPS_TARGET = 0x83Cb1B4af26EEf6463aC20AFbAC9c0e2E017202F;
14+
bytes internal constant OPS_DATA =
15+
hex'6aabe21d00000000000000000000000040d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000026ac000000000000000000000000000000000000000000000000000000000000011300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
16+
uint256 internal constant OPS_NONCE = 43;
17+
uint8 internal constant OPS_OPERATION = 0;
18+
19+
function setUp() public {
20+
vm.createSelectFork(vm.rpcUrl('mainnet'), 24684516);
21+
}
22+
23+
function _executeGHOIRUpdate() internal {
24+
_executeOpsMultisigTx({
25+
to: OPS_TARGET,
26+
data: OPS_DATA,
27+
operation: OPS_OPERATION,
28+
nonce: OPS_NONCE
29+
});
30+
}
31+
32+
/**
33+
* @dev Full test suite: snapshots, state diff, validations, e2e.
34+
*/
35+
function test_defaultProposalExecution() public {
36+
defaultTest_v3_3('AaveV3Horizon_GHO_IR_20260318', _pool(), _executeGHOIRUpdate);
37+
}
38+
39+
/**
40+
* @dev Custom before/after assertions for the GHO IR update.
41+
*/
42+
function test_ghoIRUpdate() public {
43+
IDefaultInterestRateStrategyV2.InterestRateData memory interestRateDataBefore = (
44+
IDefaultInterestRateStrategyV2(AaveV3EthereumHorizonAssets.GHO_INTEREST_RATE_STRATEGY)
45+
.getInterestRateDataBps(AaveV3EthereumHorizonAssets.GHO_UNDERLYING)
46+
);
47+
48+
assertEq(interestRateDataBefore.optimalUsageRatio, 99_00, 'Optimal usage ratio before');
49+
assertEq(
50+
interestRateDataBefore.baseVariableBorrowRate,
51+
3_25,
52+
'Base variable borrow rate before'
53+
);
54+
assertEq(interestRateDataBefore.variableRateSlope1, 0, 'Variable rate slope 1 before');
55+
assertEq(interestRateDataBefore.variableRateSlope2, 0, 'Variable rate slope 2 before');
56+
57+
_executeGHOIRUpdate();
58+
59+
IDefaultInterestRateStrategyV2.InterestRateData memory interestRateDataAfter = (
60+
IDefaultInterestRateStrategyV2(AaveV3EthereumHorizonAssets.GHO_INTEREST_RATE_STRATEGY)
61+
.getInterestRateDataBps(AaveV3EthereumHorizonAssets.GHO_UNDERLYING)
62+
);
63+
64+
assertEq(interestRateDataAfter.optimalUsageRatio, 99_00, 'Optimal usage ratio after');
65+
assertEq(interestRateDataAfter.baseVariableBorrowRate, 2_75, 'Base variable borrow rate after');
66+
assertEq(interestRateDataAfter.variableRateSlope1, 0, 'Variable rate slope 1 after');
67+
assertEq(interestRateDataAfter.variableRateSlope2, 0, 'Variable rate slope 2 after');
68+
}
69+
}

0 commit comments

Comments
 (0)