From ab6a1996fbe7373880eabf0a7abb4dc83b0433b6 Mon Sep 17 00:00:00 2001 From: eboado Date: Fri, 5 Apr 2024 15:35:37 +0200 Subject: [PATCH] - Added revert to previous rate strategy. --- ...eum_UpgradeAMPLImplementation_20240402.sol | 34 +++++++++++++++++-- .../UpgradeAMPLImplementation.md | 12 +++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/AaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol b/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/AaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol index ddc009c89..9a7558958 100644 --- a/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/AaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol +++ b/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/AaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol @@ -1,20 +1,48 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {IAaveV2ConfigEngine} from 'aave-helpers/v2-config-engine/IAaveV2ConfigEngine.sol'; +import {IV2RateStrategyFactory} from 'aave-helpers/v2-config-engine/IV2RateStrategyFactory.sol'; +import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol'; +import {AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; +import {AaveV2Ethereum, AaveV2PayloadEthereum} from 'aave-helpers/v2-config-engine/AaveV2PayloadEthereum.sol'; + /** * @title Upgrade AMPL implementation * @author BGD Labs * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0xb7226dd6441b67225924082215f7a512bfd98252897ee43a879084e07ab53607 * - Discussion: https://governance.aave.com/t/arfc-aampl-interim-distribution/17184 */ -contract AaveV2Ethereum_UpgradeAMPLImplementation_20240402 is IProposalGenericExecutor { +contract AaveV2Ethereum_UpgradeAMPLImplementation_20240402 is AaveV2PayloadEthereum { address constant A_TOKEN_IMPL = address(0); - function execute() external { + function _preExecute() internal override { AaveV2Ethereum.POOL_CONFIGURATOR.updateAToken( AaveV2EthereumAssets.AMPL_UNDERLYING, A_TOKEN_IMPL ); } + + function rateStrategiesUpdates() + public + pure + override + returns (IAaveV2ConfigEngine.RateStrategyUpdate[] memory) + { + IAaveV2ConfigEngine.RateStrategyUpdate[] + memory rateStrategies = new IAaveV2ConfigEngine.RateStrategyUpdate[](1); + rateStrategies[0] = IAaveV2ConfigEngine.RateStrategyUpdate({ + asset: AaveV2EthereumAssets.AMPL_UNDERLYING, + params: IV2RateStrategyFactory.RateStrategyParams({ + optimalUtilizationRate: EngineFlags.KEEP_CURRENT, + baseVariableBorrowRate: EngineFlags.KEEP_CURRENT, + variableRateSlope1: EngineFlags.KEEP_CURRENT, + variableRateSlope2: _bpsToRay(300_00), + stableRateSlope1: EngineFlags.KEEP_CURRENT, + stableRateSlope2: EngineFlags.KEEP_CURRENT + }) + }); + + return rateStrategies; + } } diff --git a/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/UpgradeAMPLImplementation.md b/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/UpgradeAMPLImplementation.md index e186cedb4..070afe58f 100644 --- a/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/UpgradeAMPLImplementation.md +++ b/src/20240402_AaveV2Ethereum_UpgradeAMPLImplementation/UpgradeAMPLImplementation.md @@ -16,11 +16,23 @@ While work is being made to determined the exact claims, there has been a propos Therefore transfers aAMPL and withdrawals of AMPL will be disabled, while repayments and liquidations will stay intact. +In addition, after validating there is no impact of it on the borrow side, the interest rate strategy of AMPL is reverted to the one that was configured before [proposal 16](https://vote.onaave.com/proposal/?proposalId=16), when parameters where lowered for pre-caution. +The goal of this is to, as intended, still apply growth on the borrow side, specially for currently healthy positions (non-liquidated). + ## Specification The proposal will call: - `AaveV2Ethereum.POOL_CONFIGURATOR.updateAToken(AaveV2EthereumAssets.AMPL_UNDERLYING, A_TOKEN_IMPL);` to replace the aToken implementation +- Change the AMPL interest rate strategy to the previous one, with the following configuration: + +| Parameter | Current | Recommended | +| -------------- | ------- | ----------- | +| Base | 20% | No Change | +| Slope1 | 0% | No Change | +| Slope2 | 0% | 300% | +| Uoptimal | 80% | No Change | +| Reserve Factor | 99.00% | No Change | ## References