generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathAaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol
48 lines (43 loc) · 1.88 KB
/
AaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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 AaveV2PayloadEthereum {
address constant A_TOKEN_IMPL = 0x1F32642b216d19DAEb1531862647195a626F4193;
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;
}
}