forked from aave-dao/aave-v3-origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAaveV3MockEModeCategoryUpdate.sol
70 lines (59 loc) · 2.15 KB
/
AaveV3MockEModeCategoryUpdate.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
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import '../../../../src/contracts/extensions/v3-config-engine/AaveV3Payload.sol';
/**
* @dev Smart contract for a mock emode category update, to be able to test
* IMPORTANT Parameters are pseudo-random, DON'T USE THIS ANYHOW IN PRODUCTION
* @dev Inheriting directly from AaveV3Payload for being able to inject a custom engine
* @author BGD Labs
*/
contract AaveV3MockEModeCategoryUpdate is AaveV3Payload {
constructor(address customEngine) AaveV3Payload(IEngine(customEngine)) {}
function eModeCategoriesUpdates()
public
pure
override
returns (IEngine.EModeCategoryUpdate[] memory)
{
IEngine.EModeCategoryUpdate[] memory eModeUpdates = new IEngine.EModeCategoryUpdate[](1);
eModeUpdates[0] = IEngine.EModeCategoryUpdate({
eModeCategory: 1,
ltv: 97_40,
liqThreshold: 97_60,
liqBonus: 1_50,
label: 'ETH Correlated'
});
return eModeUpdates;
}
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Polygon', networkAbbreviation: 'Pol'});
}
}
/**
* @dev Smart contract for a mock emode category update, to be able to test
* IMPORTANT Parameters are pseudo-random, DON'T USE THIS ANYHOW IN PRODUCTION
* @dev Inheriting directly from AaveV3Payload for being able to inject a custom engine
* @author BGD Labs
*/
contract AaveV3MockEModeCategoryUpdateEdgeBonus is AaveV3Payload {
constructor(address customEngine) AaveV3Payload(IEngine(customEngine)) {}
function eModeCategoriesUpdates()
public
pure
override
returns (IEngine.EModeCategoryUpdate[] memory)
{
IEngine.EModeCategoryUpdate[] memory eModeUpdates = new IEngine.EModeCategoryUpdate[](1);
eModeUpdates[0] = IEngine.EModeCategoryUpdate({
eModeCategory: 1,
ltv: 97_40,
liqThreshold: 97_60,
liqBonus: 2_50,
label: EngineFlags.KEEP_CURRENT_STRING
});
return eModeUpdates;
}
function getPoolContext() public pure override returns (IEngine.PoolContext memory) {
return IEngine.PoolContext({networkName: 'Local', networkAbbreviation: 'Loc'});
}
}