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

WETH Borrow Rate Update - Lido Instance #510

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
## Reserve changes

### Reserve altered

#### wstETH ([0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0](https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0))

| description | value before | value after |
| --- | --- | --- |
| maxVariableBorrowRate | 87.25 % | 87.75 % |
| baseVariableBorrowRate | 0 % | 0.5 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=22500000000000000000000000&variableRateSlope2=850000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=872500000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=22500000000000000000000000&variableRateSlope2=850000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=5000000000000000000000000&maxVariableBorrowRate=877500000000000000000000000) |

#### WETH ([0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2](https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2))

| description | value before | value after |
| --- | --- | --- |
| maxVariableBorrowRate | 87.5 % | 87.75 % |
| variableRateSlope1 | 2.5 % | 2.75 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=25000000000000000000000000&variableRateSlope2=850000000000000000000000000&optimalUsageRatio=900000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=875000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=27500000000000000000000000&variableRateSlope2=850000000000000000000000000&optimalUsageRatio=900000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=877500000000000000000000000) |

## Emodes changed

### EMode: ETH correlated(id: 1)

| description | value before | value after |
| --- | --- | --- |
| eMode.label (unchanged) | ETH correlated | ETH correlated |
| eMode.ltv (unchanged) | 93.5 % | 93.5 % |
| eMode.liquidationThreshold (unchanged) | 95.5 % | 95.5 % |
| eMode.liquidationBonus (unchanged) | 1 % | 1 % |
| eMode.borrowableBitmap (unchanged) | wstETH, WETH | wstETH, WETH |
| eMode.collateralBitmap (unchanged) | wstETH, WETH | wstETH, WETH |


## Raw diff

```json
{
"strategies": {
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": {
"baseVariableBorrowRate": {
"from": "0",
"to": "5000000000000000000000000"
},
"maxVariableBorrowRate": {
"from": "872500000000000000000000000",
"to": "877500000000000000000000000"
}
},
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": {
"maxVariableBorrowRate": {
"from": "875000000000000000000000000",
"to": "877500000000000000000000000"
},
"variableRateSlope1": {
"from": "25000000000000000000000000",
"to": "27500000000000000000000000"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3EthereumLidoAssets} from 'aave-address-book/AaveV3EthereumLido.sol';
import {AaveV3PayloadEthereumLido} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereumLido.sol';
import {EngineFlags} from 'aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title wETH Reserve Borrow Rate Update - Lido Instance
* @author karpatkey_TokenLogic
* - Snapshot: Direct-to-AIP
* - Discussion: https://governance.aave.com/t/arfc-weth-wsteth-borrow-rate-updates/19550
*/
contract AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024 is
AaveV3PayloadEthereumLido
{
function rateStrategiesUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.RateStrategyUpdate[] memory)
{
IAaveV3ConfigEngine.RateStrategyUpdate[]
memory rateStrategies = new IAaveV3ConfigEngine.RateStrategyUpdate[](2);
rateStrategies[0] = IAaveV3ConfigEngine.RateStrategyUpdate({
asset: AaveV3EthereumLidoAssets.WETH_UNDERLYING,
params: IAaveV3ConfigEngine.InterestRateInputData({
optimalUsageRatio: EngineFlags.KEEP_CURRENT,
baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
variableRateSlope1: 2_75,
variableRateSlope2: EngineFlags.KEEP_CURRENT
})
});
rateStrategies[1] = IAaveV3ConfigEngine.RateStrategyUpdate({
asset: AaveV3EthereumLidoAssets.wstETH_UNDERLYING,
params: IAaveV3ConfigEngine.InterestRateInputData({
optimalUsageRatio: EngineFlags.KEEP_CURRENT,
baseVariableBorrowRate: 50,
variableRateSlope1: EngineFlags.KEEP_CURRENT,
variableRateSlope2: EngineFlags.KEEP_CURRENT
})
});

return rateStrategies;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol';
import {AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024} from './AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024.sol';

/**
* @dev Test for AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241024_AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance/AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024.t.sol -vv
*/
contract AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024_Test is
ProtocolV3TestBase
{
AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 21036516);
proposal = new AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024',
AaveV3EthereumLido.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: "wstETH and wETH Borrow Rate Update - Lido Instance"
author: "karpatkey_TokenLogic"
discussions: "https://governance.aave.com/t/arfc-weth-wsteth-borrow-rate-updates/19550"
snapshot: "Direct-to-AIP"
---

## Simple Summary

This AIP when implemented will increase the wETH Slope1 and wstETH Base parameters on the Lido instance of Aave v3.

## Motivation

After onboarding ezETH, the demand for wstETH debt has increased significantly.

This AIP increases the wstETH borrow rate by adjusting the Base parameter from 0 bps to 50bps to better reflect prevailing market conditions.

The wETH borrow rate will be increased by raising Slope1 by 25bps. This is expected to lead to a higher wETH deposit rate and reduce dependency on rewards being emitted to wETH deposits.

## Specification

The Lido instance wETH Slope1 and wstETH Base are to be revised as follows:

| Asset | Parameter | Current | Proposed | Change |
| :----: | :-------: | :-----: | :------: | :----: |
| wETH | Slope1 | 2.50% | 2.75% | +0.25% |
| wstETH | Base | 0.00% | 0.50% | +0.50% |

## References

- Implementation: [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241024_AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance/AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024.sol)
- Tests: [AaveV3EthereumLido](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20241024_AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance/AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024.t.sol)
- Snapshot: Direct-to-AIP
- [Discussion](https://governance.aave.com/t/arfc-weth-wsteth-borrow-rate-updates/19550)

## 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,60 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024} from './AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024.sol';

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20241024_AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance/WETHReserveBorrowRateUpdateLidoInstance_20241024.s.sol:DeployEthereum chain=mainnet
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/WETHReserveBorrowRateUpdateLidoInstance_20241024.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024).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/20241024_AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance/WETHReserveBorrowRateUpdateLidoInstance_20241024.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
// 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(
type(AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance_20241024).creationCode
);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20241024_AaveV3EthereumLido_WETHReserveBorrowRateUpdateLidoInstance/WETHReserveBorrowRateUpdateLidoInstance.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
pools: ['AaveV3EthereumLido'],
title: 'wETH Reserve Borrow Rate Update - Lido Instance',
shortName: 'WETHReserveBorrowRateUpdateLidoInstance',
date: '20241024',
author: 'karpatkey_TokenLogic',
discussion: 'https://governance.aave.com/t/arfc-weth-wsteth-borrow-rate-updates/19550',
snapshot: 'Direct-to-AIP',
votingNetwork: 'POLYGON',
},
poolOptions: {
AaveV3EthereumLido: {
configs: {
RATE_UPDATE_V3: [
{
asset: 'WETH',
params: {
optimalUtilizationRate: '',
baseVariableBorrowRate: '',
variableRateSlope1: '2.75',
variableRateSlope2: '',
},
},
{
asset: 'wstETH',
params: {
optimalUtilizationRate: '',
baseVariableBorrowRate: '0.5',
variableRateSlope1: '',
variableRateSlope2: '',
},
},
],
},
cache: {blockNumber: 21036516},
},
},
};