@defisaver/automation-sdk 3.3.14 → 3.3.15-liq-prot-1-dev
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/cjs/constants/index.js +130 -0
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +6 -2
- package/cjs/services/strategiesService.js +178 -17
- package/cjs/services/strategySubService.d.ts +14 -13
- package/cjs/services/strategySubService.js +79 -63
- package/cjs/services/strategySubService.test.js +0 -234
- package/cjs/services/subDataService.d.ts +92 -4
- package/cjs/services/subDataService.js +245 -35
- package/cjs/services/subDataService.test.js +0 -110
- package/cjs/services/utils.d.ts +3 -1
- package/cjs/services/utils.js +34 -1
- package/cjs/services/utils.test.js +25 -0
- package/cjs/types/enums.d.ts +36 -6
- package/cjs/types/enums.js +30 -0
- package/esm/constants/index.js +130 -0
- package/esm/index.d.ts +4 -3
- package/esm/index.js +7 -3
- package/esm/services/strategiesService.js +178 -17
- package/esm/services/strategySubService.d.ts +14 -13
- package/esm/services/strategySubService.js +79 -60
- package/esm/services/strategySubService.test.js +2 -236
- package/esm/services/subDataService.d.ts +92 -4
- package/esm/services/subDataService.js +243 -34
- package/esm/services/subDataService.test.js +0 -110
- package/esm/services/utils.d.ts +3 -1
- package/esm/services/utils.js +32 -1
- package/esm/services/utils.test.js +27 -2
- package/esm/types/enums.d.ts +36 -6
- package/esm/types/enums.js +30 -0
- package/package.json +1 -1
- package/src/constants/index.ts +132 -1
- package/src/index.ts +24 -6
- package/src/services/strategiesService.ts +242 -17
- package/src/services/strategySubService.test.ts +0 -279
- package/src/services/strategySubService.ts +209 -116
- package/src/services/subDataService.test.ts +0 -120
- package/src/services/subDataService.ts +335 -49
- package/src/services/utils.test.ts +32 -1
- package/src/services/utils.ts +32 -1
- package/src/types/enums.ts +30 -2
|
@@ -685,74 +685,6 @@ describe('Feature: subDataService.ts', () => {
|
|
|
685
685
|
});
|
|
686
686
|
});
|
|
687
687
|
});
|
|
688
|
-
describe('When testing subDataService.compoundV3LeverageManagementSubData', () => {
|
|
689
|
-
describe('encode()', () => {
|
|
690
|
-
const examples = [
|
|
691
|
-
[
|
|
692
|
-
[
|
|
693
|
-
web3Utils.toChecksumAddress('0x1C0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
694
|
-
web3Utils.toChecksumAddress(getAssetInfo('USDC', ChainId.Ethereum).address),
|
|
695
|
-
new Dec(160).mul(1e16).toString(),
|
|
696
|
-
new Dec(220).mul(1e16).toString(),
|
|
697
|
-
new Dec(180).mul(1e16).toString(),
|
|
698
|
-
new Dec(190).mul(1e16).toString(),
|
|
699
|
-
true, false,
|
|
700
|
-
],
|
|
701
|
-
[
|
|
702
|
-
web3Utils.toChecksumAddress('0x1C0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
703
|
-
web3Utils.toChecksumAddress(getAssetInfo('USDC', ChainId.Ethereum).address),
|
|
704
|
-
160, 220, 180, 190,
|
|
705
|
-
true, false,
|
|
706
|
-
]
|
|
707
|
-
],
|
|
708
|
-
[
|
|
709
|
-
[
|
|
710
|
-
web3Utils.toChecksumAddress('0xaC0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
711
|
-
web3Utils.toChecksumAddress(getAssetInfo('WETH', ChainId.Ethereum).address),
|
|
712
|
-
new Dec(160).mul(1e16).toString(),
|
|
713
|
-
new Dec(210).mul(1e16).toString(),
|
|
714
|
-
new Dec(180).mul(1e16).toString(),
|
|
715
|
-
new Dec(190).mul(1e16).toString(),
|
|
716
|
-
false, true,
|
|
717
|
-
],
|
|
718
|
-
[
|
|
719
|
-
web3Utils.toChecksumAddress('0xaC0F620155e85491f8D35440eb17538Ca5c55212'),
|
|
720
|
-
web3Utils.toChecksumAddress(getAssetInfo('WETH', ChainId.Ethereum).address),
|
|
721
|
-
160, 210, 180, 190,
|
|
722
|
-
false, true,
|
|
723
|
-
]
|
|
724
|
-
],
|
|
725
|
-
];
|
|
726
|
-
examples.forEach(([expected, actual]) => {
|
|
727
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
728
|
-
expect(subDataService.compoundV3LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
729
|
-
});
|
|
730
|
-
});
|
|
731
|
-
});
|
|
732
|
-
describe('decode()', () => {
|
|
733
|
-
const examples = [
|
|
734
|
-
[
|
|
735
|
-
{ targetRatio: 123 },
|
|
736
|
-
[
|
|
737
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
738
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001111d67bb1bb0000',
|
|
739
|
-
],
|
|
740
|
-
],
|
|
741
|
-
[
|
|
742
|
-
{ targetRatio: 200 },
|
|
743
|
-
[
|
|
744
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
745
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
|
|
746
|
-
],
|
|
747
|
-
],
|
|
748
|
-
];
|
|
749
|
-
examples.forEach(([expected, actual]) => {
|
|
750
|
-
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
751
|
-
expect(subDataService.compoundV3LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
752
|
-
});
|
|
753
|
-
});
|
|
754
|
-
});
|
|
755
|
-
});
|
|
756
688
|
describe('When testing subDataService.morphoAaveV2LeverageManagementSubData', () => {
|
|
757
689
|
describe('encode()', () => {
|
|
758
690
|
const examples = [
|
|
@@ -1309,48 +1241,6 @@ describe('Feature: subDataService.ts', () => {
|
|
|
1309
1241
|
});
|
|
1310
1242
|
});
|
|
1311
1243
|
});
|
|
1312
|
-
describe('When testing subDataService.compoundV3L2LeverageManagementSubData', () => {
|
|
1313
|
-
describe('encode()', () => {
|
|
1314
|
-
const examples = [
|
|
1315
|
-
[
|
|
1316
|
-
'0x0313D212133AFab8F2b829B1066c7e43caD94e2c0213D212133AfaB8F2b829B1066C7E43cAD94E2c000000000000000016345785d8a0000000000000000000001e87f85809dc0000000000000000000018fae27693b4000000000000000000001a5e27eef13e00000100',
|
|
1317
|
-
[web3Utils.toChecksumAddress('0x0313d212133AFaB8F2B829B1066c7E43cAd94E2c'), web3Utils.toChecksumAddress('0x0213d212133AFaB8F2B829B1066c7E43cAd94E2c'), 160, 220, 180, 190, true, false]
|
|
1318
|
-
],
|
|
1319
|
-
[
|
|
1320
|
-
'0x0313D212133AFab8F2b829B1066c7e43caD94e2c0413d212133afAb8F2B829b1066C7e43cAd94e2c000000000000000016345785d8a0000000000000000000001e87f85809dc0000000000000000000018fae27693b4000000000000000000000f43fc2c04ee00000000',
|
|
1321
|
-
[web3Utils.toChecksumAddress('0x0313d212133AFaB8F2B829B1066c7E43cAd94E2c'), web3Utils.toChecksumAddress('0x0413d212133AFaB8F2B829B1066c7E43cAd94E2c'), 160, 220, 180, 110, false, false]
|
|
1322
|
-
],
|
|
1323
|
-
];
|
|
1324
|
-
examples.forEach(([expected, actual]) => {
|
|
1325
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
1326
|
-
expect(subDataService.compoundV3L2LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
1327
|
-
});
|
|
1328
|
-
});
|
|
1329
|
-
});
|
|
1330
|
-
describe('decode()', () => {
|
|
1331
|
-
const examples = [
|
|
1332
|
-
[
|
|
1333
|
-
{ targetRatio: 200 },
|
|
1334
|
-
[
|
|
1335
|
-
'0x0000000000000000000000000313d212133AFaB8F2B829B1066c7E43cAd94E2c', '0x0000000000000000000000000213d212133AFaB8F2B829B1066c7E43cAd94E2c',
|
|
1336
|
-
'0x0000000000000000000000000000000000000000000000000000000000000001', '0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
|
|
1337
|
-
],
|
|
1338
|
-
],
|
|
1339
|
-
[
|
|
1340
|
-
{ targetRatio: 123 },
|
|
1341
|
-
[
|
|
1342
|
-
'0x0000000000000000000000000313d212133AFaB8F2B829B1066c7E43cAd94E2c', '0x0000000000000000000000000413d212133AFaB8F2B829B1066c7E43cAd94E2c',
|
|
1343
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001111d67bb1bb0000',
|
|
1344
|
-
],
|
|
1345
|
-
],
|
|
1346
|
-
];
|
|
1347
|
-
examples.forEach(([expected, actual]) => {
|
|
1348
|
-
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1349
|
-
expect(subDataService.compoundV3L2LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
1350
|
-
});
|
|
1351
|
-
});
|
|
1352
|
-
});
|
|
1353
|
-
});
|
|
1354
1244
|
describe('When testing subDataService.morphoBlueLeverageManagementSubData', () => {
|
|
1355
1245
|
describe('encode()', () => {
|
|
1356
1246
|
const examples = [
|
package/esm/services/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EthereumAddress } from '../types';
|
|
2
|
-
import { ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
2
|
+
import { Bundles, ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
3
3
|
export declare function isDefined<T>(value: T): value is NonNullable<T>;
|
|
4
4
|
export declare function isUndefined(value: unknown): boolean;
|
|
5
5
|
export declare function compareAddresses(firstAddress: EthereumAddress, secondAddress: EthereumAddress): boolean;
|
|
@@ -28,3 +28,5 @@ export declare function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStr
|
|
|
28
28
|
stopLossType: CloseToAssetType | undefined;
|
|
29
29
|
takeProfitType: CloseToAssetType | undefined;
|
|
30
30
|
};
|
|
31
|
+
export declare function getBundleIdsByNetwork(network: ChainId): typeof Bundles.MainnetIds | typeof Bundles.ArbitrumIds | typeof Bundles.BaseIds;
|
|
32
|
+
export declare function getCompoundV3LeverageManagementBundleId(network: ChainId, isEOA: boolean, isBoost: boolean): number;
|
package/esm/services/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import Dec from 'decimal.js';
|
|
|
2
2
|
import * as web3Utils from 'web3-utils';
|
|
3
3
|
import AbiCoder from 'web3-eth-abi';
|
|
4
4
|
import { getAssetInfo, getAssetInfoByAddress } from '@defisaver/tokens';
|
|
5
|
-
import { ChainId, CloseStrategyType, CloseToAssetType, RatioState, } from '../types/enums';
|
|
5
|
+
import { Bundles, ChainId, CloseStrategyType, CloseToAssetType, RatioState, } from '../types/enums';
|
|
6
6
|
export function isDefined(value) {
|
|
7
7
|
return value !== undefined && value !== null;
|
|
8
8
|
}
|
|
@@ -137,3 +137,34 @@ export function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStrategyTyp
|
|
|
137
137
|
throw new Error('CloseStrategyType not supported');
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
+
export function getBundleIdsByNetwork(network) {
|
|
141
|
+
switch (Number(network)) {
|
|
142
|
+
case ChainId.Ethereum:
|
|
143
|
+
return Bundles.MainnetIds;
|
|
144
|
+
case ChainId.Arbitrum:
|
|
145
|
+
return Bundles.ArbitrumIds;
|
|
146
|
+
case ChainId.Base:
|
|
147
|
+
return Bundles.BaseIds;
|
|
148
|
+
default:
|
|
149
|
+
throw new Error(`Unsupported network ${network}`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// Mainnet uses the V2 bundle ids; L2s use the original bundle ids.
|
|
153
|
+
export function getCompoundV3LeverageManagementBundleId(network, isEOA, isBoost) {
|
|
154
|
+
switch (Number(network)) {
|
|
155
|
+
case ChainId.Ethereum:
|
|
156
|
+
if (isEOA)
|
|
157
|
+
return isBoost ? Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE : Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE;
|
|
158
|
+
return isBoost ? Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE : Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE;
|
|
159
|
+
case ChainId.Base:
|
|
160
|
+
if (isEOA)
|
|
161
|
+
return isBoost ? Bundles.BaseIds.COMP_V3_EOA_BOOST : Bundles.BaseIds.COMP_V3_EOA_REPAY;
|
|
162
|
+
return isBoost ? Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE : Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE;
|
|
163
|
+
case ChainId.Arbitrum:
|
|
164
|
+
if (isEOA)
|
|
165
|
+
return isBoost ? Bundles.ArbitrumIds.COMP_V3_EOA_BOOST : Bundles.ArbitrumIds.COMP_V3_EOA_REPAY;
|
|
166
|
+
return isBoost ? Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE : Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE;
|
|
167
|
+
default:
|
|
168
|
+
throw new Error(`Compound V3 leverage management is not supported on network ${network}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import { getAssetInfo } from '@defisaver/tokens';
|
|
3
|
-
import { ChainId, ProtocolIdentifiers, RatioState } from '../types/enums';
|
|
3
|
+
import { Bundles, ChainId, ProtocolIdentifiers, RatioState } from '../types/enums';
|
|
4
4
|
import '../configuration';
|
|
5
|
-
import { addToArrayIf, addToObjectIf, compareAddresses, encodeSubId, ethToWeth, getRatioStateInfoForAaveCloseStrategy, isAddress, isDefined, isEmptyBytes, isRatioStateOver, isRatioStateUnder, isUndefined, ratioPercentageToWei, requireAddress, requireAddresses, weiToRatioPercentage, wethToEth, wethToEthByAddress, getPositionId, } from './utils';
|
|
5
|
+
import { addToArrayIf, addToObjectIf, compareAddresses, encodeSubId, ethToWeth, getCompoundV3LeverageManagementBundleId, getRatioStateInfoForAaveCloseStrategy, isAddress, isDefined, isEmptyBytes, isRatioStateOver, isRatioStateUnder, isUndefined, ratioPercentageToWei, requireAddress, requireAddresses, weiToRatioPercentage, wethToEth, wethToEthByAddress, getPositionId, } from './utils';
|
|
6
6
|
describe('Feature: utils.ts', () => {
|
|
7
7
|
describe('When testing utils.isDefined()', () => {
|
|
8
8
|
const examples = [
|
|
@@ -294,4 +294,29 @@ describe('Feature: utils.ts', () => {
|
|
|
294
294
|
});
|
|
295
295
|
});
|
|
296
296
|
});
|
|
297
|
+
describe('When testing utils.getCompoundV3LeverageManagementBundleId()', () => {
|
|
298
|
+
// Mainnet uses the V2 bundle ids; L2s use the original bundle ids.
|
|
299
|
+
const examples = [
|
|
300
|
+
[Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE, [ChainId.Ethereum, false, false]],
|
|
301
|
+
[Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE, [ChainId.Ethereum, false, true]],
|
|
302
|
+
[Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE, [ChainId.Ethereum, true, false]],
|
|
303
|
+
[Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE, [ChainId.Ethereum, true, true]],
|
|
304
|
+
[Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE, [ChainId.Base, false, false]],
|
|
305
|
+
[Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE, [ChainId.Base, false, true]],
|
|
306
|
+
[Bundles.BaseIds.COMP_V3_EOA_REPAY, [ChainId.Base, true, false]],
|
|
307
|
+
[Bundles.BaseIds.COMP_V3_EOA_BOOST, [ChainId.Base, true, true]],
|
|
308
|
+
[Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE, [ChainId.Arbitrum, false, false]],
|
|
309
|
+
[Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE, [ChainId.Arbitrum, false, true]],
|
|
310
|
+
[Bundles.ArbitrumIds.COMP_V3_EOA_REPAY, [ChainId.Arbitrum, true, false]],
|
|
311
|
+
[Bundles.ArbitrumIds.COMP_V3_EOA_BOOST, [ChainId.Arbitrum, true, true]],
|
|
312
|
+
];
|
|
313
|
+
examples.forEach(([expected, actual]) => {
|
|
314
|
+
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
315
|
+
expect(getCompoundV3LeverageManagementBundleId(...actual)).to.equal(expected);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
it(`Given ${ChainId.Optimism} (unsupported) should throw an error`, () => {
|
|
319
|
+
expect(() => getCompoundV3LeverageManagementBundleId(ChainId.Optimism, false, false)).to.throw(Error);
|
|
320
|
+
});
|
|
321
|
+
});
|
|
297
322
|
});
|
package/esm/types/enums.d.ts
CHANGED
|
@@ -138,7 +138,9 @@ export declare namespace Strategies {
|
|
|
138
138
|
EoaBoostOnPrice = "eoa-boost-on-price",
|
|
139
139
|
EoaRepayOnPrice = "eoa-repay-on-price",
|
|
140
140
|
CollateralSwitch = "collateral-switch",
|
|
141
|
-
EoaCollateralSwitch = "eoa-collateral-switch"
|
|
141
|
+
EoaCollateralSwitch = "eoa-collateral-switch",
|
|
142
|
+
LiquidationProtection = "liquidation-protection",
|
|
143
|
+
EoaLiquidationProtection = "eoa-liquidation-protection"
|
|
142
144
|
}
|
|
143
145
|
enum IdOverrides {
|
|
144
146
|
TakeProfit = "take-profit",
|
|
@@ -149,7 +151,9 @@ export declare namespace Strategies {
|
|
|
149
151
|
LeverageManagement = "leverage-management",
|
|
150
152
|
EoaLeverageManagement = "leverage-management-eoa",
|
|
151
153
|
LeverageManagementOnPrice = "leverage-management-on-price",
|
|
152
|
-
EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa"
|
|
154
|
+
EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa",
|
|
155
|
+
LiquidationProtection = "liquidation-protection",
|
|
156
|
+
EoaLiquidationProtection = "liquidation-protection-eoa"
|
|
153
157
|
}
|
|
154
158
|
}
|
|
155
159
|
export declare namespace Bundles {
|
|
@@ -224,7 +228,18 @@ export declare namespace Bundles {
|
|
|
224
228
|
AAVE_V4_EOA_BOOST = 67,
|
|
225
229
|
AAVE_V4_EOA_REPAY_ON_PRICE = 68,
|
|
226
230
|
AAVE_V4_EOA_BOOST_ON_PRICE = 69,
|
|
227
|
-
AAVE_V4_EOA_CLOSE = 70
|
|
231
|
+
AAVE_V4_EOA_CLOSE = 70,
|
|
232
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 71,
|
|
233
|
+
SPARK_SW_LIQUIDATION_PROTECTION = 72,
|
|
234
|
+
MAKER_SW_LIQUIDATION_PROTECTION = 75,
|
|
235
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 76,
|
|
236
|
+
AAVE_V4_SW_LIQUIDATION_PROTECTION = 77,
|
|
237
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 78,
|
|
238
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 79,
|
|
239
|
+
AAVE_V4_EOA_LIQUIDATION_PROTECTION = 80,
|
|
240
|
+
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 81,
|
|
241
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 82,
|
|
242
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 83
|
|
228
243
|
}
|
|
229
244
|
enum OptimismIds {
|
|
230
245
|
AAVE_V3_REPAY = 0,
|
|
@@ -237,7 +252,9 @@ export declare namespace Bundles {
|
|
|
237
252
|
AAVE_V3_EOA_BOOST = 7,
|
|
238
253
|
AAVE_V3_EOA_REPAY_ON_PRICE = 8,
|
|
239
254
|
AAVE_V3_EOA_BOOST_ON_PRICE = 9,
|
|
240
|
-
AAVE_V3_EOA_CLOSE = 10
|
|
255
|
+
AAVE_V3_EOA_CLOSE = 10,
|
|
256
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 11,
|
|
257
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 12
|
|
241
258
|
}
|
|
242
259
|
enum BaseIds {
|
|
243
260
|
AAVE_V3_REPAY = 0,
|
|
@@ -266,7 +283,13 @@ export declare namespace Bundles {
|
|
|
266
283
|
AAVE_V3_EOA_REPAY_ON_PRICE = 25,
|
|
267
284
|
AAVE_V3_EOA_BOOST_ON_PRICE = 26,
|
|
268
285
|
AAVE_V3_EOA_CLOSE = 27,
|
|
269
|
-
MORPHO_BLUE_CLOSE = 28
|
|
286
|
+
MORPHO_BLUE_CLOSE = 28,
|
|
287
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
|
|
288
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
289
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
290
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
291
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
292
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 35
|
|
270
293
|
}
|
|
271
294
|
enum ArbitrumIds {
|
|
272
295
|
AAVE_V3_REPAY = 0,
|
|
@@ -297,6 +320,13 @@ export declare namespace Bundles {
|
|
|
297
320
|
MORPHO_BLUE_BOOST_ON_PRICE = 25,
|
|
298
321
|
MORPHO_BLUE_EOA_REPAY = 26,
|
|
299
322
|
MORPHO_BLUE_EOA_BOOST = 27,
|
|
300
|
-
MORPHO_BLUE_CLOSE = 28
|
|
323
|
+
MORPHO_BLUE_CLOSE = 28,
|
|
324
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
|
|
325
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
326
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 31,
|
|
327
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
328
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
329
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
330
|
+
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 35
|
|
301
331
|
}
|
|
302
332
|
}
|
package/esm/types/enums.js
CHANGED
|
@@ -156,6 +156,8 @@ export var Strategies;
|
|
|
156
156
|
Identifiers["EoaRepayOnPrice"] = "eoa-repay-on-price";
|
|
157
157
|
Identifiers["CollateralSwitch"] = "collateral-switch";
|
|
158
158
|
Identifiers["EoaCollateralSwitch"] = "eoa-collateral-switch";
|
|
159
|
+
Identifiers["LiquidationProtection"] = "liquidation-protection";
|
|
160
|
+
Identifiers["EoaLiquidationProtection"] = "eoa-liquidation-protection";
|
|
159
161
|
})(Identifiers = Strategies.Identifiers || (Strategies.Identifiers = {}));
|
|
160
162
|
let IdOverrides;
|
|
161
163
|
(function (IdOverrides) {
|
|
@@ -168,6 +170,8 @@ export var Strategies;
|
|
|
168
170
|
IdOverrides["EoaLeverageManagement"] = "leverage-management-eoa";
|
|
169
171
|
IdOverrides["LeverageManagementOnPrice"] = "leverage-management-on-price";
|
|
170
172
|
IdOverrides["EoaLeverageManagementOnPrice"] = "leverage-management-on-price-eoa";
|
|
173
|
+
IdOverrides["LiquidationProtection"] = "liquidation-protection";
|
|
174
|
+
IdOverrides["EoaLiquidationProtection"] = "liquidation-protection-eoa";
|
|
171
175
|
})(IdOverrides = Strategies.IdOverrides || (Strategies.IdOverrides = {}));
|
|
172
176
|
})(Strategies || (Strategies = {}));
|
|
173
177
|
export var Bundles;
|
|
@@ -245,6 +249,17 @@ export var Bundles;
|
|
|
245
249
|
MainnetIds[MainnetIds["AAVE_V4_EOA_REPAY_ON_PRICE"] = 68] = "AAVE_V4_EOA_REPAY_ON_PRICE";
|
|
246
250
|
MainnetIds[MainnetIds["AAVE_V4_EOA_BOOST_ON_PRICE"] = 69] = "AAVE_V4_EOA_BOOST_ON_PRICE";
|
|
247
251
|
MainnetIds[MainnetIds["AAVE_V4_EOA_CLOSE"] = 70] = "AAVE_V4_EOA_CLOSE";
|
|
252
|
+
MainnetIds[MainnetIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 71] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
253
|
+
MainnetIds[MainnetIds["SPARK_SW_LIQUIDATION_PROTECTION"] = 72] = "SPARK_SW_LIQUIDATION_PROTECTION";
|
|
254
|
+
MainnetIds[MainnetIds["MAKER_SW_LIQUIDATION_PROTECTION"] = 75] = "MAKER_SW_LIQUIDATION_PROTECTION";
|
|
255
|
+
MainnetIds[MainnetIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 76] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
256
|
+
MainnetIds[MainnetIds["AAVE_V4_SW_LIQUIDATION_PROTECTION"] = 77] = "AAVE_V4_SW_LIQUIDATION_PROTECTION";
|
|
257
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 78] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
258
|
+
MainnetIds[MainnetIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 79] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
259
|
+
MainnetIds[MainnetIds["AAVE_V4_EOA_LIQUIDATION_PROTECTION"] = 80] = "AAVE_V4_EOA_LIQUIDATION_PROTECTION";
|
|
260
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 81] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
261
|
+
MainnetIds[MainnetIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 82] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
262
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 83] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
248
263
|
})(MainnetIds = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
|
|
249
264
|
let OptimismIds;
|
|
250
265
|
(function (OptimismIds) {
|
|
@@ -259,6 +274,8 @@ export var Bundles;
|
|
|
259
274
|
OptimismIds[OptimismIds["AAVE_V3_EOA_REPAY_ON_PRICE"] = 8] = "AAVE_V3_EOA_REPAY_ON_PRICE";
|
|
260
275
|
OptimismIds[OptimismIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 9] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
261
276
|
OptimismIds[OptimismIds["AAVE_V3_EOA_CLOSE"] = 10] = "AAVE_V3_EOA_CLOSE";
|
|
277
|
+
OptimismIds[OptimismIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 11] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
278
|
+
OptimismIds[OptimismIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 12] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
262
279
|
})(OptimismIds = Bundles.OptimismIds || (Bundles.OptimismIds = {}));
|
|
263
280
|
let BaseIds;
|
|
264
281
|
(function (BaseIds) {
|
|
@@ -289,6 +306,12 @@ export var Bundles;
|
|
|
289
306
|
BaseIds[BaseIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 26] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
290
307
|
BaseIds[BaseIds["AAVE_V3_EOA_CLOSE"] = 27] = "AAVE_V3_EOA_CLOSE";
|
|
291
308
|
BaseIds[BaseIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
309
|
+
BaseIds[BaseIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 29] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
310
|
+
BaseIds[BaseIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
311
|
+
BaseIds[BaseIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
312
|
+
BaseIds[BaseIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
313
|
+
BaseIds[BaseIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
314
|
+
BaseIds[BaseIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
292
315
|
})(BaseIds = Bundles.BaseIds || (Bundles.BaseIds = {}));
|
|
293
316
|
let ArbitrumIds;
|
|
294
317
|
(function (ArbitrumIds) {
|
|
@@ -321,5 +344,12 @@ export var Bundles;
|
|
|
321
344
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY"] = 26] = "MORPHO_BLUE_EOA_REPAY";
|
|
322
345
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST"] = 27] = "MORPHO_BLUE_EOA_BOOST";
|
|
323
346
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
347
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 29] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
348
|
+
ArbitrumIds[ArbitrumIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
349
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 31] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
350
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
351
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
352
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
353
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
324
354
|
})(ArbitrumIds = Bundles.ArbitrumIds || (Bundles.ArbitrumIds = {}));
|
|
325
355
|
})(Bundles || (Bundles = {}));
|
package/package.json
CHANGED
package/src/constants/index.ts
CHANGED
|
@@ -573,6 +573,62 @@ export const MAINNET_BUNDLES_INFO: MainnetBundleInfo = {
|
|
|
573
573
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
574
574
|
protocol: PROTOCOLS.AaveV4,
|
|
575
575
|
},
|
|
576
|
+
[Bundles.MainnetIds.MAKER_SW_LIQUIDATION_PROTECTION]: {
|
|
577
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_SW_LIQUIDATION_PROTECTION,
|
|
578
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
579
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
580
|
+
},
|
|
581
|
+
[Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
582
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
583
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
584
|
+
protocol: PROTOCOLS.AaveV3,
|
|
585
|
+
},
|
|
586
|
+
[Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION]: {
|
|
587
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION,
|
|
588
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
589
|
+
protocol: PROTOCOLS.AaveV4,
|
|
590
|
+
},
|
|
591
|
+
[Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION]: {
|
|
592
|
+
strategyOrBundleId: Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION,
|
|
593
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
594
|
+
protocol: PROTOCOLS.Spark,
|
|
595
|
+
},
|
|
596
|
+
[Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
597
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
598
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
599
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
600
|
+
},
|
|
601
|
+
[Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
602
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
603
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
604
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
605
|
+
},
|
|
606
|
+
[Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
607
|
+
strategyOrBundleId:
|
|
608
|
+
Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
609
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
610
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
611
|
+
},
|
|
612
|
+
[Bundles.MainnetIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
613
|
+
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
614
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
615
|
+
protocol: PROTOCOLS.FluidT1,
|
|
616
|
+
},
|
|
617
|
+
[Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
618
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
619
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
620
|
+
protocol: PROTOCOLS.AaveV3,
|
|
621
|
+
},
|
|
622
|
+
[Bundles.MainnetIds.AAVE_V4_EOA_LIQUIDATION_PROTECTION]: {
|
|
623
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_EOA_LIQUIDATION_PROTECTION,
|
|
624
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
625
|
+
protocol: PROTOCOLS.AaveV4,
|
|
626
|
+
},
|
|
627
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION]: {
|
|
628
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION,
|
|
629
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
630
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
631
|
+
},
|
|
576
632
|
};
|
|
577
633
|
|
|
578
634
|
export const OPTIMISM_BUNDLES_INFO: OptimismBundleInfo = {
|
|
@@ -631,7 +687,16 @@ export const OPTIMISM_BUNDLES_INFO: OptimismBundleInfo = {
|
|
|
631
687
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
632
688
|
protocol: PROTOCOLS.AaveV3,
|
|
633
689
|
},
|
|
634
|
-
|
|
690
|
+
[Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
691
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
692
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
693
|
+
protocol: PROTOCOLS.AaveV3,
|
|
694
|
+
},
|
|
695
|
+
[Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
696
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
697
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
698
|
+
protocol: PROTOCOLS.AaveV3,
|
|
699
|
+
},
|
|
635
700
|
};
|
|
636
701
|
|
|
637
702
|
export const BASE_BUNDLES_INFO: BaseBundleInfo = {
|
|
@@ -770,6 +835,36 @@ export const BASE_BUNDLES_INFO: BaseBundleInfo = {
|
|
|
770
835
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
771
836
|
protocol: PROTOCOLS.MorphoBlue,
|
|
772
837
|
},
|
|
838
|
+
[Bundles.BaseIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
839
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
840
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
841
|
+
protocol: PROTOCOLS.AaveV3,
|
|
842
|
+
},
|
|
843
|
+
[Bundles.BaseIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
844
|
+
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
845
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
846
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
847
|
+
},
|
|
848
|
+
[Bundles.BaseIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
849
|
+
strategyOrBundleId: Bundles.BaseIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
850
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
851
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
852
|
+
},
|
|
853
|
+
[Bundles.BaseIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
854
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
855
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
856
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
857
|
+
},
|
|
858
|
+
[Bundles.BaseIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
859
|
+
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
860
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
861
|
+
protocol: PROTOCOLS.FluidT1,
|
|
862
|
+
},
|
|
863
|
+
[Bundles.BaseIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
864
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
865
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
866
|
+
protocol: PROTOCOLS.AaveV3,
|
|
867
|
+
},
|
|
773
868
|
};
|
|
774
869
|
|
|
775
870
|
export const ARBITRUM_BUNDLES_INFO: ArbitrumBundleInfo = {
|
|
@@ -918,6 +1013,42 @@ export const ARBITRUM_BUNDLES_INFO: ArbitrumBundleInfo = {
|
|
|
918
1013
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
919
1014
|
protocol: PROTOCOLS.MorphoBlue,
|
|
920
1015
|
},
|
|
1016
|
+
[Bundles.ArbitrumIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
1017
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
1018
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1019
|
+
protocol: PROTOCOLS.AaveV3,
|
|
1020
|
+
},
|
|
1021
|
+
[Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
1022
|
+
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
1023
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1024
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
1025
|
+
},
|
|
1026
|
+
[Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
1027
|
+
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
1028
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1029
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
1030
|
+
},
|
|
1031
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
1032
|
+
strategyOrBundleId:
|
|
1033
|
+
Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
1034
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1035
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
1036
|
+
},
|
|
1037
|
+
[Bundles.ArbitrumIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
1038
|
+
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
1039
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1040
|
+
protocol: PROTOCOLS.FluidT1,
|
|
1041
|
+
},
|
|
1042
|
+
[Bundles.ArbitrumIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
1043
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
1044
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1045
|
+
protocol: PROTOCOLS.AaveV3,
|
|
1046
|
+
},
|
|
1047
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION]: {
|
|
1048
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION,
|
|
1049
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1050
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
1051
|
+
},
|
|
921
1052
|
};
|
|
922
1053
|
|
|
923
1054
|
export const BUNDLES_INFO: BundlesInfo = {
|
package/src/index.ts
CHANGED
|
@@ -24,18 +24,36 @@ import * as enums from './types/enums';
|
|
|
24
24
|
import type * as types from './types';
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
|
-
getRatioStateInfoForAaveCloseStrategy,
|
|
27
|
+
getRatioStateInfoForAaveCloseStrategy,
|
|
28
|
+
compareSubHashes,
|
|
29
|
+
encodeSubId,
|
|
30
|
+
getCloseStrategyType,
|
|
31
|
+
getCompoundV3LeverageManagementBundleId,
|
|
28
32
|
} from './services/utils';
|
|
29
33
|
|
|
30
34
|
const utils = {
|
|
31
|
-
|
|
35
|
+
compareSubHashes,
|
|
36
|
+
encodeSubId,
|
|
37
|
+
getCloseStrategyType,
|
|
38
|
+
getCompoundV3LeverageManagementBundleId,
|
|
39
|
+
getRatioStateInfoForAaveCloseStrategy,
|
|
32
40
|
};
|
|
33
41
|
|
|
34
42
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
ArbitrumStrategies,
|
|
44
|
+
BaseStrategies,
|
|
45
|
+
EthereumStrategies,
|
|
46
|
+
LegacyAaveAutomation,
|
|
47
|
+
LegacyCompoundAutomation,
|
|
48
|
+
LegacyMakerAutomation,
|
|
49
|
+
OptimismStrategies,
|
|
50
|
+
constants,
|
|
51
|
+
enums,
|
|
52
|
+
strategiesService,
|
|
53
|
+
strategySubService,
|
|
54
|
+
subDataService,
|
|
55
|
+
triggerService,
|
|
56
|
+
utils,
|
|
39
57
|
};
|
|
40
58
|
|
|
41
59
|
export type { types };
|