@defisaver/automation-sdk 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +3 -3
- package/.editorconfig +9 -9
- package/.env.dev +4 -4
- package/.eslintignore +6 -6
- package/.eslintrc.js +39 -39
- package/.mocharc.json +4 -4
- package/.nvmrc +1 -1
- package/README.md +46 -46
- package/cjs/abis/Erc20.json +223 -223
- package/cjs/abis/SubStorage.json +21 -21
- package/cjs/abis/UniMulticall.json +17 -17
- package/cjs/abis/index.d.ts +9 -9
- package/cjs/abis/index.js +30 -30
- package/cjs/abis/legacy_AaveV2Subscriptions.json +8 -8
- package/cjs/abis/legacy_AuthCheck.json +8 -8
- package/cjs/abis/legacy_CompoundV2Subscriptions.json +9 -9
- package/cjs/abis/legacy_MakerSubscriptions.json +9 -9
- package/cjs/automation/private/Automation.d.ts +12 -12
- package/cjs/automation/private/Automation.js +42 -42
- package/cjs/automation/private/LegacyAutomation.d.ts +25 -25
- package/cjs/automation/private/LegacyAutomation.js +118 -118
- package/cjs/automation/private/LegacyProtocol.d.ts +22 -22
- package/cjs/automation/private/LegacyProtocol.js +41 -41
- package/cjs/automation/private/LegacyProtocol.test.d.ts +1 -1
- package/cjs/automation/private/LegacyProtocol.test.js +25 -25
- package/cjs/automation/private/Protocol.d.ts +22 -22
- package/cjs/automation/private/Protocol.js +41 -41
- package/cjs/automation/private/Protocol.test.d.ts +1 -1
- package/cjs/automation/private/Protocol.test.js +25 -25
- package/cjs/automation/private/StrategiesAutomation.d.ts +33 -33
- package/cjs/automation/private/StrategiesAutomation.js +189 -189
- package/cjs/automation/private/StrategiesAutomation.test.d.ts +1 -1
- package/cjs/automation/private/StrategiesAutomation.test.js +671 -671
- package/cjs/automation/public/ArbitrumStrategies.d.ts +5 -5
- package/cjs/automation/public/ArbitrumStrategies.js +13 -13
- package/cjs/automation/public/BaseStrategies.d.ts +5 -5
- package/cjs/automation/public/BaseStrategies.js +13 -13
- package/cjs/automation/public/EthereumStrategies.d.ts +5 -5
- package/cjs/automation/public/EthereumStrategies.js +13 -13
- package/cjs/automation/public/OptimismStrategies.d.ts +5 -5
- package/cjs/automation/public/OptimismStrategies.js +13 -13
- package/cjs/automation/public/Strategies.test.d.ts +1 -1
- package/cjs/automation/public/Strategies.test.js +61 -61
- package/cjs/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
- package/cjs/automation/public/legacy/LegacyAaveAutomation.js +20 -20
- package/cjs/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
- package/cjs/automation/public/legacy/LegacyCompoundAutomation.js +20 -20
- package/cjs/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
- package/cjs/automation/public/legacy/LegacyMakerAutomation.js +20 -20
- package/cjs/configuration.d.ts +1 -1
- package/cjs/configuration.js +12 -12
- package/cjs/constants/index.d.ts +28 -28
- package/cjs/constants/index.js +564 -564
- package/cjs/index.d.ts +23 -23
- package/cjs/index.js +65 -65
- package/cjs/services/contractService.d.ts +12 -12
- package/cjs/services/contractService.js +54 -54
- package/cjs/services/ethereumService.d.ts +7 -7
- package/cjs/services/ethereumService.js +49 -49
- package/cjs/services/ethereumService.test.d.ts +1 -1
- package/cjs/services/ethereumService.test.js +242 -242
- package/cjs/services/strategiesService.d.ts +2 -2
- package/cjs/services/strategiesService.js +898 -898
- package/cjs/services/strategiesService.test.d.ts +1 -1
- package/cjs/services/strategiesService.test.js +110 -110
- package/cjs/services/strategySubService.d.ts +110 -110
- package/cjs/services/strategySubService.js +308 -308
- package/cjs/services/strategySubService.test.d.ts +1 -1
- package/cjs/services/strategySubService.test.js +936 -936
- package/cjs/services/subDataService.d.ts +254 -254
- package/cjs/services/subDataService.js +669 -669
- package/cjs/services/subDataService.test.d.ts +1 -1
- package/cjs/services/subDataService.test.js +1282 -1282
- package/cjs/services/triggerService.d.ts +234 -234
- package/cjs/services/triggerService.js +447 -447
- package/cjs/services/triggerService.test.d.ts +1 -1
- package/cjs/services/triggerService.test.js +926 -926
- package/cjs/services/utils.d.ts +30 -30
- package/cjs/services/utils.js +182 -182
- package/cjs/services/utils.test.d.ts +1 -1
- package/cjs/services/utils.test.js +376 -376
- package/cjs/types/contracts/generated/Erc20.d.ts +53 -53
- package/cjs/types/contracts/generated/Erc20.js +5 -5
- package/cjs/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
- package/cjs/types/contracts/generated/Legacy_AaveV2Subscriptions.js +5 -5
- package/cjs/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
- package/cjs/types/contracts/generated/Legacy_AuthCheck.js +5 -5
- package/cjs/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
- package/cjs/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +5 -5
- package/cjs/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
- package/cjs/types/contracts/generated/Legacy_MakerSubscriptions.js +5 -5
- package/cjs/types/contracts/generated/SubStorage.d.ts +114 -114
- package/cjs/types/contracts/generated/SubStorage.js +5 -5
- package/cjs/types/contracts/generated/UniMulticall.d.ts +55 -55
- package/cjs/types/contracts/generated/UniMulticall.js +5 -5
- package/cjs/types/contracts/generated/index.d.ts +7 -7
- package/cjs/types/contracts/generated/index.js +2 -2
- package/cjs/types/contracts/generated/types.d.ts +54 -54
- package/cjs/types/contracts/generated/types.js +2 -2
- package/cjs/types/enums.d.ts +226 -226
- package/cjs/types/enums.js +252 -252
- package/cjs/types/index.d.ts +248 -248
- package/cjs/types/index.js +2 -2
- package/esm/abis/Erc20.json +223 -223
- package/esm/abis/SubStorage.json +21 -21
- package/esm/abis/UniMulticall.json +17 -17
- package/esm/abis/index.d.ts +9 -9
- package/esm/abis/index.js +18 -18
- package/esm/abis/legacy_AaveV2Subscriptions.json +8 -8
- package/esm/abis/legacy_AuthCheck.json +8 -8
- package/esm/abis/legacy_CompoundV2Subscriptions.json +9 -9
- package/esm/abis/legacy_MakerSubscriptions.json +9 -9
- package/esm/automation/private/Automation.d.ts +12 -12
- package/esm/automation/private/Automation.js +39 -39
- package/esm/automation/private/LegacyAutomation.d.ts +25 -25
- package/esm/automation/private/LegacyAutomation.js +112 -112
- package/esm/automation/private/LegacyProtocol.d.ts +22 -22
- package/esm/automation/private/LegacyProtocol.js +38 -38
- package/esm/automation/private/LegacyProtocol.test.d.ts +1 -1
- package/esm/automation/private/LegacyProtocol.test.js +20 -20
- package/esm/automation/private/Protocol.d.ts +22 -22
- package/esm/automation/private/Protocol.js +38 -38
- package/esm/automation/private/Protocol.test.d.ts +1 -1
- package/esm/automation/private/Protocol.test.js +20 -20
- package/esm/automation/private/StrategiesAutomation.d.ts +33 -33
- package/esm/automation/private/StrategiesAutomation.js +183 -183
- package/esm/automation/private/StrategiesAutomation.test.d.ts +1 -1
- package/esm/automation/private/StrategiesAutomation.test.js +666 -666
- package/esm/automation/public/ArbitrumStrategies.d.ts +5 -5
- package/esm/automation/public/ArbitrumStrategies.js +7 -7
- package/esm/automation/public/BaseStrategies.d.ts +5 -5
- package/esm/automation/public/BaseStrategies.js +7 -7
- package/esm/automation/public/EthereumStrategies.d.ts +5 -5
- package/esm/automation/public/EthereumStrategies.js +7 -7
- package/esm/automation/public/OptimismStrategies.d.ts +5 -5
- package/esm/automation/public/OptimismStrategies.js +7 -7
- package/esm/automation/public/Strategies.test.d.ts +1 -1
- package/esm/automation/public/Strategies.test.js +56 -56
- package/esm/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyAaveAutomation.js +14 -14
- package/esm/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyCompoundAutomation.js +14 -14
- package/esm/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyMakerAutomation.js +14 -14
- package/esm/configuration.d.ts +1 -1
- package/esm/configuration.js +7 -7
- package/esm/constants/index.d.ts +28 -28
- package/esm/constants/index.js +558 -558
- package/esm/index.d.ts +23 -23
- package/esm/index.js +23 -23
- package/esm/services/contractService.d.ts +12 -12
- package/esm/services/contractService.js +45 -45
- package/esm/services/ethereumService.d.ts +7 -7
- package/esm/services/ethereumService.js +41 -41
- package/esm/services/ethereumService.test.d.ts +1 -1
- package/esm/services/ethereumService.test.js +237 -237
- package/esm/services/strategiesService.d.ts +2 -2
- package/esm/services/strategiesService.js +868 -868
- package/esm/services/strategiesService.test.d.ts +1 -1
- package/esm/services/strategiesService.test.js +108 -108
- package/esm/services/strategySubService.d.ts +110 -110
- package/esm/services/strategySubService.js +279 -279
- package/esm/services/strategySubService.test.d.ts +1 -1
- package/esm/services/strategySubService.test.js +908 -908
- package/esm/services/subDataService.d.ts +254 -254
- package/esm/services/subDataService.js +663 -663
- package/esm/services/subDataService.test.d.ts +1 -1
- package/esm/services/subDataService.test.js +1254 -1254
- package/esm/services/triggerService.d.ts +234 -234
- package/esm/services/triggerService.js +418 -418
- package/esm/services/triggerService.test.d.ts +1 -1
- package/esm/services/triggerService.test.js +901 -901
- package/esm/services/utils.d.ts +30 -30
- package/esm/services/utils.js +131 -131
- package/esm/services/utils.test.d.ts +1 -1
- package/esm/services/utils.test.js +348 -348
- package/esm/types/contracts/generated/Erc20.d.ts +53 -53
- package/esm/types/contracts/generated/Erc20.js +4 -4
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.js +4 -4
- package/esm/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
- package/esm/types/contracts/generated/Legacy_AuthCheck.js +4 -4
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +4 -4
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.js +4 -4
- package/esm/types/contracts/generated/SubStorage.d.ts +114 -114
- package/esm/types/contracts/generated/SubStorage.js +4 -4
- package/esm/types/contracts/generated/UniMulticall.d.ts +55 -55
- package/esm/types/contracts/generated/UniMulticall.js +4 -4
- package/esm/types/contracts/generated/index.d.ts +7 -7
- package/esm/types/contracts/generated/index.js +1 -1
- package/esm/types/contracts/generated/types.d.ts +54 -54
- package/esm/types/contracts/generated/types.js +1 -1
- package/esm/types/enums.d.ts +226 -226
- package/esm/types/enums.js +249 -249
- package/esm/types/index.d.ts +248 -248
- package/esm/types/index.js +1 -1
- package/package.json +60 -60
- package/scripts/generateContractTypes.js +39 -39
- package/src/abis/Erc20.json +222 -222
- package/src/abis/SubStorage.json +21 -21
- package/src/abis/UniMulticall.json +17 -17
- package/src/abis/index.ts +28 -28
- package/src/abis/legacy_AaveV2Subscriptions.json +7 -7
- package/src/abis/legacy_AuthCheck.json +7 -7
- package/src/abis/legacy_CompoundV2Subscriptions.json +8 -8
- package/src/abis/legacy_MakerSubscriptions.json +8 -8
- package/src/automation/private/Automation.ts +44 -44
- package/src/automation/private/LegacyAutomation.ts +135 -135
- package/src/automation/private/LegacyProtocol.test.ts +23 -23
- package/src/automation/private/LegacyProtocol.ts +51 -51
- package/src/automation/private/Protocol.test.ts +23 -23
- package/src/automation/private/Protocol.ts +51 -51
- package/src/automation/private/StrategiesAutomation.test.ts +663 -663
- package/src/automation/private/StrategiesAutomation.ts +254 -254
- package/src/automation/public/ArbitrumStrategies.ts +10 -10
- package/src/automation/public/BaseStrategies.ts +10 -10
- package/src/automation/public/EthereumStrategies.ts +10 -10
- package/src/automation/public/OptimismStrategies.ts +10 -10
- package/src/automation/public/Strategies.test.ts +49 -49
- package/src/automation/public/legacy/LegacyAaveAutomation.ts +20 -20
- package/src/automation/public/legacy/LegacyCompoundAutomation.ts +20 -20
- package/src/automation/public/legacy/LegacyMakerAutomation.ts +20 -20
- package/src/configuration.ts +8 -8
- package/src/constants/index.ts +593 -593
- package/src/index.ts +39 -39
- package/src/services/contractService.ts +77 -77
- package/src/services/ethereumService.test.ts +257 -257
- package/src/services/ethereumService.ts +69 -69
- package/src/services/strategiesService.test.ts +105 -105
- package/src/services/strategiesService.ts +1158 -1158
- package/src/services/strategySubService.test.ts +1122 -1122
- package/src/services/strategySubService.ts +634 -634
- package/src/services/subDataService.test.ts +1387 -1387
- package/src/services/subDataService.ts +914 -914
- package/src/services/triggerService.test.ts +1004 -1004
- package/src/services/triggerService.ts +573 -573
- package/src/services/utils.test.ts +430 -430
- package/src/services/utils.ts +162 -162
- package/src/types/enums.ts +246 -246
- package/src/types/index.ts +312 -312
- package/tsconfig.esm.json +8 -8
- package/tsconfig.json +22 -22
- package/.env +0 -4
package/src/constants/index.ts
CHANGED
|
@@ -1,593 +1,593 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ArbitrumBundleInfo,
|
|
3
|
-
ArbitrumStrategiesInfo,
|
|
4
|
-
BundlesInfo,
|
|
5
|
-
EthereumAddress,
|
|
6
|
-
Interfaces,
|
|
7
|
-
MainnetBundleInfo,
|
|
8
|
-
MainnetStrategiesInfo,
|
|
9
|
-
OptimismBundleInfo,
|
|
10
|
-
OptimismStrategiesInfo,
|
|
11
|
-
BaseBundleInfo,
|
|
12
|
-
BaseStrategiesInfo,
|
|
13
|
-
StrategiesInfo,
|
|
14
|
-
} from '../types';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
ChainId, ProtocolIdentifiers, Strategies, Bundles, BundleProtocols,
|
|
18
|
-
} from '../types/enums';
|
|
19
|
-
|
|
20
|
-
import Protocol from '../automation/private/Protocol';
|
|
21
|
-
import LegacyProtocol from '../automation/private/LegacyProtocol';
|
|
22
|
-
|
|
23
|
-
// General
|
|
24
|
-
export const ZERO_ADDRESS: EthereumAddress = '0x0000000000000000000000000000000000000000';
|
|
25
|
-
|
|
26
|
-
export const AAVE_V3_VARIABLE_BORROW_RATE = 2;
|
|
27
|
-
|
|
28
|
-
export const PROTOCOLS: Record<keyof typeof ProtocolIdentifiers.StrategiesAutomation, Interfaces.Protocol> = (() => {
|
|
29
|
-
const protocolsMapping: any = {};
|
|
30
|
-
Object.entries(ProtocolIdentifiers.StrategiesAutomation).forEach(([id, value]) => {
|
|
31
|
-
protocolsMapping[id] = new Protocol({ id: value });
|
|
32
|
-
});
|
|
33
|
-
return protocolsMapping;
|
|
34
|
-
})();
|
|
35
|
-
|
|
36
|
-
export const LEGACY_PROTOCOLS: Record<keyof typeof ProtocolIdentifiers.LegacyAutomation, Interfaces.LegacyProtocol> = (() => {
|
|
37
|
-
const protocolsMapping: any = {};
|
|
38
|
-
Object.entries(ProtocolIdentifiers.LegacyAutomation).forEach(([id, value]) => {
|
|
39
|
-
protocolsMapping[id] = new LegacyProtocol({ id: value });
|
|
40
|
-
});
|
|
41
|
-
return protocolsMapping;
|
|
42
|
-
})();
|
|
43
|
-
|
|
44
|
-
// Strategies info
|
|
45
|
-
export const MAINNET_STRATEGIES_INFO: MainnetStrategiesInfo = {
|
|
46
|
-
[Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_DAI]: {
|
|
47
|
-
strategyOrBundleId: Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_DAI,
|
|
48
|
-
strategyId: Strategies.Identifiers.CloseOnPriceToDebt,
|
|
49
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
50
|
-
},
|
|
51
|
-
[Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_COLL]: {
|
|
52
|
-
strategyOrBundleId: Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_COLL,
|
|
53
|
-
strategyId: Strategies.Identifiers.CloseOnPriceToColl,
|
|
54
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
55
|
-
},
|
|
56
|
-
[Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED]: {
|
|
57
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED,
|
|
58
|
-
strategyId: Strategies.Identifiers.CloseOnPriceToColl,
|
|
59
|
-
protocol: PROTOCOLS.Liquity,
|
|
60
|
-
},
|
|
61
|
-
[Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL]: {
|
|
62
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL,
|
|
63
|
-
strategyId: Strategies.Identifiers.CloseOnPriceToColl,
|
|
64
|
-
protocol: PROTOCOLS.Liquity,
|
|
65
|
-
},
|
|
66
|
-
[Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_COLL]: {
|
|
67
|
-
strategyOrBundleId: Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_COLL,
|
|
68
|
-
strategyId: Strategies.Identifiers.TrailingStopToColl,
|
|
69
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
70
|
-
},
|
|
71
|
-
[Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_DAI]: {
|
|
72
|
-
strategyOrBundleId: Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_DAI,
|
|
73
|
-
strategyId: Strategies.Identifiers.TrailingStopToDebt,
|
|
74
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
75
|
-
},
|
|
76
|
-
[Strategies.MainnetIds.LIQUITY_TRAILING_STOP_LOSS_TO_COLL]: {
|
|
77
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_TRAILING_STOP_LOSS_TO_COLL,
|
|
78
|
-
strategyId: Strategies.Identifiers.TrailingStopToColl,
|
|
79
|
-
protocol: PROTOCOLS.Liquity,
|
|
80
|
-
},
|
|
81
|
-
[Strategies.MainnetIds.CHICKEN_BONDS_REBOND]: {
|
|
82
|
-
strategyOrBundleId: Strategies.MainnetIds.CHICKEN_BONDS_REBOND,
|
|
83
|
-
strategyId: Strategies.Identifiers.Rebond,
|
|
84
|
-
protocol: PROTOCOLS.ChickenBonds,
|
|
85
|
-
},
|
|
86
|
-
[Strategies.MainnetIds.EXCHANGE_DCA]: {
|
|
87
|
-
strategyOrBundleId: Strategies.MainnetIds.EXCHANGE_DCA,
|
|
88
|
-
strategyId: Strategies.Identifiers.Dca,
|
|
89
|
-
protocol: PROTOCOLS.Exchange,
|
|
90
|
-
},
|
|
91
|
-
[Strategies.MainnetIds.EXCHANGE_LIMIT_ORDER]: {
|
|
92
|
-
strategyOrBundleId: Strategies.MainnetIds.EXCHANGE_LIMIT_ORDER,
|
|
93
|
-
strategyId: Strategies.Identifiers.LimitOrder,
|
|
94
|
-
protocol: PROTOCOLS.Exchange,
|
|
95
|
-
},
|
|
96
|
-
[Strategies.MainnetIds.LIQUITY_DSR_PAYBACK]: {
|
|
97
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_DSR_PAYBACK,
|
|
98
|
-
strategyId: Strategies.Identifiers.SavingsDsrPayback,
|
|
99
|
-
protocol: PROTOCOLS.Liquity,
|
|
100
|
-
},
|
|
101
|
-
[Strategies.MainnetIds.LIQUITY_DSR_SUPPLY]: {
|
|
102
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_DSR_SUPPLY,
|
|
103
|
-
strategyId: Strategies.Identifiers.SavingsDsrSupply,
|
|
104
|
-
protocol: PROTOCOLS.Liquity,
|
|
105
|
-
},
|
|
106
|
-
[Strategies.MainnetIds.LIQUITY_DEBT_IN_FRONT_REPAY]: {
|
|
107
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_DEBT_IN_FRONT_REPAY,
|
|
108
|
-
strategyId: Strategies.Identifiers.DebtInFrontRepay,
|
|
109
|
-
protocol: PROTOCOLS.Liquity,
|
|
110
|
-
},
|
|
111
|
-
[Strategies.MainnetIds.CURVEUSD_PAYBACK]: {
|
|
112
|
-
strategyOrBundleId: Strategies.MainnetIds.CURVEUSD_PAYBACK,
|
|
113
|
-
strategyId: Strategies.Identifiers.Payback,
|
|
114
|
-
protocol: PROTOCOLS.CrvUSD,
|
|
115
|
-
},
|
|
116
|
-
[Strategies.MainnetIds.LIQUITY_V2_PAYBACK]: {
|
|
117
|
-
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_V2_PAYBACK,
|
|
118
|
-
strategyId: Strategies.Identifiers.Payback,
|
|
119
|
-
protocol: PROTOCOLS.LiquityV2,
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const OPTIMISM_STRATEGIES_INFO: OptimismStrategiesInfo = {
|
|
124
|
-
[Strategies.OptimismIds.EXCHANGE_DCA]: {
|
|
125
|
-
strategyOrBundleId: Strategies.OptimismIds.EXCHANGE_DCA,
|
|
126
|
-
strategyId: Strategies.Identifiers.Dca,
|
|
127
|
-
protocol: PROTOCOLS.Exchange,
|
|
128
|
-
},
|
|
129
|
-
[Strategies.OptimismIds.EXCHANGE_LIMIT_ORDER]: {
|
|
130
|
-
strategyOrBundleId: Strategies.OptimismIds.EXCHANGE_LIMIT_ORDER,
|
|
131
|
-
strategyId: Strategies.Identifiers.LimitOrder,
|
|
132
|
-
protocol: PROTOCOLS.Exchange,
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export const BASE_STRATEGIES_INFO: BaseStrategiesInfo = {
|
|
137
|
-
[Strategies.BaseIds.EXCHANGE_DCA]: {
|
|
138
|
-
strategyOrBundleId: Strategies.BaseIds.EXCHANGE_DCA,
|
|
139
|
-
strategyId: Strategies.Identifiers.Dca,
|
|
140
|
-
protocol: PROTOCOLS.Exchange,
|
|
141
|
-
},
|
|
142
|
-
[Strategies.BaseIds.EXCHANGE_LIMIT_ORDER]: {
|
|
143
|
-
strategyOrBundleId: Strategies.BaseIds.EXCHANGE_LIMIT_ORDER,
|
|
144
|
-
strategyId: Strategies.Identifiers.LimitOrder,
|
|
145
|
-
protocol: PROTOCOLS.Exchange,
|
|
146
|
-
},
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const ARBITRUM_STRATEGIES_INFO: ArbitrumStrategiesInfo = {
|
|
150
|
-
[Strategies.ArbitrumIds.EXCHANGE_DCA]: {
|
|
151
|
-
strategyOrBundleId: Strategies.ArbitrumIds.EXCHANGE_DCA,
|
|
152
|
-
strategyId: Strategies.Identifiers.Dca,
|
|
153
|
-
protocol: PROTOCOLS.Exchange,
|
|
154
|
-
},
|
|
155
|
-
[Strategies.ArbitrumIds.EXCHANGE_LIMIT_ORDER]: {
|
|
156
|
-
strategyOrBundleId: Strategies.ArbitrumIds.EXCHANGE_LIMIT_ORDER,
|
|
157
|
-
strategyId: Strategies.Identifiers.LimitOrder,
|
|
158
|
-
protocol: PROTOCOLS.Exchange,
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export const STRATEGIES_INFO: StrategiesInfo = {
|
|
163
|
-
[ChainId.Ethereum]: MAINNET_STRATEGIES_INFO,
|
|
164
|
-
[ChainId.Optimism]: OPTIMISM_STRATEGIES_INFO,
|
|
165
|
-
[ChainId.Arbitrum]: ARBITRUM_STRATEGIES_INFO,
|
|
166
|
-
[ChainId.Base]: BASE_STRATEGIES_INFO,
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export const STRATEGY_IDS = {
|
|
170
|
-
[ChainId.Ethereum]: Strategies.MainnetIds,
|
|
171
|
-
[ChainId.Optimism]: Strategies.OptimismIds,
|
|
172
|
-
[ChainId.Arbitrum]: Strategies.ArbitrumIds,
|
|
173
|
-
[ChainId.Base]: Strategies.BaseIds,
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
// Bundles info
|
|
177
|
-
export const MAINNET_BUNDLES_INFO: MainnetBundleInfo = {
|
|
178
|
-
[Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_YEARN]: {
|
|
179
|
-
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_YEARN,
|
|
180
|
-
bundleId: BundleProtocols.Yearn,
|
|
181
|
-
bundleName: 'Yearn',
|
|
182
|
-
strategyId: Strategies.Identifiers.SavingsLiqProtection,
|
|
183
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
184
|
-
},
|
|
185
|
-
[Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_MSTABLE]: {
|
|
186
|
-
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_MSTABLE,
|
|
187
|
-
bundleId: BundleProtocols.MStable,
|
|
188
|
-
bundleName: 'mStable',
|
|
189
|
-
strategyId: Strategies.Identifiers.SavingsLiqProtection,
|
|
190
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
191
|
-
},
|
|
192
|
-
[Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_RARI]: {
|
|
193
|
-
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_RARI,
|
|
194
|
-
bundleId: BundleProtocols.Rari,
|
|
195
|
-
bundleName: 'Rari',
|
|
196
|
-
strategyId: Strategies.Identifiers.SavingsLiqProtection,
|
|
197
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
198
|
-
},
|
|
199
|
-
[Bundles.MainnetIds.COMP_V3_SW_REPAY_BUNDLE]: {
|
|
200
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
201
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
202
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
203
|
-
},
|
|
204
|
-
[Bundles.MainnetIds.COMP_V3_SW_BOOST_BUNDLE]: {
|
|
205
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_BOOST_BUNDLE,
|
|
206
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
207
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
208
|
-
},
|
|
209
|
-
[Bundles.MainnetIds.COMP_V3_EOA_REPAY_BUNDLE]: {
|
|
210
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_REPAY_BUNDLE,
|
|
211
|
-
strategyId: Strategies.Identifiers.EoaRepay,
|
|
212
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
213
|
-
},
|
|
214
|
-
[Bundles.MainnetIds.COMP_V3_EOA_BOOST_BUNDLE]: {
|
|
215
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_BOOST_BUNDLE,
|
|
216
|
-
strategyId: Strategies.Identifiers.EoaBoost,
|
|
217
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
218
|
-
},
|
|
219
|
-
[Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE]: {
|
|
220
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE,
|
|
221
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
222
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
223
|
-
},
|
|
224
|
-
[Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE]: {
|
|
225
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE,
|
|
226
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
227
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
228
|
-
},
|
|
229
|
-
[Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE]: {
|
|
230
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE,
|
|
231
|
-
strategyId: Strategies.Identifiers.EoaRepay,
|
|
232
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
233
|
-
},
|
|
234
|
-
[Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE]: {
|
|
235
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE,
|
|
236
|
-
strategyId: Strategies.Identifiers.EoaBoost,
|
|
237
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
238
|
-
},
|
|
239
|
-
[Bundles.MainnetIds.LIQUITY_PAYBACK_USING_CHICKEN_BOND]: {
|
|
240
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_PAYBACK_USING_CHICKEN_BOND,
|
|
241
|
-
strategyId: Strategies.Identifiers.BondProtection,
|
|
242
|
-
protocol: PROTOCOLS.Liquity,
|
|
243
|
-
},
|
|
244
|
-
[Bundles.MainnetIds.AAVE_V3_REPAY]: {
|
|
245
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_REPAY,
|
|
246
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
247
|
-
protocol: PROTOCOLS.AaveV3,
|
|
248
|
-
},
|
|
249
|
-
[Bundles.MainnetIds.AAVE_V3_BOOST]: {
|
|
250
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_BOOST,
|
|
251
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
252
|
-
protocol: PROTOCOLS.AaveV3,
|
|
253
|
-
},
|
|
254
|
-
[Bundles.MainnetIds.MAKER_REPAY]: {
|
|
255
|
-
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY,
|
|
256
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
257
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
258
|
-
},
|
|
259
|
-
[Bundles.MainnetIds.MAKER_BOOST]: {
|
|
260
|
-
strategyOrBundleId: Bundles.MainnetIds.MAKER_BOOST,
|
|
261
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
262
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
263
|
-
},
|
|
264
|
-
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
265
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
266
|
-
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
267
|
-
protocol: PROTOCOLS.AaveV3,
|
|
268
|
-
},
|
|
269
|
-
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT_WITH_GAS_PRICE]: {
|
|
270
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT_WITH_GAS_PRICE,
|
|
271
|
-
strategyId: Strategies.Identifiers.CloseToDebtWithGasPrice,
|
|
272
|
-
protocol: PROTOCOLS.AaveV3,
|
|
273
|
-
},
|
|
274
|
-
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
275
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
276
|
-
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
277
|
-
protocol: PROTOCOLS.AaveV3,
|
|
278
|
-
},
|
|
279
|
-
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL_WITH_GAS_PRICE]: {
|
|
280
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL_WITH_GAS_PRICE,
|
|
281
|
-
strategyId: Strategies.Identifiers.CloseToCollateralWithGasPrice,
|
|
282
|
-
protocol: PROTOCOLS.AaveV3,
|
|
283
|
-
},
|
|
284
|
-
[Bundles.MainnetIds.MORPHO_AAVE_V2_REPAY]: {
|
|
285
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_AAVE_V2_REPAY,
|
|
286
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
287
|
-
protocol: PROTOCOLS.MorphoAaveV2,
|
|
288
|
-
},
|
|
289
|
-
[Bundles.MainnetIds.MORPHO_AAVE_V2_BOOST]: {
|
|
290
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_AAVE_V2_BOOST,
|
|
291
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
292
|
-
protocol: PROTOCOLS.MorphoAaveV2,
|
|
293
|
-
},
|
|
294
|
-
[Bundles.MainnetIds.LIQUITY_REPAY]: {
|
|
295
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_REPAY,
|
|
296
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
297
|
-
protocol: PROTOCOLS.Liquity,
|
|
298
|
-
},
|
|
299
|
-
[Bundles.MainnetIds.LIQUITY_BOOST]: {
|
|
300
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_BOOST,
|
|
301
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
302
|
-
protocol: PROTOCOLS.Liquity,
|
|
303
|
-
},
|
|
304
|
-
[Bundles.MainnetIds.SPARK_REPAY]: {
|
|
305
|
-
strategyOrBundleId: Bundles.MainnetIds.SPARK_REPAY,
|
|
306
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
307
|
-
protocol: PROTOCOLS.Spark,
|
|
308
|
-
},
|
|
309
|
-
[Bundles.MainnetIds.SPARK_BOOST]: {
|
|
310
|
-
strategyOrBundleId: Bundles.MainnetIds.SPARK_BOOST,
|
|
311
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
312
|
-
protocol: PROTOCOLS.Spark,
|
|
313
|
-
},
|
|
314
|
-
[Bundles.MainnetIds.SPARK_CLOSE_TO_DEBT]: {
|
|
315
|
-
strategyOrBundleId: Bundles.MainnetIds.SPARK_CLOSE_TO_DEBT,
|
|
316
|
-
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
317
|
-
protocol: PROTOCOLS.Spark,
|
|
318
|
-
},
|
|
319
|
-
[Bundles.MainnetIds.SPARK_CLOSE_TO_COLLATERAL]: {
|
|
320
|
-
strategyOrBundleId: Bundles.MainnetIds.SPARK_CLOSE_TO_COLLATERAL,
|
|
321
|
-
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
322
|
-
protocol: PROTOCOLS.Spark,
|
|
323
|
-
},
|
|
324
|
-
[Bundles.MainnetIds.AAVE_V2_REPAY]: {
|
|
325
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V2_REPAY,
|
|
326
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
327
|
-
protocol: PROTOCOLS.AaveV2,
|
|
328
|
-
},
|
|
329
|
-
[Bundles.MainnetIds.AAVE_V2_BOOST]: {
|
|
330
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V2_BOOST,
|
|
331
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
332
|
-
protocol: PROTOCOLS.AaveV2,
|
|
333
|
-
},
|
|
334
|
-
[Bundles.MainnetIds.COMP_V2_REPAY]: {
|
|
335
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V2_REPAY,
|
|
336
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
337
|
-
protocol: PROTOCOLS.CompoundV2,
|
|
338
|
-
},
|
|
339
|
-
[Bundles.MainnetIds.COMP_V2_BOOST]: {
|
|
340
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V2_BOOST,
|
|
341
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
342
|
-
protocol: PROTOCOLS.CompoundV2,
|
|
343
|
-
},
|
|
344
|
-
[Bundles.MainnetIds.CRVUSD_REPAY]: {
|
|
345
|
-
strategyOrBundleId: Bundles.MainnetIds.CRVUSD_REPAY,
|
|
346
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
347
|
-
protocol: PROTOCOLS.CrvUSD,
|
|
348
|
-
},
|
|
349
|
-
[Bundles.MainnetIds.CRVUSD_BOOST]: {
|
|
350
|
-
strategyOrBundleId: Bundles.MainnetIds.CRVUSD_BOOST,
|
|
351
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
352
|
-
protocol: PROTOCOLS.CrvUSD,
|
|
353
|
-
},
|
|
354
|
-
[Bundles.MainnetIds.MORPHO_BLUE_REPAY]: {
|
|
355
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_REPAY,
|
|
356
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
357
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
358
|
-
},
|
|
359
|
-
[Bundles.MainnetIds.MORPHO_BLUE_BOOST]: {
|
|
360
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_BOOST,
|
|
361
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
362
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
363
|
-
},
|
|
364
|
-
[Bundles.MainnetIds.MORPHO_BLUE_EOA_REPAY]: {
|
|
365
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_REPAY,
|
|
366
|
-
strategyId: Strategies.Identifiers.EoaRepay,
|
|
367
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
368
|
-
},
|
|
369
|
-
[Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST]: {
|
|
370
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST,
|
|
371
|
-
strategyId: Strategies.Identifiers.EoaBoost,
|
|
372
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
373
|
-
},
|
|
374
|
-
[Bundles.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
375
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
376
|
-
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
377
|
-
protocol: PROTOCOLS.AaveV3,
|
|
378
|
-
},
|
|
379
|
-
[Bundles.MainnetIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
380
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_REPAY_ON_PRICE,
|
|
381
|
-
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
382
|
-
protocol: PROTOCOLS.AaveV3,
|
|
383
|
-
},
|
|
384
|
-
[Bundles.MainnetIds.LIQUITY_V2_REPAY]: {
|
|
385
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_REPAY,
|
|
386
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
387
|
-
protocol: PROTOCOLS.LiquityV2,
|
|
388
|
-
},
|
|
389
|
-
[Bundles.MainnetIds.LIQUITY_V2_BOOST]: {
|
|
390
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_BOOST,
|
|
391
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
392
|
-
protocol: PROTOCOLS.LiquityV2,
|
|
393
|
-
},
|
|
394
|
-
[Bundles.MainnetIds.LIQUITY_V2_CLOSE]: {
|
|
395
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_CLOSE,
|
|
396
|
-
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
397
|
-
protocol: PROTOCOLS.LiquityV2,
|
|
398
|
-
},
|
|
399
|
-
[Bundles.MainnetIds.LIQUITY_V2_REPAY_ON_PRICE]: {
|
|
400
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_REPAY_ON_PRICE,
|
|
401
|
-
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
402
|
-
protocol: PROTOCOLS.LiquityV2,
|
|
403
|
-
},
|
|
404
|
-
[Bundles.MainnetIds.LIQUITY_V2_BOOST_ON_PRICE]: {
|
|
405
|
-
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_BOOST_ON_PRICE,
|
|
406
|
-
strategyId: Strategies.Identifiers.BoostOnPrice,
|
|
407
|
-
protocol: PROTOCOLS.LiquityV2,
|
|
408
|
-
},
|
|
409
|
-
[Bundles.MainnetIds.MORPHO_BLUE_BOOST_ON_PRICE]: {
|
|
410
|
-
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_BOOST_ON_PRICE,
|
|
411
|
-
strategyId: Strategies.Identifiers.BoostOnPrice,
|
|
412
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
413
|
-
},
|
|
414
|
-
[Bundles.MainnetIds.FLUID_T1_REPAY]: {
|
|
415
|
-
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_REPAY,
|
|
416
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
417
|
-
protocol: PROTOCOLS.FluidT1,
|
|
418
|
-
},
|
|
419
|
-
[Bundles.MainnetIds.FLUID_T1_BOOST]: {
|
|
420
|
-
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_BOOST,
|
|
421
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
422
|
-
protocol: PROTOCOLS.FluidT1,
|
|
423
|
-
},
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
export const OPTIMISM_BUNDLES_INFO: OptimismBundleInfo = {
|
|
427
|
-
[Bundles.OptimismIds.AAVE_V3_REPAY]: {
|
|
428
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_REPAY,
|
|
429
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
430
|
-
protocol: PROTOCOLS.AaveV3,
|
|
431
|
-
},
|
|
432
|
-
[Bundles.OptimismIds.AAVE_V3_BOOST]: {
|
|
433
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_BOOST,
|
|
434
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
435
|
-
protocol: PROTOCOLS.AaveV3,
|
|
436
|
-
},
|
|
437
|
-
[Bundles.OptimismIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
438
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
439
|
-
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
440
|
-
protocol: PROTOCOLS.AaveV3,
|
|
441
|
-
},
|
|
442
|
-
[Bundles.OptimismIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
443
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
444
|
-
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
445
|
-
protocol: PROTOCOLS.AaveV3,
|
|
446
|
-
},
|
|
447
|
-
[Bundles.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
448
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
449
|
-
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
450
|
-
protocol: PROTOCOLS.AaveV3,
|
|
451
|
-
},
|
|
452
|
-
[Bundles.OptimismIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
453
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_REPAY_ON_PRICE,
|
|
454
|
-
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
455
|
-
protocol: PROTOCOLS.AaveV3,
|
|
456
|
-
},
|
|
457
|
-
};
|
|
458
|
-
|
|
459
|
-
export const BASE_BUNDLES_INFO: BaseBundleInfo = {
|
|
460
|
-
[Bundles.BaseIds.AAVE_V3_REPAY]: {
|
|
461
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_REPAY,
|
|
462
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
463
|
-
protocol: PROTOCOLS.AaveV3,
|
|
464
|
-
},
|
|
465
|
-
[Bundles.BaseIds.AAVE_V3_BOOST]: {
|
|
466
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_BOOST,
|
|
467
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
468
|
-
protocol: PROTOCOLS.AaveV3,
|
|
469
|
-
},
|
|
470
|
-
[Bundles.BaseIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
471
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
472
|
-
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
473
|
-
protocol: PROTOCOLS.AaveV3,
|
|
474
|
-
},
|
|
475
|
-
[Bundles.BaseIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
476
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
477
|
-
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
478
|
-
protocol: PROTOCOLS.AaveV3,
|
|
479
|
-
},
|
|
480
|
-
[Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE]: {
|
|
481
|
-
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE,
|
|
482
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
483
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
484
|
-
},
|
|
485
|
-
[Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE]: {
|
|
486
|
-
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
487
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
488
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
489
|
-
},
|
|
490
|
-
[Bundles.BaseIds.MORPHO_BLUE_REPAY]: {
|
|
491
|
-
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_REPAY,
|
|
492
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
493
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
494
|
-
},
|
|
495
|
-
[Bundles.BaseIds.MORPHO_BLUE_BOOST]: {
|
|
496
|
-
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_BOOST,
|
|
497
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
498
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
499
|
-
},
|
|
500
|
-
[Bundles.BaseIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
501
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
502
|
-
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
503
|
-
protocol: PROTOCOLS.AaveV3,
|
|
504
|
-
},
|
|
505
|
-
[Bundles.BaseIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
506
|
-
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_REPAY_ON_PRICE,
|
|
507
|
-
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
508
|
-
protocol: PROTOCOLS.AaveV3,
|
|
509
|
-
},
|
|
510
|
-
[Bundles.BaseIds.MORPHO_BLUE_BOOST_ON_PRICE]: {
|
|
511
|
-
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_BOOST_ON_PRICE,
|
|
512
|
-
strategyId: Strategies.Identifiers.BoostOnPrice,
|
|
513
|
-
protocol: PROTOCOLS.MorphoBlue,
|
|
514
|
-
},
|
|
515
|
-
[Bundles.BaseIds.FLUID_T1_REPAY]: {
|
|
516
|
-
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_REPAY,
|
|
517
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
518
|
-
protocol: PROTOCOLS.FluidT1,
|
|
519
|
-
},
|
|
520
|
-
[Bundles.BaseIds.FLUID_T1_BOOST]: {
|
|
521
|
-
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_BOOST,
|
|
522
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
523
|
-
protocol: PROTOCOLS.FluidT1,
|
|
524
|
-
},
|
|
525
|
-
};
|
|
526
|
-
|
|
527
|
-
export const ARBITRUM_BUNDLES_INFO: ArbitrumBundleInfo = {
|
|
528
|
-
[Bundles.ArbitrumIds.AAVE_V3_REPAY]: {
|
|
529
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_REPAY,
|
|
530
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
531
|
-
protocol: PROTOCOLS.AaveV3,
|
|
532
|
-
},
|
|
533
|
-
[Bundles.ArbitrumIds.AAVE_V3_BOOST]: {
|
|
534
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_BOOST,
|
|
535
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
536
|
-
protocol: PROTOCOLS.AaveV3,
|
|
537
|
-
},
|
|
538
|
-
[Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
539
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
540
|
-
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
541
|
-
protocol: PROTOCOLS.AaveV3,
|
|
542
|
-
},
|
|
543
|
-
[Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
544
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
545
|
-
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
546
|
-
protocol: PROTOCOLS.AaveV3,
|
|
547
|
-
},
|
|
548
|
-
[Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE]: {
|
|
549
|
-
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE,
|
|
550
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
551
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
552
|
-
},
|
|
553
|
-
[Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE]: {
|
|
554
|
-
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
555
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
556
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
557
|
-
},
|
|
558
|
-
[Bundles.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
559
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
560
|
-
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
561
|
-
protocol: PROTOCOLS.AaveV3,
|
|
562
|
-
},
|
|
563
|
-
[Bundles.ArbitrumIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
564
|
-
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_REPAY_ON_PRICE,
|
|
565
|
-
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
566
|
-
protocol: PROTOCOLS.AaveV3,
|
|
567
|
-
},
|
|
568
|
-
[Bundles.ArbitrumIds.FLUID_T1_REPAY]: {
|
|
569
|
-
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_REPAY,
|
|
570
|
-
strategyId: Strategies.Identifiers.Repay,
|
|
571
|
-
protocol: PROTOCOLS.FluidT1,
|
|
572
|
-
},
|
|
573
|
-
[Bundles.ArbitrumIds.FLUID_T1_BOOST]: {
|
|
574
|
-
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_BOOST,
|
|
575
|
-
strategyId: Strategies.Identifiers.Boost,
|
|
576
|
-
protocol: PROTOCOLS.FluidT1,
|
|
577
|
-
},
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
export const BUNDLES_INFO: BundlesInfo = {
|
|
581
|
-
[ChainId.Ethereum]: MAINNET_BUNDLES_INFO,
|
|
582
|
-
[ChainId.Optimism]: OPTIMISM_BUNDLES_INFO,
|
|
583
|
-
[ChainId.Arbitrum]: ARBITRUM_BUNDLES_INFO,
|
|
584
|
-
[ChainId.Base]: BASE_BUNDLES_INFO,
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
export const BUNDLE_IDS = {
|
|
588
|
-
[ChainId.Ethereum]: Bundles.MainnetIds,
|
|
589
|
-
[ChainId.Optimism]: Bundles.OptimismIds,
|
|
590
|
-
[ChainId.Arbitrum]: Bundles.ArbitrumIds,
|
|
591
|
-
[ChainId.Base]: Bundles.BaseIds,
|
|
592
|
-
|
|
593
|
-
};
|
|
1
|
+
import type {
|
|
2
|
+
ArbitrumBundleInfo,
|
|
3
|
+
ArbitrumStrategiesInfo,
|
|
4
|
+
BundlesInfo,
|
|
5
|
+
EthereumAddress,
|
|
6
|
+
Interfaces,
|
|
7
|
+
MainnetBundleInfo,
|
|
8
|
+
MainnetStrategiesInfo,
|
|
9
|
+
OptimismBundleInfo,
|
|
10
|
+
OptimismStrategiesInfo,
|
|
11
|
+
BaseBundleInfo,
|
|
12
|
+
BaseStrategiesInfo,
|
|
13
|
+
StrategiesInfo,
|
|
14
|
+
} from '../types';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
ChainId, ProtocolIdentifiers, Strategies, Bundles, BundleProtocols,
|
|
18
|
+
} from '../types/enums';
|
|
19
|
+
|
|
20
|
+
import Protocol from '../automation/private/Protocol';
|
|
21
|
+
import LegacyProtocol from '../automation/private/LegacyProtocol';
|
|
22
|
+
|
|
23
|
+
// General
|
|
24
|
+
export const ZERO_ADDRESS: EthereumAddress = '0x0000000000000000000000000000000000000000';
|
|
25
|
+
|
|
26
|
+
export const AAVE_V3_VARIABLE_BORROW_RATE = 2;
|
|
27
|
+
|
|
28
|
+
export const PROTOCOLS: Record<keyof typeof ProtocolIdentifiers.StrategiesAutomation, Interfaces.Protocol> = (() => {
|
|
29
|
+
const protocolsMapping: any = {};
|
|
30
|
+
Object.entries(ProtocolIdentifiers.StrategiesAutomation).forEach(([id, value]) => {
|
|
31
|
+
protocolsMapping[id] = new Protocol({ id: value });
|
|
32
|
+
});
|
|
33
|
+
return protocolsMapping;
|
|
34
|
+
})();
|
|
35
|
+
|
|
36
|
+
export const LEGACY_PROTOCOLS: Record<keyof typeof ProtocolIdentifiers.LegacyAutomation, Interfaces.LegacyProtocol> = (() => {
|
|
37
|
+
const protocolsMapping: any = {};
|
|
38
|
+
Object.entries(ProtocolIdentifiers.LegacyAutomation).forEach(([id, value]) => {
|
|
39
|
+
protocolsMapping[id] = new LegacyProtocol({ id: value });
|
|
40
|
+
});
|
|
41
|
+
return protocolsMapping;
|
|
42
|
+
})();
|
|
43
|
+
|
|
44
|
+
// Strategies info
|
|
45
|
+
export const MAINNET_STRATEGIES_INFO: MainnetStrategiesInfo = {
|
|
46
|
+
[Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_DAI]: {
|
|
47
|
+
strategyOrBundleId: Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_DAI,
|
|
48
|
+
strategyId: Strategies.Identifiers.CloseOnPriceToDebt,
|
|
49
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
50
|
+
},
|
|
51
|
+
[Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_COLL]: {
|
|
52
|
+
strategyOrBundleId: Strategies.MainnetIds.MAKER_CLOSE_ON_PRICE_TO_COLL,
|
|
53
|
+
strategyId: Strategies.Identifiers.CloseOnPriceToColl,
|
|
54
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
55
|
+
},
|
|
56
|
+
[Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED]: {
|
|
57
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED,
|
|
58
|
+
strategyId: Strategies.Identifiers.CloseOnPriceToColl,
|
|
59
|
+
protocol: PROTOCOLS.Liquity,
|
|
60
|
+
},
|
|
61
|
+
[Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL]: {
|
|
62
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_CLOSE_ON_PRICE_TO_COLL,
|
|
63
|
+
strategyId: Strategies.Identifiers.CloseOnPriceToColl,
|
|
64
|
+
protocol: PROTOCOLS.Liquity,
|
|
65
|
+
},
|
|
66
|
+
[Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_COLL]: {
|
|
67
|
+
strategyOrBundleId: Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_COLL,
|
|
68
|
+
strategyId: Strategies.Identifiers.TrailingStopToColl,
|
|
69
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
70
|
+
},
|
|
71
|
+
[Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_DAI]: {
|
|
72
|
+
strategyOrBundleId: Strategies.MainnetIds.MAKER_TRAILING_STOP_LOSS_TO_DAI,
|
|
73
|
+
strategyId: Strategies.Identifiers.TrailingStopToDebt,
|
|
74
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
75
|
+
},
|
|
76
|
+
[Strategies.MainnetIds.LIQUITY_TRAILING_STOP_LOSS_TO_COLL]: {
|
|
77
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_TRAILING_STOP_LOSS_TO_COLL,
|
|
78
|
+
strategyId: Strategies.Identifiers.TrailingStopToColl,
|
|
79
|
+
protocol: PROTOCOLS.Liquity,
|
|
80
|
+
},
|
|
81
|
+
[Strategies.MainnetIds.CHICKEN_BONDS_REBOND]: {
|
|
82
|
+
strategyOrBundleId: Strategies.MainnetIds.CHICKEN_BONDS_REBOND,
|
|
83
|
+
strategyId: Strategies.Identifiers.Rebond,
|
|
84
|
+
protocol: PROTOCOLS.ChickenBonds,
|
|
85
|
+
},
|
|
86
|
+
[Strategies.MainnetIds.EXCHANGE_DCA]: {
|
|
87
|
+
strategyOrBundleId: Strategies.MainnetIds.EXCHANGE_DCA,
|
|
88
|
+
strategyId: Strategies.Identifiers.Dca,
|
|
89
|
+
protocol: PROTOCOLS.Exchange,
|
|
90
|
+
},
|
|
91
|
+
[Strategies.MainnetIds.EXCHANGE_LIMIT_ORDER]: {
|
|
92
|
+
strategyOrBundleId: Strategies.MainnetIds.EXCHANGE_LIMIT_ORDER,
|
|
93
|
+
strategyId: Strategies.Identifiers.LimitOrder,
|
|
94
|
+
protocol: PROTOCOLS.Exchange,
|
|
95
|
+
},
|
|
96
|
+
[Strategies.MainnetIds.LIQUITY_DSR_PAYBACK]: {
|
|
97
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_DSR_PAYBACK,
|
|
98
|
+
strategyId: Strategies.Identifiers.SavingsDsrPayback,
|
|
99
|
+
protocol: PROTOCOLS.Liquity,
|
|
100
|
+
},
|
|
101
|
+
[Strategies.MainnetIds.LIQUITY_DSR_SUPPLY]: {
|
|
102
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_DSR_SUPPLY,
|
|
103
|
+
strategyId: Strategies.Identifiers.SavingsDsrSupply,
|
|
104
|
+
protocol: PROTOCOLS.Liquity,
|
|
105
|
+
},
|
|
106
|
+
[Strategies.MainnetIds.LIQUITY_DEBT_IN_FRONT_REPAY]: {
|
|
107
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_DEBT_IN_FRONT_REPAY,
|
|
108
|
+
strategyId: Strategies.Identifiers.DebtInFrontRepay,
|
|
109
|
+
protocol: PROTOCOLS.Liquity,
|
|
110
|
+
},
|
|
111
|
+
[Strategies.MainnetIds.CURVEUSD_PAYBACK]: {
|
|
112
|
+
strategyOrBundleId: Strategies.MainnetIds.CURVEUSD_PAYBACK,
|
|
113
|
+
strategyId: Strategies.Identifiers.Payback,
|
|
114
|
+
protocol: PROTOCOLS.CrvUSD,
|
|
115
|
+
},
|
|
116
|
+
[Strategies.MainnetIds.LIQUITY_V2_PAYBACK]: {
|
|
117
|
+
strategyOrBundleId: Strategies.MainnetIds.LIQUITY_V2_PAYBACK,
|
|
118
|
+
strategyId: Strategies.Identifiers.Payback,
|
|
119
|
+
protocol: PROTOCOLS.LiquityV2,
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export const OPTIMISM_STRATEGIES_INFO: OptimismStrategiesInfo = {
|
|
124
|
+
[Strategies.OptimismIds.EXCHANGE_DCA]: {
|
|
125
|
+
strategyOrBundleId: Strategies.OptimismIds.EXCHANGE_DCA,
|
|
126
|
+
strategyId: Strategies.Identifiers.Dca,
|
|
127
|
+
protocol: PROTOCOLS.Exchange,
|
|
128
|
+
},
|
|
129
|
+
[Strategies.OptimismIds.EXCHANGE_LIMIT_ORDER]: {
|
|
130
|
+
strategyOrBundleId: Strategies.OptimismIds.EXCHANGE_LIMIT_ORDER,
|
|
131
|
+
strategyId: Strategies.Identifiers.LimitOrder,
|
|
132
|
+
protocol: PROTOCOLS.Exchange,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const BASE_STRATEGIES_INFO: BaseStrategiesInfo = {
|
|
137
|
+
[Strategies.BaseIds.EXCHANGE_DCA]: {
|
|
138
|
+
strategyOrBundleId: Strategies.BaseIds.EXCHANGE_DCA,
|
|
139
|
+
strategyId: Strategies.Identifiers.Dca,
|
|
140
|
+
protocol: PROTOCOLS.Exchange,
|
|
141
|
+
},
|
|
142
|
+
[Strategies.BaseIds.EXCHANGE_LIMIT_ORDER]: {
|
|
143
|
+
strategyOrBundleId: Strategies.BaseIds.EXCHANGE_LIMIT_ORDER,
|
|
144
|
+
strategyId: Strategies.Identifiers.LimitOrder,
|
|
145
|
+
protocol: PROTOCOLS.Exchange,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const ARBITRUM_STRATEGIES_INFO: ArbitrumStrategiesInfo = {
|
|
150
|
+
[Strategies.ArbitrumIds.EXCHANGE_DCA]: {
|
|
151
|
+
strategyOrBundleId: Strategies.ArbitrumIds.EXCHANGE_DCA,
|
|
152
|
+
strategyId: Strategies.Identifiers.Dca,
|
|
153
|
+
protocol: PROTOCOLS.Exchange,
|
|
154
|
+
},
|
|
155
|
+
[Strategies.ArbitrumIds.EXCHANGE_LIMIT_ORDER]: {
|
|
156
|
+
strategyOrBundleId: Strategies.ArbitrumIds.EXCHANGE_LIMIT_ORDER,
|
|
157
|
+
strategyId: Strategies.Identifiers.LimitOrder,
|
|
158
|
+
protocol: PROTOCOLS.Exchange,
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export const STRATEGIES_INFO: StrategiesInfo = {
|
|
163
|
+
[ChainId.Ethereum]: MAINNET_STRATEGIES_INFO,
|
|
164
|
+
[ChainId.Optimism]: OPTIMISM_STRATEGIES_INFO,
|
|
165
|
+
[ChainId.Arbitrum]: ARBITRUM_STRATEGIES_INFO,
|
|
166
|
+
[ChainId.Base]: BASE_STRATEGIES_INFO,
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export const STRATEGY_IDS = {
|
|
170
|
+
[ChainId.Ethereum]: Strategies.MainnetIds,
|
|
171
|
+
[ChainId.Optimism]: Strategies.OptimismIds,
|
|
172
|
+
[ChainId.Arbitrum]: Strategies.ArbitrumIds,
|
|
173
|
+
[ChainId.Base]: Strategies.BaseIds,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// Bundles info
|
|
177
|
+
export const MAINNET_BUNDLES_INFO: MainnetBundleInfo = {
|
|
178
|
+
[Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_YEARN]: {
|
|
179
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_YEARN,
|
|
180
|
+
bundleId: BundleProtocols.Yearn,
|
|
181
|
+
bundleName: 'Yearn',
|
|
182
|
+
strategyId: Strategies.Identifiers.SavingsLiqProtection,
|
|
183
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
184
|
+
},
|
|
185
|
+
[Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_MSTABLE]: {
|
|
186
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_MSTABLE,
|
|
187
|
+
bundleId: BundleProtocols.MStable,
|
|
188
|
+
bundleName: 'mStable',
|
|
189
|
+
strategyId: Strategies.Identifiers.SavingsLiqProtection,
|
|
190
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
191
|
+
},
|
|
192
|
+
[Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_RARI]: {
|
|
193
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY_FROM_SMART_SAVINGS_RARI,
|
|
194
|
+
bundleId: BundleProtocols.Rari,
|
|
195
|
+
bundleName: 'Rari',
|
|
196
|
+
strategyId: Strategies.Identifiers.SavingsLiqProtection,
|
|
197
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
198
|
+
},
|
|
199
|
+
[Bundles.MainnetIds.COMP_V3_SW_REPAY_BUNDLE]: {
|
|
200
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
201
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
202
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
203
|
+
},
|
|
204
|
+
[Bundles.MainnetIds.COMP_V3_SW_BOOST_BUNDLE]: {
|
|
205
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_BOOST_BUNDLE,
|
|
206
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
207
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
208
|
+
},
|
|
209
|
+
[Bundles.MainnetIds.COMP_V3_EOA_REPAY_BUNDLE]: {
|
|
210
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_REPAY_BUNDLE,
|
|
211
|
+
strategyId: Strategies.Identifiers.EoaRepay,
|
|
212
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
213
|
+
},
|
|
214
|
+
[Bundles.MainnetIds.COMP_V3_EOA_BOOST_BUNDLE]: {
|
|
215
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_BOOST_BUNDLE,
|
|
216
|
+
strategyId: Strategies.Identifiers.EoaBoost,
|
|
217
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
218
|
+
},
|
|
219
|
+
[Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE]: {
|
|
220
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE,
|
|
221
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
222
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
223
|
+
},
|
|
224
|
+
[Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE]: {
|
|
225
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE,
|
|
226
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
227
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
228
|
+
},
|
|
229
|
+
[Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE]: {
|
|
230
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE,
|
|
231
|
+
strategyId: Strategies.Identifiers.EoaRepay,
|
|
232
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
233
|
+
},
|
|
234
|
+
[Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE]: {
|
|
235
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE,
|
|
236
|
+
strategyId: Strategies.Identifiers.EoaBoost,
|
|
237
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
238
|
+
},
|
|
239
|
+
[Bundles.MainnetIds.LIQUITY_PAYBACK_USING_CHICKEN_BOND]: {
|
|
240
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_PAYBACK_USING_CHICKEN_BOND,
|
|
241
|
+
strategyId: Strategies.Identifiers.BondProtection,
|
|
242
|
+
protocol: PROTOCOLS.Liquity,
|
|
243
|
+
},
|
|
244
|
+
[Bundles.MainnetIds.AAVE_V3_REPAY]: {
|
|
245
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_REPAY,
|
|
246
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
247
|
+
protocol: PROTOCOLS.AaveV3,
|
|
248
|
+
},
|
|
249
|
+
[Bundles.MainnetIds.AAVE_V3_BOOST]: {
|
|
250
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_BOOST,
|
|
251
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
252
|
+
protocol: PROTOCOLS.AaveV3,
|
|
253
|
+
},
|
|
254
|
+
[Bundles.MainnetIds.MAKER_REPAY]: {
|
|
255
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_REPAY,
|
|
256
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
257
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
258
|
+
},
|
|
259
|
+
[Bundles.MainnetIds.MAKER_BOOST]: {
|
|
260
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_BOOST,
|
|
261
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
262
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
263
|
+
},
|
|
264
|
+
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
265
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
266
|
+
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
267
|
+
protocol: PROTOCOLS.AaveV3,
|
|
268
|
+
},
|
|
269
|
+
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT_WITH_GAS_PRICE]: {
|
|
270
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_DEBT_WITH_GAS_PRICE,
|
|
271
|
+
strategyId: Strategies.Identifiers.CloseToDebtWithGasPrice,
|
|
272
|
+
protocol: PROTOCOLS.AaveV3,
|
|
273
|
+
},
|
|
274
|
+
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
275
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
276
|
+
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
277
|
+
protocol: PROTOCOLS.AaveV3,
|
|
278
|
+
},
|
|
279
|
+
[Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL_WITH_GAS_PRICE]: {
|
|
280
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_CLOSE_TO_COLLATERAL_WITH_GAS_PRICE,
|
|
281
|
+
strategyId: Strategies.Identifiers.CloseToCollateralWithGasPrice,
|
|
282
|
+
protocol: PROTOCOLS.AaveV3,
|
|
283
|
+
},
|
|
284
|
+
[Bundles.MainnetIds.MORPHO_AAVE_V2_REPAY]: {
|
|
285
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_AAVE_V2_REPAY,
|
|
286
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
287
|
+
protocol: PROTOCOLS.MorphoAaveV2,
|
|
288
|
+
},
|
|
289
|
+
[Bundles.MainnetIds.MORPHO_AAVE_V2_BOOST]: {
|
|
290
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_AAVE_V2_BOOST,
|
|
291
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
292
|
+
protocol: PROTOCOLS.MorphoAaveV2,
|
|
293
|
+
},
|
|
294
|
+
[Bundles.MainnetIds.LIQUITY_REPAY]: {
|
|
295
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_REPAY,
|
|
296
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
297
|
+
protocol: PROTOCOLS.Liquity,
|
|
298
|
+
},
|
|
299
|
+
[Bundles.MainnetIds.LIQUITY_BOOST]: {
|
|
300
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_BOOST,
|
|
301
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
302
|
+
protocol: PROTOCOLS.Liquity,
|
|
303
|
+
},
|
|
304
|
+
[Bundles.MainnetIds.SPARK_REPAY]: {
|
|
305
|
+
strategyOrBundleId: Bundles.MainnetIds.SPARK_REPAY,
|
|
306
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
307
|
+
protocol: PROTOCOLS.Spark,
|
|
308
|
+
},
|
|
309
|
+
[Bundles.MainnetIds.SPARK_BOOST]: {
|
|
310
|
+
strategyOrBundleId: Bundles.MainnetIds.SPARK_BOOST,
|
|
311
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
312
|
+
protocol: PROTOCOLS.Spark,
|
|
313
|
+
},
|
|
314
|
+
[Bundles.MainnetIds.SPARK_CLOSE_TO_DEBT]: {
|
|
315
|
+
strategyOrBundleId: Bundles.MainnetIds.SPARK_CLOSE_TO_DEBT,
|
|
316
|
+
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
317
|
+
protocol: PROTOCOLS.Spark,
|
|
318
|
+
},
|
|
319
|
+
[Bundles.MainnetIds.SPARK_CLOSE_TO_COLLATERAL]: {
|
|
320
|
+
strategyOrBundleId: Bundles.MainnetIds.SPARK_CLOSE_TO_COLLATERAL,
|
|
321
|
+
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
322
|
+
protocol: PROTOCOLS.Spark,
|
|
323
|
+
},
|
|
324
|
+
[Bundles.MainnetIds.AAVE_V2_REPAY]: {
|
|
325
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V2_REPAY,
|
|
326
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
327
|
+
protocol: PROTOCOLS.AaveV2,
|
|
328
|
+
},
|
|
329
|
+
[Bundles.MainnetIds.AAVE_V2_BOOST]: {
|
|
330
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V2_BOOST,
|
|
331
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
332
|
+
protocol: PROTOCOLS.AaveV2,
|
|
333
|
+
},
|
|
334
|
+
[Bundles.MainnetIds.COMP_V2_REPAY]: {
|
|
335
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V2_REPAY,
|
|
336
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
337
|
+
protocol: PROTOCOLS.CompoundV2,
|
|
338
|
+
},
|
|
339
|
+
[Bundles.MainnetIds.COMP_V2_BOOST]: {
|
|
340
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V2_BOOST,
|
|
341
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
342
|
+
protocol: PROTOCOLS.CompoundV2,
|
|
343
|
+
},
|
|
344
|
+
[Bundles.MainnetIds.CRVUSD_REPAY]: {
|
|
345
|
+
strategyOrBundleId: Bundles.MainnetIds.CRVUSD_REPAY,
|
|
346
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
347
|
+
protocol: PROTOCOLS.CrvUSD,
|
|
348
|
+
},
|
|
349
|
+
[Bundles.MainnetIds.CRVUSD_BOOST]: {
|
|
350
|
+
strategyOrBundleId: Bundles.MainnetIds.CRVUSD_BOOST,
|
|
351
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
352
|
+
protocol: PROTOCOLS.CrvUSD,
|
|
353
|
+
},
|
|
354
|
+
[Bundles.MainnetIds.MORPHO_BLUE_REPAY]: {
|
|
355
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_REPAY,
|
|
356
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
357
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
358
|
+
},
|
|
359
|
+
[Bundles.MainnetIds.MORPHO_BLUE_BOOST]: {
|
|
360
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_BOOST,
|
|
361
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
362
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
363
|
+
},
|
|
364
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_REPAY]: {
|
|
365
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_REPAY,
|
|
366
|
+
strategyId: Strategies.Identifiers.EoaRepay,
|
|
367
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
368
|
+
},
|
|
369
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST]: {
|
|
370
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST,
|
|
371
|
+
strategyId: Strategies.Identifiers.EoaBoost,
|
|
372
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
373
|
+
},
|
|
374
|
+
[Bundles.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
375
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
376
|
+
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
377
|
+
protocol: PROTOCOLS.AaveV3,
|
|
378
|
+
},
|
|
379
|
+
[Bundles.MainnetIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
380
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_REPAY_ON_PRICE,
|
|
381
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
382
|
+
protocol: PROTOCOLS.AaveV3,
|
|
383
|
+
},
|
|
384
|
+
[Bundles.MainnetIds.LIQUITY_V2_REPAY]: {
|
|
385
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_REPAY,
|
|
386
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
387
|
+
protocol: PROTOCOLS.LiquityV2,
|
|
388
|
+
},
|
|
389
|
+
[Bundles.MainnetIds.LIQUITY_V2_BOOST]: {
|
|
390
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_BOOST,
|
|
391
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
392
|
+
protocol: PROTOCOLS.LiquityV2,
|
|
393
|
+
},
|
|
394
|
+
[Bundles.MainnetIds.LIQUITY_V2_CLOSE]: {
|
|
395
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_CLOSE,
|
|
396
|
+
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
397
|
+
protocol: PROTOCOLS.LiquityV2,
|
|
398
|
+
},
|
|
399
|
+
[Bundles.MainnetIds.LIQUITY_V2_REPAY_ON_PRICE]: {
|
|
400
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_REPAY_ON_PRICE,
|
|
401
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
402
|
+
protocol: PROTOCOLS.LiquityV2,
|
|
403
|
+
},
|
|
404
|
+
[Bundles.MainnetIds.LIQUITY_V2_BOOST_ON_PRICE]: {
|
|
405
|
+
strategyOrBundleId: Bundles.MainnetIds.LIQUITY_V2_BOOST_ON_PRICE,
|
|
406
|
+
strategyId: Strategies.Identifiers.BoostOnPrice,
|
|
407
|
+
protocol: PROTOCOLS.LiquityV2,
|
|
408
|
+
},
|
|
409
|
+
[Bundles.MainnetIds.MORPHO_BLUE_BOOST_ON_PRICE]: {
|
|
410
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_BOOST_ON_PRICE,
|
|
411
|
+
strategyId: Strategies.Identifiers.BoostOnPrice,
|
|
412
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
413
|
+
},
|
|
414
|
+
[Bundles.MainnetIds.FLUID_T1_REPAY]: {
|
|
415
|
+
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_REPAY,
|
|
416
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
417
|
+
protocol: PROTOCOLS.FluidT1,
|
|
418
|
+
},
|
|
419
|
+
[Bundles.MainnetIds.FLUID_T1_BOOST]: {
|
|
420
|
+
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_BOOST,
|
|
421
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
422
|
+
protocol: PROTOCOLS.FluidT1,
|
|
423
|
+
},
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
export const OPTIMISM_BUNDLES_INFO: OptimismBundleInfo = {
|
|
427
|
+
[Bundles.OptimismIds.AAVE_V3_REPAY]: {
|
|
428
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_REPAY,
|
|
429
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
430
|
+
protocol: PROTOCOLS.AaveV3,
|
|
431
|
+
},
|
|
432
|
+
[Bundles.OptimismIds.AAVE_V3_BOOST]: {
|
|
433
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_BOOST,
|
|
434
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
435
|
+
protocol: PROTOCOLS.AaveV3,
|
|
436
|
+
},
|
|
437
|
+
[Bundles.OptimismIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
438
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
439
|
+
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
440
|
+
protocol: PROTOCOLS.AaveV3,
|
|
441
|
+
},
|
|
442
|
+
[Bundles.OptimismIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
443
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
444
|
+
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
445
|
+
protocol: PROTOCOLS.AaveV3,
|
|
446
|
+
},
|
|
447
|
+
[Bundles.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
448
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
449
|
+
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
450
|
+
protocol: PROTOCOLS.AaveV3,
|
|
451
|
+
},
|
|
452
|
+
[Bundles.OptimismIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
453
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_REPAY_ON_PRICE,
|
|
454
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
455
|
+
protocol: PROTOCOLS.AaveV3,
|
|
456
|
+
},
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export const BASE_BUNDLES_INFO: BaseBundleInfo = {
|
|
460
|
+
[Bundles.BaseIds.AAVE_V3_REPAY]: {
|
|
461
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_REPAY,
|
|
462
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
463
|
+
protocol: PROTOCOLS.AaveV3,
|
|
464
|
+
},
|
|
465
|
+
[Bundles.BaseIds.AAVE_V3_BOOST]: {
|
|
466
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_BOOST,
|
|
467
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
468
|
+
protocol: PROTOCOLS.AaveV3,
|
|
469
|
+
},
|
|
470
|
+
[Bundles.BaseIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
471
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
472
|
+
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
473
|
+
protocol: PROTOCOLS.AaveV3,
|
|
474
|
+
},
|
|
475
|
+
[Bundles.BaseIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
476
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
477
|
+
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
478
|
+
protocol: PROTOCOLS.AaveV3,
|
|
479
|
+
},
|
|
480
|
+
[Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE]: {
|
|
481
|
+
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE,
|
|
482
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
483
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
484
|
+
},
|
|
485
|
+
[Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE]: {
|
|
486
|
+
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
487
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
488
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
489
|
+
},
|
|
490
|
+
[Bundles.BaseIds.MORPHO_BLUE_REPAY]: {
|
|
491
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_REPAY,
|
|
492
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
493
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
494
|
+
},
|
|
495
|
+
[Bundles.BaseIds.MORPHO_BLUE_BOOST]: {
|
|
496
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_BOOST,
|
|
497
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
498
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
499
|
+
},
|
|
500
|
+
[Bundles.BaseIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
501
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
502
|
+
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
503
|
+
protocol: PROTOCOLS.AaveV3,
|
|
504
|
+
},
|
|
505
|
+
[Bundles.BaseIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
506
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_REPAY_ON_PRICE,
|
|
507
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
508
|
+
protocol: PROTOCOLS.AaveV3,
|
|
509
|
+
},
|
|
510
|
+
[Bundles.BaseIds.MORPHO_BLUE_BOOST_ON_PRICE]: {
|
|
511
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_BOOST_ON_PRICE,
|
|
512
|
+
strategyId: Strategies.Identifiers.BoostOnPrice,
|
|
513
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
514
|
+
},
|
|
515
|
+
[Bundles.BaseIds.FLUID_T1_REPAY]: {
|
|
516
|
+
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_REPAY,
|
|
517
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
518
|
+
protocol: PROTOCOLS.FluidT1,
|
|
519
|
+
},
|
|
520
|
+
[Bundles.BaseIds.FLUID_T1_BOOST]: {
|
|
521
|
+
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_BOOST,
|
|
522
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
523
|
+
protocol: PROTOCOLS.FluidT1,
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
export const ARBITRUM_BUNDLES_INFO: ArbitrumBundleInfo = {
|
|
528
|
+
[Bundles.ArbitrumIds.AAVE_V3_REPAY]: {
|
|
529
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_REPAY,
|
|
530
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
531
|
+
protocol: PROTOCOLS.AaveV3,
|
|
532
|
+
},
|
|
533
|
+
[Bundles.ArbitrumIds.AAVE_V3_BOOST]: {
|
|
534
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_BOOST,
|
|
535
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
536
|
+
protocol: PROTOCOLS.AaveV3,
|
|
537
|
+
},
|
|
538
|
+
[Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_DEBT]: {
|
|
539
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_DEBT,
|
|
540
|
+
strategyId: Strategies.Identifiers.CloseToDebt,
|
|
541
|
+
protocol: PROTOCOLS.AaveV3,
|
|
542
|
+
},
|
|
543
|
+
[Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_COLLATERAL]: {
|
|
544
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
545
|
+
strategyId: Strategies.Identifiers.CloseToCollateral,
|
|
546
|
+
protocol: PROTOCOLS.AaveV3,
|
|
547
|
+
},
|
|
548
|
+
[Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE]: {
|
|
549
|
+
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE,
|
|
550
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
551
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
552
|
+
},
|
|
553
|
+
[Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE]: {
|
|
554
|
+
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
555
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
556
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
557
|
+
},
|
|
558
|
+
[Bundles.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
559
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
560
|
+
strategyId: Strategies.Identifiers.OpenOrderFromCollateral,
|
|
561
|
+
protocol: PROTOCOLS.AaveV3,
|
|
562
|
+
},
|
|
563
|
+
[Bundles.ArbitrumIds.AAVE_V3_REPAY_ON_PRICE]: {
|
|
564
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_REPAY_ON_PRICE,
|
|
565
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
566
|
+
protocol: PROTOCOLS.AaveV3,
|
|
567
|
+
},
|
|
568
|
+
[Bundles.ArbitrumIds.FLUID_T1_REPAY]: {
|
|
569
|
+
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_REPAY,
|
|
570
|
+
strategyId: Strategies.Identifiers.Repay,
|
|
571
|
+
protocol: PROTOCOLS.FluidT1,
|
|
572
|
+
},
|
|
573
|
+
[Bundles.ArbitrumIds.FLUID_T1_BOOST]: {
|
|
574
|
+
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_BOOST,
|
|
575
|
+
strategyId: Strategies.Identifiers.Boost,
|
|
576
|
+
protocol: PROTOCOLS.FluidT1,
|
|
577
|
+
},
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export const BUNDLES_INFO: BundlesInfo = {
|
|
581
|
+
[ChainId.Ethereum]: MAINNET_BUNDLES_INFO,
|
|
582
|
+
[ChainId.Optimism]: OPTIMISM_BUNDLES_INFO,
|
|
583
|
+
[ChainId.Arbitrum]: ARBITRUM_BUNDLES_INFO,
|
|
584
|
+
[ChainId.Base]: BASE_BUNDLES_INFO,
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
export const BUNDLE_IDS = {
|
|
588
|
+
[ChainId.Ethereum]: Bundles.MainnetIds,
|
|
589
|
+
[ChainId.Optimism]: Bundles.OptimismIds,
|
|
590
|
+
[ChainId.Arbitrum]: Bundles.ArbitrumIds,
|
|
591
|
+
[ChainId.Base]: Bundles.BaseIds,
|
|
592
|
+
|
|
593
|
+
};
|