Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Add weth IR update with ACI #345

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .assets/cf503516adca0ef2b3e859f702e54d27d132edf2.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,46 @@
## Reserve changes

### Reserves altered

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

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0xb02381b1d27aA9845e5012083CA288c1818884f0](https://etherscan.io/address/0xb02381b1d27aA9845e5012083CA288c1818884f0) | [0xA901Bf68Bebde17ba382e499C3e9EbAe649DF276](https://etherscan.io/address/0xA901Bf68Bebde17ba382e499C3e9EbAe649DF276) |
| optimalUsageRatio | 90 % | 80 % |
| maxExcessUsageRatio | 10 % | 20 % |
| variableRateSlope1 | 3.8 % | 2.8 % |
| baseStableBorrowRate | 6.8 % | 5.8 % |
| interestRate | ![before](/.assets/36935a8fd1d50a51974d60fcb6323e9bc9a95c16.svg) | ![after](/.assets/cf503516adca0ef2b3e859f702e54d27d132edf2.svg) |

## Raw diff

```json
{
"reserves": {
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": {
"interestRateStrategy": {
"from": "0xb02381b1d27aA9845e5012083CA288c1818884f0",
"to": "0xA901Bf68Bebde17ba382e499C3e9EbAe649DF276"
}
}
},
"strategies": {
"0xA901Bf68Bebde17ba382e499C3e9EbAe649DF276": {
"from": null,
"to": {
"baseStableBorrowRate": "58000000000000000000000000",
"baseVariableBorrowRate": 0,
"maxExcessStableToTotalDebtRatio": "800000000000000000000000000",
"maxExcessUsageRatio": "200000000000000000000000000",
"optimalStableToTotalDebtRatio": "200000000000000000000000000",
"optimalUsageRatio": "800000000000000000000000000",
"stableRateSlope1": "40000000000000000000000000",
"stableRateSlope2": "800000000000000000000000000",
"variableRateSlope1": "28000000000000000000000000",
"variableRateSlope2": "800000000000000000000000000"
}
}
}
}
```
38 changes: 38 additions & 0 deletions src/AaveV3Update_20231024/AaveV3Ethereum_20231024.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IEngine,EngineFlags,Rates} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol';
import {
AaveV3PayloadEthereum,
AaveV3EthereumAssets
} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol';

/**
* @title Upgrade Aave V3 ETH pool wETH parameters
* @author Gauntlet, ACI
* - Discussion: https://governance.aave.com/t/arfc-upgrade-aave-v3-eth-pool-weth-parameters/15110
*/
contract AaveV3EthereumUpdate20231024Payload is AaveV3PayloadEthereum {
function rateStrategiesUpdates() public pure override returns (IEngine.RateStrategyUpdate[] memory) {
IEngine.RateStrategyUpdate[] memory rateStrategyUpdates = new IEngine.RateStrategyUpdate[](1);

Rates.RateStrategyParams memory paramsWETH_UNDERLYING = Rates.RateStrategyParams({
optimalUsageRatio: _bpsToRay(8000),
baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
variableRateSlope1: _bpsToRay(280),
variableRateSlope2: EngineFlags.KEEP_CURRENT,
stableRateSlope1: EngineFlags.KEEP_CURRENT,
stableRateSlope2: EngineFlags.KEEP_CURRENT,
baseStableRateOffset: EngineFlags.KEEP_CURRENT,
stableRateExcessOffset: EngineFlags.KEEP_CURRENT,
optimalStableToTotalDebtRatio: EngineFlags.KEEP_CURRENT
});

rateStrategyUpdates[0] = IEngine.RateStrategyUpdate({
asset: AaveV3EthereumAssets.WETH_UNDERLYING,
params: paramsWETH_UNDERLYING
});

return rateStrategyUpdates;
}
}
42 changes: 42 additions & 0 deletions src/AaveV3Update_20231024/AaveV3Update_20231024.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Upgrade Aave V3 ETH pool wETH parameters
author: Gauntlet, ACI
discussions: https://governance.aave.com/t/arfc-upgrade-aave-v3-eth-pool-weth-parameters/15110
---

## Summary

The current yields of stETH and reth are 3.30% and 3.07% respectively. By adjusting the slope1 parameter of WETH, we aim to:

- Enhance Profitability in Leverage Loops: The proposed adjustment will make leverage loops more profitable for users.
- Align with stETH and reth Yields: The proposed adjustment aims to set the slope1 slightly below the current yields of stETH and reth, ensuring Aave remains competitive.

Increased utilization of ETH reserve is expected to partly compensate for the slight loss of protocol revenue due to lower interest rate equilibrium.

## Specification

| Chain | Asset | Current Uopt | Recommended Uopt | Current Variable Slope 1 | Recommended Variable Slope 1 |
| ----------- | ----- | ------------ | ---------------- | ------------------------ | ---------------------------- |
| Ethereum v3 | WETH | 90% | 80% | 3.8% | 2.8% |

## Implementation

The proposal implements changes using the following payload:

- [Ethereum](https://github.com/bgd-labs/aave-proposals/blob/main/src/AaveV3Update_20231024/AaveV3Ethereum_20231024.sol)

## References

- **Discussion**: https://governance.aave.com/t/arfc-upgrade-aave-v3-eth-pool-weth-parameters/15110

## Disclaimer

Gauntlet and ACI have not received any compensation from any third-party in exchange for recommending any of the actions contained in this proposal.

By approving this proposal, you agree that any services provided by Gauntlet shall be governed by the terms of service available at gauntlet.network/tos.

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

_By approving this proposal, you agree that any services provided by Gauntlet shall be governed by the terms of service available at gauntlet.network/tos._
61 changes: 61 additions & 0 deletions src/AaveV3Update_20231024/AaveV3Update_20231024_Test.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import 'forge-std/Test.sol';
import {AaveGovernanceV2} from 'aave-address-book/AaveGovernanceV2.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {GovHelpers} from 'aave-helpers/GovHelpers.sol';
import {
AaveV3Ethereum,
AaveV3EthereumAssets
} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol';
import {
AaveV3EthereumUpdate20231024Payload
} from './AaveV3Ethereum_20231024.sol';

contract AaveV3EthereumUpdate_20231024_Test is ProtocolV3TestBase {
function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 18422833);
}

function testEthereum20231024UpdatePayload() public {
ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
'preTestEthereumUpdate20231024',
AaveV3Ethereum.POOL
);

ReserveConfig memory WETH_UNDERLYINGBefore = _findReserveConfig(
allConfigsBefore,
AaveV3EthereumAssets.WETH_UNDERLYING
);

GovHelpers.executePayload(
vm,
address(new AaveV3EthereumUpdate20231024Payload()),
AaveGovernanceV2.SHORT_EXECUTOR
);

ReserveConfig[] memory allConfigsAfter = createConfigurationSnapshot(
'postTestEthereumUpdate20231024',
AaveV3Ethereum.POOL
);

diffReports('preTestEthereumUpdate20231024', 'postTestEthereumUpdate20231024');

address[] memory assetsChanged = new address[](1);
assetsChanged[0] = AaveV3EthereumAssets.WETH_UNDERLYING;

_noReservesConfigsChangesApartFrom(allConfigsBefore, allConfigsAfter, assetsChanged);

{
ReserveConfig memory WETH_UNDERLYINGAfter = _findReserveConfig(
allConfigsAfter,
AaveV3EthereumAssets.WETH_UNDERLYING
);
WETH_UNDERLYINGBefore.interestRateStrategy = WETH_UNDERLYINGAfter.interestRateStrategy;
_validateReserveConfig(WETH_UNDERLYINGBefore, allConfigsAfter);
}
e2eTest(AaveV3Ethereum.POOL);
}
}
30 changes: 30 additions & 0 deletions src/AaveV3Update_20231024/DeployAaveV3Update_20231024.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovHelpers} from 'aave-helpers/GovHelpers.sol';
import {
EthereumScript
} from 'aave-helpers/ScriptUtils.sol';
import {
AaveV3EthereumUpdate20231024Payload
} from './AaveV3Ethereum_20231024.sol';

contract CreateProposal is EthereumScript {
function run() external broadcast {
GovHelpers.Payload[] memory payloads = new GovHelpers.Payload[](1);
payloads[0] = GovHelpers.buildMainnet(address(0));
GovHelpers.createProposal(
payloads,
GovHelpers.ipfsHashFile(
vm,
'src/AaveV3Update_20231024/AaveV3Update_20231024.md'
)
);
}
}

contract Deploy20231024PayloadEthereum is EthereumScript {
function run() external broadcast {
new AaveV3EthereumUpdate20231024Payload();
}
}