Skip to content

Commit

Permalink
- Added revert to previous rate strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
eboadom committed Apr 5, 2024
1 parent 2416a85 commit ab6a199
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ab6a199

Please sign in to comment.