@defisaver/automation-sdk 3.3.2-dev.3 → 3.3.2-dev.4
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/services/strategiesService.js +83 -62
- package/cjs/types/index.d.ts +11 -1
- package/esm/services/strategiesService.js +83 -62
- package/esm/types/index.d.ts +11 -1
- package/package.json +1 -1
- package/src/services/strategiesService.ts +104 -84
- package/src/types/index.ts +14 -1
|
@@ -192,14 +192,17 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
192
192
|
const { subStruct, subId, subHash } = parseData.subscriptionEventData;
|
|
193
193
|
const { isEnabled } = parseData.strategiesSubsData;
|
|
194
194
|
const triggerData = triggerService.aaveV3RatioTrigger.decode(subStruct.triggerData);
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
196
|
+
let subData;
|
|
197
|
+
if (isEOA) {
|
|
198
|
+
subData = subDataService.aaveV3LeverageManagementSubDataWithoutSubProxy.decode(subStruct.subData);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
subData = subDataService.aaveV3LeverageManagementSubData.decode(subStruct.subData);
|
|
202
|
+
}
|
|
197
203
|
_position.strategyData.decoded.triggerData = triggerData;
|
|
198
204
|
_position.strategyData.decoded.subData = subData;
|
|
199
205
|
_position.positionId = (0, utils_1.getPositionId)(_position.chainId, _position.protocol.id, _position.owner, triggerData.market);
|
|
200
|
-
// TODO -> check if this change breaks something?
|
|
201
|
-
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
202
|
-
// TODO -> check if this change breaks something?
|
|
203
206
|
const isRepay = [enums_1.Strategies.Identifiers.Repay, enums_1.Strategies.Identifiers.EoaRepay].includes(_position.strategy.strategyId);
|
|
204
207
|
if (isRepay) {
|
|
205
208
|
_position.specific = {
|
|
@@ -207,8 +210,8 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
207
210
|
targetRepayRatio: subData.targetRatio,
|
|
208
211
|
repayEnabled: true,
|
|
209
212
|
subId1: Number(subId),
|
|
213
|
+
mergeWithId: isEOA ? enums_1.Strategies.Identifiers.EoaBoost : enums_1.Strategies.Identifiers.EoaBoost,
|
|
210
214
|
subHashRepay: subHash,
|
|
211
|
-
mergeWithId: isEOA ? enums_1.Strategies.Identifiers.EoaBoost : enums_1.Strategies.Identifiers.Boost,
|
|
212
215
|
};
|
|
213
216
|
}
|
|
214
217
|
else {
|
|
@@ -217,11 +220,83 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
217
220
|
targetBoostRatio: subData.targetRatio,
|
|
218
221
|
boostEnabled: isEnabled,
|
|
219
222
|
subId2: Number(subId),
|
|
220
|
-
subHashBoost: subHash,
|
|
221
223
|
mergeId: isEOA ? enums_1.Strategies.Identifiers.EoaBoost : enums_1.Strategies.Identifiers.Boost,
|
|
224
|
+
subHashBoost: subHash,
|
|
222
225
|
};
|
|
223
226
|
}
|
|
224
|
-
_position.strategy.strategyId =
|
|
227
|
+
_position.strategy.strategyId = enums_1.Strategies.IdOverrides.LeverageManagement;
|
|
228
|
+
return _position;
|
|
229
|
+
}
|
|
230
|
+
function parseAaveV3LeverageManagementOnPrice(position, parseData) {
|
|
231
|
+
const _position = (0, lodash_1.cloneDeep)(position);
|
|
232
|
+
const { subStruct } = parseData.subscriptionEventData;
|
|
233
|
+
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
234
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
235
|
+
let subData;
|
|
236
|
+
if (isEOA) {
|
|
237
|
+
subData = subDataService.aaveV3LeverageManagementOnPriceGeneric.decode(subStruct.subData);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
subData = subDataService.aaveV3LeverageManagementOnPriceSubData.decode(subStruct.subData);
|
|
241
|
+
}
|
|
242
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
243
|
+
_position.strategyData.decoded.subData = subData;
|
|
244
|
+
_position.positionId = (0, utils_1.getPositionId)(_position.chainId, _position.protocol.id, _position.owner, Math.random());
|
|
245
|
+
_position.specific = {
|
|
246
|
+
collAsset: subData.collAsset,
|
|
247
|
+
debtAsset: subData.debtAsset,
|
|
248
|
+
baseToken: triggerData.baseTokenAddress,
|
|
249
|
+
quoteToken: triggerData.quoteTokenAddress,
|
|
250
|
+
price: triggerData.price,
|
|
251
|
+
ratioState: triggerData.ratioState,
|
|
252
|
+
debtAssetId: subData.debtAssetId,
|
|
253
|
+
collAssetId: subData.collAssetId,
|
|
254
|
+
ratio: subData.targetRatio,
|
|
255
|
+
};
|
|
256
|
+
return _position;
|
|
257
|
+
}
|
|
258
|
+
function parseAaveV3CloseOnPrice(position, parseData) {
|
|
259
|
+
const _position = (0, lodash_1.cloneDeep)(position);
|
|
260
|
+
const { subStruct } = parseData.subscriptionEventData;
|
|
261
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
262
|
+
_position.positionId = (0, utils_1.getPositionId)(_position.chainId, _position.protocol.id, _position.owner, AAVE_V3_MARKET_ADDRESSES[_position.chainId]);
|
|
263
|
+
if (isEOA) {
|
|
264
|
+
const triggerData = triggerService.aaveV3QuotePriceRangeTrigger.decode(subStruct.triggerData);
|
|
265
|
+
const subData = subDataService.aaveV3CloseGenericSubData.decode(subStruct.subData);
|
|
266
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
267
|
+
_position.strategyData.decoded.subData = subData;
|
|
268
|
+
_position.specific = {
|
|
269
|
+
collAsset: subData.collAsset,
|
|
270
|
+
collAssetId: subData.collAssetId,
|
|
271
|
+
debtAsset: subData.debtAsset,
|
|
272
|
+
debtAssetId: subData.debtAssetId,
|
|
273
|
+
baseToken: triggerData.collToken,
|
|
274
|
+
quoteToken: triggerData.debtToken,
|
|
275
|
+
stopLossPrice: triggerData.lowerPrice,
|
|
276
|
+
takeProfitPrice: triggerData.upperPrice,
|
|
277
|
+
};
|
|
278
|
+
_position.strategy.strategyId = enums_1.Strategies.Identifiers.EoaCloseOnPrice;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
282
|
+
const subData = subDataService.aaveV3QuotePriceSubData.decode(subStruct.subData);
|
|
283
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
284
|
+
_position.strategyData.decoded.subData = subData;
|
|
285
|
+
_position.specific = {
|
|
286
|
+
collAsset: subData.collAsset,
|
|
287
|
+
collAssetId: subData.collAssetId,
|
|
288
|
+
debtAsset: subData.debtAsset,
|
|
289
|
+
debtAssetId: subData.debtAssetId,
|
|
290
|
+
baseToken: triggerData.baseTokenAddress,
|
|
291
|
+
quoteToken: triggerData.quoteTokenAddress,
|
|
292
|
+
price: triggerData.price,
|
|
293
|
+
ratioState: triggerData.ratioState,
|
|
294
|
+
};
|
|
295
|
+
const { ratioState } = (0, utils_1.getRatioStateInfoForAaveCloseStrategy)(_position.specific.ratioState, (0, utils_1.wethToEthByAddress)(_position.specific.collAsset, parseData.chainId), (0, utils_1.wethToEthByAddress)(_position.specific.debtAsset, parseData.chainId), parseData.chainId);
|
|
296
|
+
_position.strategy.strategyId = (0, utils_1.isRatioStateOver)(ratioState)
|
|
297
|
+
? enums_1.Strategies.IdOverrides.TakeProfit
|
|
298
|
+
: enums_1.Strategies.IdOverrides.StopLoss;
|
|
299
|
+
}
|
|
225
300
|
return _position;
|
|
226
301
|
}
|
|
227
302
|
function parseMorphoAaveV2LeverageManagement(position, parseData) {
|
|
@@ -255,36 +330,6 @@ function parseMorphoAaveV2LeverageManagement(position, parseData) {
|
|
|
255
330
|
_position.strategy.strategyId = enums_1.Strategies.IdOverrides.LeverageManagement;
|
|
256
331
|
return _position;
|
|
257
332
|
}
|
|
258
|
-
function parseAaveV3CloseOnPrice(position, parseData) {
|
|
259
|
-
const _position = (0, lodash_1.cloneDeep)(position);
|
|
260
|
-
const { subStruct } = parseData.subscriptionEventData;
|
|
261
|
-
// TODO -> should prob be quote price range trigger?
|
|
262
|
-
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
263
|
-
// TODO -> should change this?
|
|
264
|
-
const subData = subDataService.aaveV3QuotePriceSubData.decode(subStruct.subData);
|
|
265
|
-
_position.strategyData.decoded.triggerData = triggerData;
|
|
266
|
-
_position.strategyData.decoded.subData = subData;
|
|
267
|
-
_position.positionId = (0, utils_1.getPositionId)(_position.chainId, _position.protocol.id, _position.owner, AAVE_V3_MARKET_ADDRESSES[_position.chainId]);
|
|
268
|
-
_position.specific = {
|
|
269
|
-
collAsset: subData.collAsset,
|
|
270
|
-
collAssetId: subData.collAssetId,
|
|
271
|
-
debtAsset: subData.debtAsset,
|
|
272
|
-
debtAssetId: subData.debtAssetId,
|
|
273
|
-
baseToken: triggerData.baseTokenAddress,
|
|
274
|
-
quoteToken: triggerData.quoteTokenAddress,
|
|
275
|
-
price: triggerData.price,
|
|
276
|
-
ratioState: triggerData.ratioState,
|
|
277
|
-
};
|
|
278
|
-
const { ratioState } = (0, utils_1.getRatioStateInfoForAaveCloseStrategy)(_position.specific.ratioState, (0, utils_1.wethToEthByAddress)(_position.specific.collAsset, parseData.chainId), (0, utils_1.wethToEthByAddress)(_position.specific.debtAsset, parseData.chainId), parseData.chainId);
|
|
279
|
-
// TODO -> Check if those changes break something?
|
|
280
|
-
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
281
|
-
_position.strategy.strategyId = isEOA
|
|
282
|
-
? enums_1.Strategies.Identifiers.EoaCloseOnPrice
|
|
283
|
-
: (_position.strategy.strategyId = (0, utils_1.isRatioStateOver)(ratioState)
|
|
284
|
-
? enums_1.Strategies.IdOverrides.TakeProfit
|
|
285
|
-
: enums_1.Strategies.IdOverrides.StopLoss);
|
|
286
|
-
return _position;
|
|
287
|
-
}
|
|
288
333
|
function parseAaveV3CloseOnPriceWithMaximumGasPrice(position, parseData) {
|
|
289
334
|
const _position = (0, lodash_1.cloneDeep)(position);
|
|
290
335
|
const { subStruct } = parseData.subscriptionEventData;
|
|
@@ -709,30 +754,6 @@ function parseMorphoBlueLeverageManagementOnPrice(position, parseData) {
|
|
|
709
754
|
};
|
|
710
755
|
return _position;
|
|
711
756
|
}
|
|
712
|
-
function parseAaveV3LeverageManagementOnPrice(position, parseData) {
|
|
713
|
-
const _position = (0, lodash_1.cloneDeep)(position);
|
|
714
|
-
const { subStruct } = parseData.subscriptionEventData;
|
|
715
|
-
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
716
|
-
const subData = subDataService.aaveV3LeverageManagementOnPriceGeneric.decode(subStruct.subData);
|
|
717
|
-
_position.strategyData.decoded.triggerData = triggerData;
|
|
718
|
-
_position.strategyData.decoded.subData = subData;
|
|
719
|
-
_position.positionId = (0, utils_1.getPositionId)(_position.chainId, _position.protocol.id, _position.owner, Math.random());
|
|
720
|
-
_position.specific = {
|
|
721
|
-
collAsset: subData.collAsset,
|
|
722
|
-
debtAsset: subData.debtAsset,
|
|
723
|
-
baseToken: triggerData.baseTokenAddress,
|
|
724
|
-
quoteToken: triggerData.quoteTokenAddress,
|
|
725
|
-
price: triggerData.price,
|
|
726
|
-
ratioState: triggerData.ratioState,
|
|
727
|
-
debtAssetId: subData.debtAssetId,
|
|
728
|
-
collAssetId: subData.collAssetId,
|
|
729
|
-
ratio: subData.targetRatio,
|
|
730
|
-
};
|
|
731
|
-
// // TODO -> check if this change breaks something?
|
|
732
|
-
// const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
733
|
-
// _position.strategy.strategyId = isEOA ? Strategies.IdOverrides.EoaLeverageManagementOnPrice : Strategies.IdOverrides.LeverageManagementOnPrice;
|
|
734
|
-
return _position;
|
|
735
|
-
}
|
|
736
757
|
function parseLiquityV2CloseOnPrice(position, parseData) {
|
|
737
758
|
const _position = (0, lodash_1.cloneDeep)(position);
|
|
738
759
|
const { subStruct } = parseData.subscriptionEventData;
|
package/cjs/types/index.d.ts
CHANGED
|
@@ -120,6 +120,16 @@ export declare namespace Position {
|
|
|
120
120
|
price: string;
|
|
121
121
|
ratioState: RatioState;
|
|
122
122
|
}
|
|
123
|
+
interface AaveV3CloseOnPriceGeneric extends Base {
|
|
124
|
+
collAsset: EthereumAddress;
|
|
125
|
+
collAssetId: number;
|
|
126
|
+
debtAsset: EthereumAddress;
|
|
127
|
+
debtAssetId: number;
|
|
128
|
+
baseToken: EthereumAddress;
|
|
129
|
+
quoteToken: EthereumAddress;
|
|
130
|
+
stopLossPrice: string;
|
|
131
|
+
takeProfitPrice: string;
|
|
132
|
+
}
|
|
123
133
|
interface BoostOnPriceAave extends CloseOnPriceAave {
|
|
124
134
|
ratio: number;
|
|
125
135
|
}
|
|
@@ -188,7 +198,7 @@ export declare namespace Position {
|
|
|
188
198
|
takeProfitType: CloseToAssetType | undefined;
|
|
189
199
|
}
|
|
190
200
|
}
|
|
191
|
-
type SpecificAny = Specific.CloseOnPrice | Specific.TrailingStop | Specific.RatioProtection | Specific.CloseOnPriceAave | Specific.BoostOnPriceAave | Specific.CloseOnPriceWithMaximumGasPriceAave | Specific.DebtInFrontRepay | Specific.LeverageManagementCrvUSD | Specific.CloseOnPriceLiquityV2 | Specific.BoostOnPriceMorpho | Specific.BoostOnPriceLiquityV2 | Specific.PaybackLiquityV2 | Specific.CompoundV3LeverageManagementOnPrice | Specific.CompoundV3CloseOnPrice;
|
|
201
|
+
type SpecificAny = Specific.CloseOnPrice | Specific.TrailingStop | Specific.RatioProtection | Specific.CloseOnPriceAave | Specific.BoostOnPriceAave | Specific.CloseOnPriceWithMaximumGasPriceAave | Specific.DebtInFrontRepay | Specific.LeverageManagementCrvUSD | Specific.CloseOnPriceLiquityV2 | Specific.BoostOnPriceMorpho | Specific.BoostOnPriceLiquityV2 | Specific.PaybackLiquityV2 | Specific.CompoundV3LeverageManagementOnPrice | Specific.CompoundV3CloseOnPrice | Specific.AaveV3CloseOnPriceGeneric;
|
|
192
202
|
interface Automated {
|
|
193
203
|
chainId: ChainId;
|
|
194
204
|
positionId: string;
|
|
@@ -163,14 +163,17 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
163
163
|
const { subStruct, subId, subHash } = parseData.subscriptionEventData;
|
|
164
164
|
const { isEnabled } = parseData.strategiesSubsData;
|
|
165
165
|
const triggerData = triggerService.aaveV3RatioTrigger.decode(subStruct.triggerData);
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
167
|
+
let subData;
|
|
168
|
+
if (isEOA) {
|
|
169
|
+
subData = subDataService.aaveV3LeverageManagementSubDataWithoutSubProxy.decode(subStruct.subData);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
subData = subDataService.aaveV3LeverageManagementSubData.decode(subStruct.subData);
|
|
173
|
+
}
|
|
168
174
|
_position.strategyData.decoded.triggerData = triggerData;
|
|
169
175
|
_position.strategyData.decoded.subData = subData;
|
|
170
176
|
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, triggerData.market);
|
|
171
|
-
// TODO -> check if this change breaks something?
|
|
172
|
-
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
173
|
-
// TODO -> check if this change breaks something?
|
|
174
177
|
const isRepay = [Strategies.Identifiers.Repay, Strategies.Identifiers.EoaRepay].includes(_position.strategy.strategyId);
|
|
175
178
|
if (isRepay) {
|
|
176
179
|
_position.specific = {
|
|
@@ -178,8 +181,8 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
178
181
|
targetRepayRatio: subData.targetRatio,
|
|
179
182
|
repayEnabled: true,
|
|
180
183
|
subId1: Number(subId),
|
|
184
|
+
mergeWithId: isEOA ? Strategies.Identifiers.EoaBoost : Strategies.Identifiers.EoaBoost,
|
|
181
185
|
subHashRepay: subHash,
|
|
182
|
-
mergeWithId: isEOA ? Strategies.Identifiers.EoaBoost : Strategies.Identifiers.Boost,
|
|
183
186
|
};
|
|
184
187
|
}
|
|
185
188
|
else {
|
|
@@ -188,11 +191,83 @@ function parseAaveV3LeverageManagement(position, parseData) {
|
|
|
188
191
|
targetBoostRatio: subData.targetRatio,
|
|
189
192
|
boostEnabled: isEnabled,
|
|
190
193
|
subId2: Number(subId),
|
|
191
|
-
subHashBoost: subHash,
|
|
192
194
|
mergeId: isEOA ? Strategies.Identifiers.EoaBoost : Strategies.Identifiers.Boost,
|
|
195
|
+
subHashBoost: subHash,
|
|
193
196
|
};
|
|
194
197
|
}
|
|
195
|
-
_position.strategy.strategyId =
|
|
198
|
+
_position.strategy.strategyId = Strategies.IdOverrides.LeverageManagement;
|
|
199
|
+
return _position;
|
|
200
|
+
}
|
|
201
|
+
function parseAaveV3LeverageManagementOnPrice(position, parseData) {
|
|
202
|
+
const _position = cloneDeep(position);
|
|
203
|
+
const { subStruct } = parseData.subscriptionEventData;
|
|
204
|
+
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
205
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
206
|
+
let subData;
|
|
207
|
+
if (isEOA) {
|
|
208
|
+
subData = subDataService.aaveV3LeverageManagementOnPriceGeneric.decode(subStruct.subData);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
subData = subDataService.aaveV3LeverageManagementOnPriceSubData.decode(subStruct.subData);
|
|
212
|
+
}
|
|
213
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
214
|
+
_position.strategyData.decoded.subData = subData;
|
|
215
|
+
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, Math.random());
|
|
216
|
+
_position.specific = {
|
|
217
|
+
collAsset: subData.collAsset,
|
|
218
|
+
debtAsset: subData.debtAsset,
|
|
219
|
+
baseToken: triggerData.baseTokenAddress,
|
|
220
|
+
quoteToken: triggerData.quoteTokenAddress,
|
|
221
|
+
price: triggerData.price,
|
|
222
|
+
ratioState: triggerData.ratioState,
|
|
223
|
+
debtAssetId: subData.debtAssetId,
|
|
224
|
+
collAssetId: subData.collAssetId,
|
|
225
|
+
ratio: subData.targetRatio,
|
|
226
|
+
};
|
|
227
|
+
return _position;
|
|
228
|
+
}
|
|
229
|
+
function parseAaveV3CloseOnPrice(position, parseData) {
|
|
230
|
+
const _position = cloneDeep(position);
|
|
231
|
+
const { subStruct } = parseData.subscriptionEventData;
|
|
232
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
233
|
+
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, AAVE_V3_MARKET_ADDRESSES[_position.chainId]);
|
|
234
|
+
if (isEOA) {
|
|
235
|
+
const triggerData = triggerService.aaveV3QuotePriceRangeTrigger.decode(subStruct.triggerData);
|
|
236
|
+
const subData = subDataService.aaveV3CloseGenericSubData.decode(subStruct.subData);
|
|
237
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
238
|
+
_position.strategyData.decoded.subData = subData;
|
|
239
|
+
_position.specific = {
|
|
240
|
+
collAsset: subData.collAsset,
|
|
241
|
+
collAssetId: subData.collAssetId,
|
|
242
|
+
debtAsset: subData.debtAsset,
|
|
243
|
+
debtAssetId: subData.debtAssetId,
|
|
244
|
+
baseToken: triggerData.collToken,
|
|
245
|
+
quoteToken: triggerData.debtToken,
|
|
246
|
+
stopLossPrice: triggerData.lowerPrice,
|
|
247
|
+
takeProfitPrice: triggerData.upperPrice,
|
|
248
|
+
};
|
|
249
|
+
_position.strategy.strategyId = Strategies.Identifiers.EoaCloseOnPrice;
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
253
|
+
const subData = subDataService.aaveV3QuotePriceSubData.decode(subStruct.subData);
|
|
254
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
255
|
+
_position.strategyData.decoded.subData = subData;
|
|
256
|
+
_position.specific = {
|
|
257
|
+
collAsset: subData.collAsset,
|
|
258
|
+
collAssetId: subData.collAssetId,
|
|
259
|
+
debtAsset: subData.debtAsset,
|
|
260
|
+
debtAssetId: subData.debtAssetId,
|
|
261
|
+
baseToken: triggerData.baseTokenAddress,
|
|
262
|
+
quoteToken: triggerData.quoteTokenAddress,
|
|
263
|
+
price: triggerData.price,
|
|
264
|
+
ratioState: triggerData.ratioState,
|
|
265
|
+
};
|
|
266
|
+
const { ratioState } = getRatioStateInfoForAaveCloseStrategy(_position.specific.ratioState, wethToEthByAddress(_position.specific.collAsset, parseData.chainId), wethToEthByAddress(_position.specific.debtAsset, parseData.chainId), parseData.chainId);
|
|
267
|
+
_position.strategy.strategyId = isRatioStateOver(ratioState)
|
|
268
|
+
? Strategies.IdOverrides.TakeProfit
|
|
269
|
+
: Strategies.IdOverrides.StopLoss;
|
|
270
|
+
}
|
|
196
271
|
return _position;
|
|
197
272
|
}
|
|
198
273
|
function parseMorphoAaveV2LeverageManagement(position, parseData) {
|
|
@@ -226,36 +301,6 @@ function parseMorphoAaveV2LeverageManagement(position, parseData) {
|
|
|
226
301
|
_position.strategy.strategyId = Strategies.IdOverrides.LeverageManagement;
|
|
227
302
|
return _position;
|
|
228
303
|
}
|
|
229
|
-
function parseAaveV3CloseOnPrice(position, parseData) {
|
|
230
|
-
const _position = cloneDeep(position);
|
|
231
|
-
const { subStruct } = parseData.subscriptionEventData;
|
|
232
|
-
// TODO -> should prob be quote price range trigger?
|
|
233
|
-
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
234
|
-
// TODO -> should change this?
|
|
235
|
-
const subData = subDataService.aaveV3QuotePriceSubData.decode(subStruct.subData);
|
|
236
|
-
_position.strategyData.decoded.triggerData = triggerData;
|
|
237
|
-
_position.strategyData.decoded.subData = subData;
|
|
238
|
-
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, AAVE_V3_MARKET_ADDRESSES[_position.chainId]);
|
|
239
|
-
_position.specific = {
|
|
240
|
-
collAsset: subData.collAsset,
|
|
241
|
-
collAssetId: subData.collAssetId,
|
|
242
|
-
debtAsset: subData.debtAsset,
|
|
243
|
-
debtAssetId: subData.debtAssetId,
|
|
244
|
-
baseToken: triggerData.baseTokenAddress,
|
|
245
|
-
quoteToken: triggerData.quoteTokenAddress,
|
|
246
|
-
price: triggerData.price,
|
|
247
|
-
ratioState: triggerData.ratioState,
|
|
248
|
-
};
|
|
249
|
-
const { ratioState } = getRatioStateInfoForAaveCloseStrategy(_position.specific.ratioState, wethToEthByAddress(_position.specific.collAsset, parseData.chainId), wethToEthByAddress(_position.specific.debtAsset, parseData.chainId), parseData.chainId);
|
|
250
|
-
// TODO -> Check if those changes break something?
|
|
251
|
-
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
252
|
-
_position.strategy.strategyId = isEOA
|
|
253
|
-
? Strategies.Identifiers.EoaCloseOnPrice
|
|
254
|
-
: (_position.strategy.strategyId = isRatioStateOver(ratioState)
|
|
255
|
-
? Strategies.IdOverrides.TakeProfit
|
|
256
|
-
: Strategies.IdOverrides.StopLoss);
|
|
257
|
-
return _position;
|
|
258
|
-
}
|
|
259
304
|
function parseAaveV3CloseOnPriceWithMaximumGasPrice(position, parseData) {
|
|
260
305
|
const _position = cloneDeep(position);
|
|
261
306
|
const { subStruct } = parseData.subscriptionEventData;
|
|
@@ -680,30 +725,6 @@ function parseMorphoBlueLeverageManagementOnPrice(position, parseData) {
|
|
|
680
725
|
};
|
|
681
726
|
return _position;
|
|
682
727
|
}
|
|
683
|
-
function parseAaveV3LeverageManagementOnPrice(position, parseData) {
|
|
684
|
-
const _position = cloneDeep(position);
|
|
685
|
-
const { subStruct } = parseData.subscriptionEventData;
|
|
686
|
-
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
687
|
-
const subData = subDataService.aaveV3LeverageManagementOnPriceGeneric.decode(subStruct.subData);
|
|
688
|
-
_position.strategyData.decoded.triggerData = triggerData;
|
|
689
|
-
_position.strategyData.decoded.subData = subData;
|
|
690
|
-
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, Math.random());
|
|
691
|
-
_position.specific = {
|
|
692
|
-
collAsset: subData.collAsset,
|
|
693
|
-
debtAsset: subData.debtAsset,
|
|
694
|
-
baseToken: triggerData.baseTokenAddress,
|
|
695
|
-
quoteToken: triggerData.quoteTokenAddress,
|
|
696
|
-
price: triggerData.price,
|
|
697
|
-
ratioState: triggerData.ratioState,
|
|
698
|
-
debtAssetId: subData.debtAssetId,
|
|
699
|
-
collAssetId: subData.collAssetId,
|
|
700
|
-
ratio: subData.targetRatio,
|
|
701
|
-
};
|
|
702
|
-
// // TODO -> check if this change breaks something?
|
|
703
|
-
// const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
704
|
-
// _position.strategy.strategyId = isEOA ? Strategies.IdOverrides.EoaLeverageManagementOnPrice : Strategies.IdOverrides.LeverageManagementOnPrice;
|
|
705
|
-
return _position;
|
|
706
|
-
}
|
|
707
728
|
function parseLiquityV2CloseOnPrice(position, parseData) {
|
|
708
729
|
const _position = cloneDeep(position);
|
|
709
730
|
const { subStruct } = parseData.subscriptionEventData;
|
package/esm/types/index.d.ts
CHANGED
|
@@ -120,6 +120,16 @@ export declare namespace Position {
|
|
|
120
120
|
price: string;
|
|
121
121
|
ratioState: RatioState;
|
|
122
122
|
}
|
|
123
|
+
interface AaveV3CloseOnPriceGeneric extends Base {
|
|
124
|
+
collAsset: EthereumAddress;
|
|
125
|
+
collAssetId: number;
|
|
126
|
+
debtAsset: EthereumAddress;
|
|
127
|
+
debtAssetId: number;
|
|
128
|
+
baseToken: EthereumAddress;
|
|
129
|
+
quoteToken: EthereumAddress;
|
|
130
|
+
stopLossPrice: string;
|
|
131
|
+
takeProfitPrice: string;
|
|
132
|
+
}
|
|
123
133
|
interface BoostOnPriceAave extends CloseOnPriceAave {
|
|
124
134
|
ratio: number;
|
|
125
135
|
}
|
|
@@ -188,7 +198,7 @@ export declare namespace Position {
|
|
|
188
198
|
takeProfitType: CloseToAssetType | undefined;
|
|
189
199
|
}
|
|
190
200
|
}
|
|
191
|
-
type SpecificAny = Specific.CloseOnPrice | Specific.TrailingStop | Specific.RatioProtection | Specific.CloseOnPriceAave | Specific.BoostOnPriceAave | Specific.CloseOnPriceWithMaximumGasPriceAave | Specific.DebtInFrontRepay | Specific.LeverageManagementCrvUSD | Specific.CloseOnPriceLiquityV2 | Specific.BoostOnPriceMorpho | Specific.BoostOnPriceLiquityV2 | Specific.PaybackLiquityV2 | Specific.CompoundV3LeverageManagementOnPrice | Specific.CompoundV3CloseOnPrice;
|
|
201
|
+
type SpecificAny = Specific.CloseOnPrice | Specific.TrailingStop | Specific.RatioProtection | Specific.CloseOnPriceAave | Specific.BoostOnPriceAave | Specific.CloseOnPriceWithMaximumGasPriceAave | Specific.DebtInFrontRepay | Specific.LeverageManagementCrvUSD | Specific.CloseOnPriceLiquityV2 | Specific.BoostOnPriceMorpho | Specific.BoostOnPriceLiquityV2 | Specific.PaybackLiquityV2 | Specific.CompoundV3LeverageManagementOnPrice | Specific.CompoundV3CloseOnPrice | Specific.AaveV3CloseOnPriceGeneric;
|
|
192
202
|
interface Automated {
|
|
193
203
|
chainId: ChainId;
|
|
194
204
|
positionId: string;
|
package/package.json
CHANGED
|
@@ -235,18 +235,19 @@ function parseAaveV3LeverageManagement(position: Position.Automated, parseData:
|
|
|
235
235
|
const { isEnabled } = parseData.strategiesSubsData;
|
|
236
236
|
|
|
237
237
|
const triggerData = triggerService.aaveV3RatioTrigger.decode(subStruct.triggerData);
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
239
|
+
let subData;
|
|
240
|
+
if (isEOA) {
|
|
241
|
+
subData = subDataService.aaveV3LeverageManagementSubDataWithoutSubProxy.decode(subStruct.subData);
|
|
242
|
+
} else {
|
|
243
|
+
subData = subDataService.aaveV3LeverageManagementSubData.decode(subStruct.subData);
|
|
244
|
+
}
|
|
240
245
|
|
|
241
246
|
_position.strategyData.decoded.triggerData = triggerData;
|
|
242
247
|
_position.strategyData.decoded.subData = subData;
|
|
243
248
|
|
|
244
249
|
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, triggerData.market);
|
|
245
250
|
|
|
246
|
-
// TODO -> check if this change breaks something?
|
|
247
|
-
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
248
|
-
|
|
249
|
-
// TODO -> check if this change breaks something?
|
|
250
251
|
const isRepay = [Strategies.Identifiers.Repay, Strategies.Identifiers.EoaRepay].includes(_position.strategy.strategyId as Strategies.Identifiers);
|
|
251
252
|
|
|
252
253
|
if (isRepay) {
|
|
@@ -255,8 +256,8 @@ function parseAaveV3LeverageManagement(position: Position.Automated, parseData:
|
|
|
255
256
|
targetRepayRatio: subData.targetRatio,
|
|
256
257
|
repayEnabled: true,
|
|
257
258
|
subId1: Number(subId),
|
|
259
|
+
mergeWithId: isEOA ? Strategies.Identifiers.EoaBoost : Strategies.Identifiers.EoaBoost,
|
|
258
260
|
subHashRepay: subHash,
|
|
259
|
-
mergeWithId: isEOA ? Strategies.Identifiers.EoaBoost : Strategies.Identifiers.Boost,
|
|
260
261
|
};
|
|
261
262
|
} else {
|
|
262
263
|
_position.specific = {
|
|
@@ -264,12 +265,106 @@ function parseAaveV3LeverageManagement(position: Position.Automated, parseData:
|
|
|
264
265
|
targetBoostRatio: subData.targetRatio,
|
|
265
266
|
boostEnabled: isEnabled,
|
|
266
267
|
subId2: Number(subId),
|
|
267
|
-
subHashBoost: subHash,
|
|
268
268
|
mergeId: isEOA ? Strategies.Identifiers.EoaBoost : Strategies.Identifiers.Boost,
|
|
269
|
+
subHashBoost: subHash,
|
|
269
270
|
};
|
|
270
271
|
}
|
|
271
272
|
|
|
272
|
-
_position.strategy.strategyId =
|
|
273
|
+
_position.strategy.strategyId = Strategies.IdOverrides.LeverageManagement;
|
|
274
|
+
|
|
275
|
+
return _position;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function parseAaveV3LeverageManagementOnPrice(position: Position.Automated, parseData: ParseData): Position.Automated {
|
|
279
|
+
const _position = cloneDeep(position);
|
|
280
|
+
const { subStruct } = parseData.subscriptionEventData;
|
|
281
|
+
|
|
282
|
+
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
283
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
284
|
+
let subData;
|
|
285
|
+
if (isEOA) {
|
|
286
|
+
subData = subDataService.aaveV3LeverageManagementOnPriceGeneric.decode(subStruct.subData);
|
|
287
|
+
} else {
|
|
288
|
+
subData = subDataService.aaveV3LeverageManagementOnPriceSubData.decode(subStruct.subData);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
292
|
+
_position.strategyData.decoded.subData = subData;
|
|
293
|
+
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, Math.random());
|
|
294
|
+
|
|
295
|
+
_position.specific = {
|
|
296
|
+
collAsset: subData.collAsset,
|
|
297
|
+
debtAsset: subData.debtAsset,
|
|
298
|
+
baseToken: triggerData.baseTokenAddress,
|
|
299
|
+
quoteToken: triggerData.quoteTokenAddress,
|
|
300
|
+
price: triggerData.price,
|
|
301
|
+
ratioState: triggerData.ratioState,
|
|
302
|
+
debtAssetId: subData.debtAssetId,
|
|
303
|
+
collAssetId: subData.collAssetId,
|
|
304
|
+
ratio: subData.targetRatio,
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
return _position;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function parseAaveV3CloseOnPrice(position: Position.Automated, parseData: ParseData): Position.Automated {
|
|
311
|
+
const _position = cloneDeep(position);
|
|
312
|
+
|
|
313
|
+
const { subStruct } = parseData.subscriptionEventData;
|
|
314
|
+
|
|
315
|
+
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
316
|
+
|
|
317
|
+
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, AAVE_V3_MARKET_ADDRESSES[_position.chainId]);
|
|
318
|
+
|
|
319
|
+
if (isEOA) {
|
|
320
|
+
const triggerData = triggerService.aaveV3QuotePriceRangeTrigger.decode(subStruct.triggerData);
|
|
321
|
+
const subData = subDataService.aaveV3CloseGenericSubData.decode(subStruct.subData);
|
|
322
|
+
|
|
323
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
324
|
+
_position.strategyData.decoded.subData = subData;
|
|
325
|
+
|
|
326
|
+
_position.specific = {
|
|
327
|
+
collAsset: subData.collAsset,
|
|
328
|
+
collAssetId: subData.collAssetId,
|
|
329
|
+
debtAsset: subData.debtAsset,
|
|
330
|
+
debtAssetId: subData.debtAssetId,
|
|
331
|
+
baseToken: triggerData.collToken,
|
|
332
|
+
quoteToken: triggerData.debtToken,
|
|
333
|
+
stopLossPrice: triggerData.lowerPrice,
|
|
334
|
+
takeProfitPrice: triggerData.upperPrice,
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
_position.strategy.strategyId = Strategies.Identifiers.EoaCloseOnPrice;
|
|
338
|
+
} else {
|
|
339
|
+
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
340
|
+
const subData = subDataService.aaveV3QuotePriceSubData.decode(subStruct.subData);
|
|
341
|
+
|
|
342
|
+
_position.strategyData.decoded.triggerData = triggerData;
|
|
343
|
+
_position.strategyData.decoded.subData = subData;
|
|
344
|
+
|
|
345
|
+
_position.specific = {
|
|
346
|
+
collAsset: subData.collAsset,
|
|
347
|
+
collAssetId: subData.collAssetId,
|
|
348
|
+
debtAsset: subData.debtAsset,
|
|
349
|
+
debtAssetId: subData.debtAssetId,
|
|
350
|
+
baseToken: triggerData.baseTokenAddress,
|
|
351
|
+
quoteToken: triggerData.quoteTokenAddress,
|
|
352
|
+
price: triggerData.price,
|
|
353
|
+
ratioState: triggerData.ratioState,
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
const { ratioState } = getRatioStateInfoForAaveCloseStrategy(
|
|
357
|
+
_position.specific.ratioState,
|
|
358
|
+
wethToEthByAddress(_position.specific.collAsset, parseData.chainId),
|
|
359
|
+
wethToEthByAddress(_position.specific.debtAsset, parseData.chainId),
|
|
360
|
+
parseData.chainId,
|
|
361
|
+
);
|
|
362
|
+
|
|
363
|
+
_position.strategy.strategyId = isRatioStateOver(ratioState)
|
|
364
|
+
? Strategies.IdOverrides.TakeProfit
|
|
365
|
+
: Strategies.IdOverrides.StopLoss;
|
|
366
|
+
}
|
|
367
|
+
|
|
273
368
|
return _position;
|
|
274
369
|
}
|
|
275
370
|
|
|
@@ -312,50 +407,6 @@ function parseMorphoAaveV2LeverageManagement(position: Position.Automated, parse
|
|
|
312
407
|
return _position;
|
|
313
408
|
}
|
|
314
409
|
|
|
315
|
-
function parseAaveV3CloseOnPrice(position: Position.Automated, parseData: ParseData): Position.Automated {
|
|
316
|
-
const _position = cloneDeep(position);
|
|
317
|
-
|
|
318
|
-
const { subStruct } = parseData.subscriptionEventData;
|
|
319
|
-
|
|
320
|
-
// TODO -> should prob be quote price range trigger?
|
|
321
|
-
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
322
|
-
// TODO -> should change this?
|
|
323
|
-
const subData = subDataService.aaveV3QuotePriceSubData.decode(subStruct.subData);
|
|
324
|
-
|
|
325
|
-
_position.strategyData.decoded.triggerData = triggerData;
|
|
326
|
-
_position.strategyData.decoded.subData = subData;
|
|
327
|
-
|
|
328
|
-
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, AAVE_V3_MARKET_ADDRESSES[_position.chainId]);
|
|
329
|
-
|
|
330
|
-
_position.specific = {
|
|
331
|
-
collAsset: subData.collAsset,
|
|
332
|
-
collAssetId: subData.collAssetId,
|
|
333
|
-
debtAsset: subData.debtAsset,
|
|
334
|
-
debtAssetId: subData.debtAssetId,
|
|
335
|
-
baseToken: triggerData.baseTokenAddress,
|
|
336
|
-
quoteToken: triggerData.quoteTokenAddress,
|
|
337
|
-
price: triggerData.price,
|
|
338
|
-
ratioState: triggerData.ratioState,
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
const { ratioState } = getRatioStateInfoForAaveCloseStrategy(
|
|
342
|
-
_position.specific.ratioState,
|
|
343
|
-
wethToEthByAddress(_position.specific.collAsset, parseData.chainId),
|
|
344
|
-
wethToEthByAddress(_position.specific.debtAsset, parseData.chainId),
|
|
345
|
-
parseData.chainId,
|
|
346
|
-
);
|
|
347
|
-
|
|
348
|
-
// TODO -> Check if those changes break something?
|
|
349
|
-
const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
350
|
-
_position.strategy.strategyId = isEOA
|
|
351
|
-
? Strategies.Identifiers.EoaCloseOnPrice
|
|
352
|
-
: (_position.strategy.strategyId = isRatioStateOver(ratioState)
|
|
353
|
-
? Strategies.IdOverrides.TakeProfit
|
|
354
|
-
: Strategies.IdOverrides.StopLoss);
|
|
355
|
-
|
|
356
|
-
return _position;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
410
|
function parseAaveV3CloseOnPriceWithMaximumGasPrice(position: Position.Automated, parseData: ParseData): Position.Automated {
|
|
360
411
|
const _position = cloneDeep(position);
|
|
361
412
|
|
|
@@ -929,37 +980,6 @@ function parseMorphoBlueLeverageManagementOnPrice(position: Position.Automated,
|
|
|
929
980
|
return _position;
|
|
930
981
|
}
|
|
931
982
|
|
|
932
|
-
function parseAaveV3LeverageManagementOnPrice(position: Position.Automated, parseData: ParseData): Position.Automated {
|
|
933
|
-
const _position = cloneDeep(position);
|
|
934
|
-
|
|
935
|
-
const { subStruct } = parseData.subscriptionEventData;
|
|
936
|
-
|
|
937
|
-
const triggerData = triggerService.aaveV3QuotePriceTrigger.decode(subStruct.triggerData);
|
|
938
|
-
const subData = subDataService.aaveV3LeverageManagementOnPriceGeneric.decode(subStruct.subData);
|
|
939
|
-
|
|
940
|
-
_position.strategyData.decoded.triggerData = triggerData;
|
|
941
|
-
_position.strategyData.decoded.subData = subData;
|
|
942
|
-
_position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, Math.random());
|
|
943
|
-
|
|
944
|
-
_position.specific = {
|
|
945
|
-
collAsset: subData.collAsset,
|
|
946
|
-
debtAsset: subData.debtAsset,
|
|
947
|
-
baseToken: triggerData.baseTokenAddress,
|
|
948
|
-
quoteToken: triggerData.quoteTokenAddress,
|
|
949
|
-
price: triggerData.price,
|
|
950
|
-
ratioState: triggerData.ratioState,
|
|
951
|
-
debtAssetId: subData.debtAssetId,
|
|
952
|
-
collAssetId: subData.collAssetId,
|
|
953
|
-
ratio: subData.targetRatio,
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
// // TODO -> check if this change breaks something?
|
|
957
|
-
// const isEOA = _position.strategy.strategyId.includes('eoa');
|
|
958
|
-
// _position.strategy.strategyId = isEOA ? Strategies.IdOverrides.EoaLeverageManagementOnPrice : Strategies.IdOverrides.LeverageManagementOnPrice;
|
|
959
|
-
|
|
960
|
-
return _position;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
983
|
function parseLiquityV2CloseOnPrice(position: Position.Automated, parseData: ParseData): Position.Automated {
|
|
964
984
|
const _position = cloneDeep(position);
|
|
965
985
|
|
package/src/types/index.ts
CHANGED
|
@@ -166,6 +166,18 @@ export declare namespace Position {
|
|
|
166
166
|
price: string,
|
|
167
167
|
ratioState: RatioState,
|
|
168
168
|
}
|
|
169
|
+
|
|
170
|
+
interface AaveV3CloseOnPriceGeneric extends Base {
|
|
171
|
+
collAsset: EthereumAddress,
|
|
172
|
+
collAssetId: number,
|
|
173
|
+
debtAsset: EthereumAddress,
|
|
174
|
+
debtAssetId: number,
|
|
175
|
+
baseToken: EthereumAddress,
|
|
176
|
+
quoteToken: EthereumAddress,
|
|
177
|
+
stopLossPrice: string,
|
|
178
|
+
takeProfitPrice: string,
|
|
179
|
+
}
|
|
180
|
+
|
|
169
181
|
interface BoostOnPriceAave extends CloseOnPriceAave {
|
|
170
182
|
ratio: number,
|
|
171
183
|
}
|
|
@@ -260,7 +272,8 @@ export declare namespace Position {
|
|
|
260
272
|
| Specific.BoostOnPriceLiquityV2
|
|
261
273
|
| Specific.PaybackLiquityV2
|
|
262
274
|
| Specific.CompoundV3LeverageManagementOnPrice
|
|
263
|
-
| Specific.CompoundV3CloseOnPrice
|
|
275
|
+
| Specific.CompoundV3CloseOnPrice
|
|
276
|
+
| Specific.AaveV3CloseOnPriceGeneric;
|
|
264
277
|
|
|
265
278
|
export interface Automated {
|
|
266
279
|
chainId: ChainId,
|