generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathAaveV3Ethereum_StablecoinHarmonization_20240312.sol
128 lines (122 loc) · 4.93 KB
/
AaveV3Ethereum_StablecoinHarmonization_20240312.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
import {AaveV3PayloadEthereum} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol';
import {EngineFlags} from 'aave-helpers/v3-config-engine/EngineFlags.sol';
import {IAaveV3ConfigEngine} from 'aave-helpers/v3-config-engine/IAaveV3ConfigEngine.sol';
/**
* @title stablecoin harmonization
* @author Aave Chan Initiative
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x22407c9362bc3294e3ddd5428fdd5c08312459595573a864ec8ebac61ad95b94
* - Discussion: https://governance.aave.com/t/arfc-stablecoin-harmonization-and-asset-parameters-optimization/16802
*/
contract AaveV3Ethereum_StablecoinHarmonization_20240312 is AaveV3PayloadEthereum {
function _postExecute() internal override {
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.STG_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.KNC_UNDERLYING, true);
AaveV3Ethereum.POOL_CONFIGURATOR.setReserveFreeze(AaveV3EthereumAssets.FXS_UNDERLYING, true);
}
function collateralsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.CollateralUpdate[] memory)
{
IAaveV3ConfigEngine.CollateralUpdate[]
memory collateralUpdate = new IAaveV3ConfigEngine.CollateralUpdate[](7);
collateralUpdate[0] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.LUSD_UNDERLYING,
ltv: 0,
liqThreshold: 77_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[1] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.BAL_UNDERLYING,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: 59_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[2] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.UNI_UNDERLYING,
ltv: EngineFlags.KEEP_CURRENT,
liqThreshold: 74_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[3] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.FRAX_UNDERLYING,
ltv: 0,
liqThreshold: 72_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[4] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.STG_UNDERLYING,
ltv: 0,
liqThreshold: 37_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[5] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.KNC_UNDERLYING,
ltv: 0,
liqThreshold: 37_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
collateralUpdate[6] = IAaveV3ConfigEngine.CollateralUpdate({
asset: AaveV3EthereumAssets.FXS_UNDERLYING,
ltv: 0,
liqThreshold: 42_00,
liqBonus: EngineFlags.KEEP_CURRENT,
debtCeiling: EngineFlags.KEEP_CURRENT,
liqProtocolFee: EngineFlags.KEEP_CURRENT
});
return collateralUpdate;
}
function borrowsUpdates()
public
pure
override
returns (IAaveV3ConfigEngine.BorrowUpdate[] memory)
{
IAaveV3ConfigEngine.BorrowUpdate[]
memory borrowUpdates = new IAaveV3ConfigEngine.BorrowUpdate[](3);
borrowUpdates[0] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.DAI_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 25_00
});
borrowUpdates[1] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.LUSD_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 20_00
});
borrowUpdates[2] = IAaveV3ConfigEngine.BorrowUpdate({
asset: AaveV3EthereumAssets.FRAX_UNDERLYING,
enabledToBorrow: EngineFlags.KEEP_CURRENT,
flashloanable: EngineFlags.KEEP_CURRENT,
stableRateModeEnabled: EngineFlags.KEEP_CURRENT,
borrowableInIsolation: EngineFlags.KEEP_CURRENT,
withSiloedBorrowing: EngineFlags.KEEP_CURRENT,
reserveFactor: 20_00
});
return borrowUpdates;
}
}