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

Aavechan/gho borrow rate increase #236

Merged
merged 8 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions .assets/8b50edb3973992d1e7ab80f66ab3d34635608456.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Reserve changes

### Reserves altered

#### GHO ([0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f](https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f))

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0x3a4D5316ec79622686a19f69CE546997cC8e8514](https://etherscan.io/address/0x3a4D5316ec79622686a19f69CE546997cC8e8514) | [0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f](https://etherscan.io/address/0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f) |
| baseVariableBorrowRate | 7.22 % | 7.92 % |
| interestRate | ![before](/.assets/4986872b45a9cd8b31a38113050f5481468cb333.svg) | ![after](/.assets/8b50edb3973992d1e7ab80f66ab3d34635608456.svg) |

## Raw diff

```json
{
"reserves": {
"0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f": {
"interestRateStrategy": {
"from": "0x3a4D5316ec79622686a19f69CE546997cC8e8514",
"to": "0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f"
}
}
},
"strategies": {
"0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f": {
"from": null,
"to": {
"baseStableBorrowRate": 0,
"baseVariableBorrowRate": "79200000000000000000000000",
"maxExcessStableToTotalDebtRatio": 0,
"maxExcessUsageRatio": 0,
"optimalStableToTotalDebtRatio": 0,
"optimalUsageRatio": 0,
"stableRateSlope1": 0,
"stableRateSlope2": 0,
"variableRateSlope1": 0,
"variableRateSlope2": 0
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';

import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

/**
* @title GHOBorrowRateIncrease
* @author Aave Chan Initiative
* - Snapshot: No snapshot for Direct-to-AIP
* - Discussion: https://governance.aave.com/t/arfc-increase-gho-borrow-rate-08-03-2024/16885
*/
contract AaveV3Ethereum_GHOBorrowRateIncrease_20240308 is IProposalGenericExecutor {
address internal immutable INTEREST_RATE_STRATEGY;

constructor(address interestRateStrategy) {
INTEREST_RATE_STRATEGY = interestRateStrategy;
}

function execute() external {
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveInterestRateStrategyAddress(
AaveV3EthereumAssets.GHO_UNDERLYING,
INTEREST_RATE_STRATEGY
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_GHOBorrowRateIncrease_20240308} from './AaveV3Ethereum_GHOBorrowRateIncrease_20240308.sol';
import {GhoInterestRateStrategy} from './GhoInterestRateStrategy.sol';

/**
* @dev Test for AaveV3Ethereum_GHOBorrowRateIncrease_20240308
* command: make test-contract filter=AaveV3Ethereum_GHOBorrowRateIncrease_20240308
*/
contract AaveV3Ethereum_GHOBorrowRateIncrease_20240308_Test is ProtocolV3TestBase {
GhoInterestRateStrategy internal interestRateStrategy;
AaveV3Ethereum_GHOBorrowRateIncrease_20240308 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 19391086);
interestRateStrategy = new GhoInterestRateStrategy();
proposal = new AaveV3Ethereum_GHOBorrowRateIncrease_20240308(address(interestRateStrategy));
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_GHOBorrowRateIncrease_20240308',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "GHOBorrowRateIncrease"
Rozengarden marked this conversation as resolved.
Show resolved Hide resolved
author: "Aave Chan Initiative"
discussions: "https://governance.aave.com/t/arfc-increase-gho-borrow-rate-08-03-2024/16885"
snapshot: "No snapshot for Direct-to-AIP"
Rozengarden marked this conversation as resolved.
Show resolved Hide resolved
---

## Simple Summary

This AIP will increase GHO borrow rate by 0.5% APR.
Rozengarden marked this conversation as resolved.
Show resolved Hide resolved

## Motivation

With the evolving market dynamics and the increasing popularity of GHO as a stablecoin option, it is necessary to maintain competitiveness by aligning borrowing costs with average market rates. The current GHO borrow rate of 7.22% APR (~7.48% APY) no longer meets this requirement.

AIP-381 allows for 100 bps increases in the GHO borrow rate every 7 days while maintaining rates up to 9.5% APR if the monthly average price of GHO stays outside a 0,995<>1,005 price range. The peg has shown improvement but remains below the target.

| Monthly Average Borrow Cost (APR) | Stablecoin |
| --------------------------------- | ---------- |
| 10.45% | DAI |
| 10.89% | LUSD |
| 10.91% | USDC |
| 11.87% | USDT |

Source: [TokenLogic | GHO Analytics](https://aave.tokenlogic.com.au/stablecoin-rates)

Increasing the non-discounted borrow rate of GHO from 7.22% to 7.92% is proposed to remain competitive, increase protocol revenue, and not negatively affect the peg.

## Specification

- **Current Borrow Rate:** 7.22% APR - ~7.48% APY (non-discounted)
- **Proposed Borrow Rate:** 7.92% - ~8% APY (non-discounted)
- **Discounted Rates:** 30% discount
- **New Discounted Borrow Rate:**
- GHO: ~5.6% APY

If required, ACI will monitor the GHO peg and use authorized discretion for further rate adjustments in coordination with @karpatkey_TokenLogic Aave finance SPs.

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/AaveV3Ethereum_GHOBorrowRateIncrease_20240308.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/AaveV3Ethereum_GHOBorrowRateIncrease_20240308.t.sol)
- Snapshot: No snapshot for Direct-to-AIP)
- [Discussion](https://governance.aave.com/t/arfc-increase-gho-borrow-rate-08-03-2024/16885)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {EthereumScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveV3Ethereum_GHOBorrowRateIncrease_20240308} from './AaveV3Ethereum_GHOBorrowRateIncrease_20240308.sol';
import {GhoInterestRateStrategy} from './GhoInterestRateStrategy.sol';

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/GHOBorrowRateIncrease_20240308.s.sol:DeployInterestRateStrategy chain=mainnet
* verify-command: npx catapulta-verify -b broadcast/GHOBorrowRateIncrease_20240308.s.sol/1/run-latest.json
*/
contract DeployInterestRateStrategy is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(type(GhoInterestRateStrategy).creationCode);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/GHOBorrowRateIncrease_20240308.s.sol:DeployEthereum chain=mainnet
* verify-command: npx catapulta-verify -b broadcast/GHOBorrowRateIncrease_20240308.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
abi.encode(
type(AaveV3Ethereum_GHOBorrowRateIncrease_20240308).creationCode,
GovV3Helpers.predictDeterministicAddress(type(GhoInterestRateStrategy).creationCode)
)
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/GHOBorrowRateIncrease_20240308.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
address payload0 = GovV3Helpers.deployDeterministic(type(GhoInterestRateStrategy).creationCode);
// create payloads
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1);

// compose actions for validation
IPayloadsControllerCore.ExecutionAction[]
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsEthereum[0] = GovV3Helpers.buildAction(
abi.encode(type(AaveV3Ethereum_GHOBorrowRateIncrease_20240308).creationCode, payload0)
);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovV3Helpers.ipfsHashFile(
vm,
'src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/GHOBorrowRateIncrease.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import {DataTypes} from 'aave-v3-core/contracts/protocol/libraries/types/DataTypes.sol';
import {IDefaultInterestRateStrategy} from 'aave-v3-core/contracts/interfaces/IDefaultInterestRateStrategy.sol';
import {IReserveInterestRateStrategy} from 'aave-v3-core/contracts/interfaces/IReserveInterestRateStrategy.sol';
import {IPoolAddressesProvider} from 'aave-v3-core/contracts/interfaces/IPoolAddressesProvider.sol';
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

/**
* @title GhoInterestRateStrategy
* @author Aave
* @notice Implements the calculation of GHO interest rates, which defines a fixed variable borrow rate.
* @dev The variable borrow interest rate is fixed at deployment time. The rest of parameters are zeroed.
*/
contract GhoInterestRateStrategy is IDefaultInterestRateStrategy {
/// @inheritdoc IDefaultInterestRateStrategy
uint256 public constant OPTIMAL_USAGE_RATIO = 0;

/// @inheritdoc IDefaultInterestRateStrategy
uint256 public constant OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = 0;

/// @inheritdoc IDefaultInterestRateStrategy
uint256 public constant MAX_EXCESS_USAGE_RATIO = 0;

/// @inheritdoc IDefaultInterestRateStrategy
uint256 public constant MAX_EXCESS_STABLE_TO_TOTAL_DEBT_RATIO = 0;

/// @inheritdoc IDefaultInterestRateStrategy
IPoolAddressesProvider public constant ADDRESSES_PROVIDER =
AaveV3Ethereum.POOL_ADDRESSES_PROVIDER;

// Base variable borrow rate when usage rate = 0. Expressed in ray
uint256 internal immutable _baseVariableBorrowRate = 79200000000000000000000000; // 7.92% in ray format

/// @inheritdoc IDefaultInterestRateStrategy
function getVariableRateSlope1() external pure returns (uint256) {
return 0;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getVariableRateSlope2() external pure returns (uint256) {
return 0;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getStableRateSlope1() external pure returns (uint256) {
return 0;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getStableRateSlope2() external pure returns (uint256) {
return 0;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getStableRateExcessOffset() external pure returns (uint256) {
return 0;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getBaseStableBorrowRate() public pure returns (uint256) {
return 0;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getBaseVariableBorrowRate() external view override returns (uint256) {
return _baseVariableBorrowRate;
}

/// @inheritdoc IDefaultInterestRateStrategy
function getMaxVariableBorrowRate() external view override returns (uint256) {
return _baseVariableBorrowRate;
}

/// @inheritdoc IReserveInterestRateStrategy
function calculateInterestRates(
DataTypes.CalculateInterestRatesParams memory
) public view override returns (uint256, uint256, uint256) {
return (0, 0, _baseVariableBorrowRate);
}
}
13 changes: 13 additions & 0 deletions src/20240308_AaveV3Ethereum_GHOBorrowRateIncrease/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
author: 'Aave Chan Initiative',
pools: ['AaveV3Ethereum'],
title: 'GHOBorrowRateIncrease',
shortName: 'GHOBorrowRateIncrease',
date: '20240308',
discussion: 'https://governance.aave.com/t/arfc-increase-gho-borrow-rate-08-03-2024/16885',
snapshot: 'No snapshot for Direct-to-AIP',
},
poolOptions: {AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 19391086}}},
};