generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added revert to previous rate strategy.
- Loading branch information
Showing
2 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
34 changes: 31 additions & 3 deletions
34
...2Ethereum_UpgradeAMPLImplementation/AaveV2Ethereum_UpgradeAMPLImplementation_20240402.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters