Skip to content
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

Add new gho-aave-steward on prime instance #615

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

LucasWongC
Copy link
Contributor

A new GhoAaveSteward is to be deployed, with the Prime configuration:

Owner: 0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A

Addresses Provider: 0xcfBf336fe147D643B9Cb705648500e101504B16d

Pool Data Provider: 0x08795CFE08C7a81dCDFf482BbAAF474B240f31cD

Gho Token: 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f

Risk Council: 0x8513e6F37dBc52De87b166980Fa3F50639694B60

BorrowRateConfig:

  • UOptimal Max Change: 500
  • Base Variable Rate Max Change: 500
  • Slope 1 Max Change: 500
  • Slope 2 Max Change: 500

Then, the GhoAaveSteward is to be granted the following permissions:

GhoAaveSteward

  • RiskAdmin in Aave V3 Ethereum Prime Pool

LucasWongC and others added 2 commits February 19, 2025 04:44
Copy link

github-actions bot commented Feb 20, 2025

🌈Test Results Compiling 324 files with Solc 0.8.22 Solc 0.8.22 finished in 158.81s Compiler run successful with warnings: Warning (2018): Function state mutability can be restricted to pure --> lib/aave-helpers/src/ProtocolV2TestBase.sol:664:3: | 664 | function _logReserveConfig(ReserveConfig memory config) internal view { | ^ (Relevant source part starts here and spans across multiple lines).

Ran 5 tests for src/20250129_AaveV3EthereumLido_ExtendGHOStewardOnAavePrimeInstance/AaveV3EthereumLido_ExtendGHOStewardOnAavePrimeInstance_20250129.t.sol:AaveV3EthereumLido_ExtendGHOStewardOnAavePrimeInstance_20250129_Test
[PASS] testValidate() (gas: 163258)
[PASS] test_ghoAaveSteward_revertsChangeOverMax() (gas: 163317)
[PASS] test_ghoAaveSteward_updateGhoBorrowCap() (gas: 216272)
[PASS] test_ghoAaveSteward_updateGhoBorrowRate() (gas: 377624)
[PASS] test_ghoAaveSteward_updateGhoSupplyCap() (gas: 212041)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 413.12ms (14.51ms CPU time)

Ran 1 test suite in 414.59ms (413.12ms CPU time): 5 tests passed, 0 failed, 0 skipped (5 total tests)

brotherlymite
brotherlymite previously approved these changes Feb 20, 2025
Comment on lines +89 to +138
function test_ghoAaveSteward_updateGhoBorrowCap() public {
executePayload(vm, address(proposal));

uint256 currentBorrowCap = _getGhoBorrowCap();
uint256 newBorrowCap = currentBorrowCap + 1;
vm.startPrank(RISK_COUNCIL);
IGhoAaveSteward(proposal.NEW_GHO_AAVE_STEWARD()).updateGhoBorrowCap(newBorrowCap);
assertEq(_getGhoBorrowCap(), newBorrowCap);
}

function test_ghoAaveSteward_updateGhoSupplyCap() public {
uint256 configValue = 830948836238514615306439858845646848;
vm.mockCall(
address(AaveV3EthereumLido.POOL),
abi.encodeWithSelector(AaveV3EthereumLido.POOL.getConfiguration.selector),
abi.encode(configValue)
);

uint256 currentSupplyCap = _getGhoSupplyCap();
assertEq(currentSupplyCap, 10);
uint256 newSupplyCap = currentSupplyCap + 1;

executePayload(vm, address(proposal));

IGhoAaveSteward steward = IGhoAaveSteward(proposal.NEW_GHO_AAVE_STEWARD());

vm.startPrank(RISK_COUNCIL);
steward.updateGhoSupplyCap(newSupplyCap);
vm.stopPrank();

vm.clearMockedCalls();

assertEq(_getGhoSupplyCap(), newSupplyCap);
}

function test_ghoAaveSteward_revertsChangeOverMax() public {
executePayload(vm, address(proposal));

uint256 currentSupplyCap = _getGhoSupplyCap();
assertEq(currentSupplyCap, 20000000);
uint256 newSupplyCap = 2 * currentSupplyCap + 1;

IGhoAaveSteward steward = IGhoAaveSteward(proposal.NEW_GHO_AAVE_STEWARD());

// Can't update supply cap even by 1 since it's 0, and 100% of 0 is 0
vm.expectRevert('INVALID_SUPPLY_CAP_UPDATE');
vm.startPrank(RISK_COUNCIL);
steward.updateGhoSupplyCap(newSupplyCap);
vm.stopPrank();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On forum there's nothing about ability for supply/borrow cap changes. However contract can change them and this possibility is not restricted in any way, the only limit I see is 100%. Risk council can change on any amount less than 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants