@defisaver/automation-sdk 3.1.5 → 3.1.7

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