Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Reserve changes

### Reserves altered

#### USTB ([0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e](https://etherscan.io/address/0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 6,000,000 USTB | 8,000,000 USTB |


## Raw diff

```json
{
"reserves": {
"0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e": {
"supplyCap": {
"from": 6000000,
"to": 8000000
}
}
},
"raw": {
"0xae05cd22df81871bc7cc2a04becfb516bfe332c8": {
"label": null,
"contract": "lib/aave-umbrella/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": {
"0x11567aab4cd72d4842d11c42514ff879ac1d304b8bb2969ce8bddb1f43474e61": {
"previousValue": "0x100000000000000000000000000005b8d8000000000000000106283c23282260",
"newValue": "0x100000000000000000000000000007a120000000000000000106283c23282260"
}
}
},
"0xe6ec1f0ae6cd023bd0a9b4d0253bdc755103253c": {
"label": null,
"contract": null,
"balanceDiff": null,
"nonceDiff": null,
"stateDiff": {
"0x0000000000000000000000000000000000000000000000000000000000000005": {
"previousValue": "0x0000000000000000000000000000000000000000000000000000000000000031",
"newValue": "0x0000000000000000000000000000000000000000000000000000000000000032"
}
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IPoolDataProvider} from 'aave-v3-origin/contracts/interfaces/IPoolDataProvider.sol';
import {ProtocolV3HorizonTestBase, ReserveConfig} from 'tests/utils/ProtocolV3HorizonTestBase.sol';
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book-latest/AaveV3EthereumHorizon.sol';
import {AaveHorizonGovV3Helpers} from 'src/utils/AaveHorizonGovV3Helpers.sol';

/**
* @dev Test for GHO caps update via multisig transaction.
* command: FOUNDRY_PROFILE=test forge test --match-contract AaveV3Horizon_USTBSupplyCap_20260514 -vv
*/
contract AaveV3Horizon_USTBSupplyCap_20260514 is ProtocolV3HorizonTestBase {
address internal constant OPS_TARGET = 0x83Cb1B4af26EEf6463aC20AFbAC9c0e2E017202F;
// from Safe UI
bytes internal constant OPS_DATA =
hex'571f03e500000000000000000000000043415eb6ff9db7e26a15b704e7a3edce97d31c4e00000000000000000000000000000000000000000000000000000000007a1200';
uint256 internal constant OPS_NONCE = 49;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 25095755);
}

/**
* @dev Full test suite: snapshots, state diff, validations, e2e.
*/
function test_defaultProposalExecution() public {
defaultTest_v3_3('AaveV3Horizon_USTBSupplyCap_20260514', _pool(), _executeUSTBSupplyCapUpdate);
}

/**
* @dev Custom before/after assertions for the USTB supply cap change.
*/
function test_ustbSupplyCapChange() public {
(, uint256 supplyCapBefore) = (
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
AaveV3EthereumHorizonAssets.USTB_UNDERLYING
)
);

assertEq(supplyCapBefore, 6_000_000, 'Supply cap before');

_executeUSTBSupplyCapUpdate();

(, uint256 supplyCapAfter) = (
IPoolDataProvider(AaveV3EthereumHorizon.AAVE_PROTOCOL_DATA_PROVIDER).getReserveCaps(
AaveV3EthereumHorizonAssets.USTB_UNDERLYING
)
);

assertEq(supplyCapAfter, 8_000_000, 'Supply cap after');
}

function test_calldata() public pure {
AaveHorizonGovV3Helpers.Action memory action = AaveHorizonGovV3Helpers.Action({
to: address(AaveV3EthereumHorizon.POOL_CONFIGURATOR),
data: abi.encodeCall(
AaveV3EthereumHorizon.POOL_CONFIGURATOR.setSupplyCap,
(AaveV3EthereumHorizonAssets.USTB_UNDERLYING, 8_000_000)
)
});
(address to, bytes memory data, uint8 operation) = AaveHorizonGovV3Helpers
.createOpsMultisigCalldata(action);
assertEq(to, OPS_TARGET, 'ops target mismatch');
assertEq(data, OPS_DATA, 'ops calldata mismatch');
assertEq(operation, 0, 'ops operation mismatch');
}

function _executeUSTBSupplyCapUpdate() internal {
_executeOpsMultisigTx({to: OPS_TARGET, data: OPS_DATA, operation: 0, nonce: OPS_NONCE});
}
}
Loading