@merkl/api 0.10.210 → 0.10.211

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 (36) hide show
  1. package/dist/database/api/seeder/resources/protocol.d.ts +15 -0
  2. package/dist/database/api/seeder/resources/protocol.js +15 -1
  3. package/dist/src/eden/index.d.ts +192 -0
  4. package/dist/src/entities/opportunity.js +2 -1
  5. package/dist/src/index.d.ts +74 -0
  6. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +2 -1
  7. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +4 -0
  8. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/curveNPoolProcessor.d.ts +39 -0
  9. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/curveNPoolProcessor.js +81 -0
  10. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +2 -0
  11. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +2 -0
  12. package/dist/src/modules/v4/campaign/campaign.model.d.ts +2 -0
  13. package/dist/src/modules/v4/campaign/campaign.model.js +2 -0
  14. package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +1 -0
  15. package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +1 -0
  16. package/dist/src/modules/v4/dynamicData/dynamicData.service.js +1 -0
  17. package/dist/src/modules/v4/opportunity/opportunity.service.js +3 -0
  18. package/dist/src/modules/v4/opportunity/subservices/getEigenLayerMetadata.service.d.ts +3 -0
  19. package/dist/src/modules/v4/opportunity/subservices/getEigenLayerMetadata.service.js +9 -0
  20. package/dist/src/modules/v4/programPayload/index.d.ts +3 -0
  21. package/dist/src/modules/v4/programPayload/index.js +3 -0
  22. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +93 -0
  23. package/dist/src/modules/v4/programPayload/programPayload.controller.js +38 -0
  24. package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +122 -0
  25. package/dist/src/modules/v4/programPayload/programPayload.model.js +130 -0
  26. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +39 -0
  27. package/dist/src/modules/v4/programPayload/programPayload.repository.js +359 -0
  28. package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +8 -0
  29. package/dist/src/modules/v4/programPayload/programPayload.service.js +92 -0
  30. package/dist/src/modules/v4/router.d.ts +74 -0
  31. package/dist/src/modules/v4/router.js +3 -1
  32. package/dist/src/utils/decodeCalls.js +5 -3
  33. package/dist/src/utils/encodeCalls.js +11 -13
  34. package/dist/src/utils/generateCardName.js +2 -0
  35. package/dist/tsconfig.package.tsbuildinfo +1 -1
  36. package/package.json +1 -1
@@ -341,6 +341,7 @@ declare const _default: {
341
341
  readonly id: "eigenlayer";
342
342
  readonly name: "EigenLayer";
343
343
  readonly icon: string;
344
+ readonly tags: ["LENDING"];
344
345
  readonly url: "";
345
346
  };
346
347
  readonly ajna: {
@@ -361,5 +362,19 @@ declare const _default: {
361
362
  readonly icon: string;
362
363
  readonly url: "";
363
364
  };
365
+ readonly zkswap: {
366
+ readonly id: "zkswap";
367
+ readonly name: "ZKSwap";
368
+ readonly tags: ["DEX"];
369
+ readonly icon: string;
370
+ readonly url: "";
371
+ };
372
+ readonly thirdtrade: {
373
+ readonly id: "thirdtrade";
374
+ readonly name: "ThirdTrade";
375
+ readonly tags: ["DEX"];
376
+ readonly icon: string;
377
+ readonly url: "";
378
+ };
364
379
  };
365
380
  export default _default;
@@ -326,7 +326,7 @@ export default {
326
326
  },
327
327
  badger: { id: "badger", name: "Badger", icon: bucket("badger.svg"), url: "" },
328
328
  ion: { id: "ion", name: "Ion", icon: bucket("ion.svg"), url: "" },
329
- eigenlayer: { id: "eigenlayer", name: "EigenLayer", icon: bucket("eigenlayer.svg"), url: "" },
329
+ eigenlayer: { id: "eigenlayer", name: "EigenLayer", icon: bucket("eigenlayer.svg"), tags: ["LENDING"], url: "" },
330
330
  ajna: { id: "ajna", name: "Ajna", icon: bucket("ajna.svg"), url: "" },
331
331
  layerbank: {
332
332
  id: "layerbank",
@@ -340,4 +340,18 @@ export default {
340
340
  icon: bucket("subswap.svg"),
341
341
  url: "",
342
342
  },
343
+ zkswap: {
344
+ id: "zkswap",
345
+ name: "ZKSwap",
346
+ tags: ["DEX"],
347
+ icon: bucket("zkswap.svg"),
348
+ url: "",
349
+ },
350
+ thirdtrade: {
351
+ id: "thirdtrade",
352
+ name: "ThirdTrade",
353
+ tags: ["DEX"],
354
+ icon: bucket("thirdtrade.svg"),
355
+ url: "",
356
+ },
343
357
  };
@@ -1975,6 +1975,7 @@ declare const eden: {
1975
1975
  cardName: string;
1976
1976
  blacklistedSupply: number;
1977
1977
  priceTargetToken: number;
1978
+ type: string;
1978
1979
  };
1979
1980
  }>>;
1980
1981
  };
@@ -2092,6 +2093,64 @@ declare const eden: {
2092
2093
  })[];
2093
2094
  }>>;
2094
2095
  }) & {};
2096
+ "program-payload": {
2097
+ index: {
2098
+ get: (options: {
2099
+ headers?: Record<string, unknown> | undefined;
2100
+ query: {
2101
+ creator: string;
2102
+ startTimestamp: number;
2103
+ endTimestamp: number;
2104
+ campaign: string;
2105
+ distributionChainId: number;
2106
+ amount: string;
2107
+ rewardToken: string;
2108
+ program: string;
2109
+ };
2110
+ fetch?: RequestInit | undefined;
2111
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2112
+ [x: string]: any;
2113
+ 200: any;
2114
+ }>>;
2115
+ };
2116
+ config: {
2117
+ get: (options: {
2118
+ headers?: Record<string, unknown> | undefined;
2119
+ query: {
2120
+ creator: string;
2121
+ startTimestamp: number;
2122
+ endTimestamp: number;
2123
+ campaign: string;
2124
+ distributionChainId: number;
2125
+ amount: string;
2126
+ rewardToken: string;
2127
+ program: string;
2128
+ };
2129
+ fetch?: RequestInit | undefined;
2130
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2131
+ [x: string]: any;
2132
+ 200: any;
2133
+ }>>;
2134
+ };
2135
+ program: {
2136
+ get: (options: {
2137
+ headers?: Record<string, unknown> | undefined;
2138
+ query: {
2139
+ creator: string;
2140
+ startTimestamp: number;
2141
+ endTimestamp: number;
2142
+ distributionChainId: number;
2143
+ amount: string;
2144
+ rewardToken: string;
2145
+ program: string;
2146
+ };
2147
+ fetch?: RequestInit | undefined;
2148
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2149
+ [x: string]: any;
2150
+ 200: any;
2151
+ }>>;
2152
+ };
2153
+ };
2095
2154
  };
2096
2155
  v3: {
2097
2156
  app: {
@@ -5129,6 +5188,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5129
5188
  cardName: string;
5130
5189
  blacklistedSupply: number;
5131
5190
  priceTargetToken: number;
5191
+ type: string;
5132
5192
  };
5133
5193
  };
5134
5194
  };
@@ -5284,6 +5344,79 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5284
5344
  };
5285
5345
  };
5286
5346
  };
5347
+ } & {
5348
+ v4: {
5349
+ "program-payload": {
5350
+ index: {
5351
+ get: {
5352
+ body: unknown;
5353
+ params: {};
5354
+ query: {
5355
+ creator: string;
5356
+ startTimestamp: number;
5357
+ endTimestamp: number;
5358
+ campaign: string;
5359
+ distributionChainId: number;
5360
+ amount: string;
5361
+ rewardToken: string;
5362
+ program: string;
5363
+ };
5364
+ headers: unknown;
5365
+ response: {
5366
+ [x: string]: any;
5367
+ 200: any;
5368
+ };
5369
+ };
5370
+ };
5371
+ };
5372
+ } & {
5373
+ "program-payload": {
5374
+ config: {
5375
+ get: {
5376
+ body: unknown;
5377
+ params: {};
5378
+ query: {
5379
+ creator: string;
5380
+ startTimestamp: number;
5381
+ endTimestamp: number;
5382
+ campaign: string;
5383
+ distributionChainId: number;
5384
+ amount: string;
5385
+ rewardToken: string;
5386
+ program: string;
5387
+ };
5388
+ headers: unknown;
5389
+ response: {
5390
+ [x: string]: any;
5391
+ 200: any;
5392
+ };
5393
+ };
5394
+ };
5395
+ };
5396
+ } & {
5397
+ "program-payload": {
5398
+ program: {
5399
+ get: {
5400
+ body: unknown;
5401
+ params: {};
5402
+ query: {
5403
+ creator: string;
5404
+ startTimestamp: number;
5405
+ endTimestamp: number;
5406
+ distributionChainId: number;
5407
+ amount: string;
5408
+ rewardToken: string;
5409
+ program: string;
5410
+ };
5411
+ headers: unknown;
5412
+ response: {
5413
+ [x: string]: any;
5414
+ 200: any;
5415
+ };
5416
+ };
5417
+ };
5418
+ };
5419
+ };
5287
5420
  } & {
5288
5421
  v3: {
5289
5422
  app: {
@@ -8018,6 +8151,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8018
8151
  cardName: string;
8019
8152
  blacklistedSupply: number;
8020
8153
  priceTargetToken: number;
8154
+ type: string;
8021
8155
  };
8022
8156
  }>>;
8023
8157
  };
@@ -8135,6 +8269,64 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8135
8269
  })[];
8136
8270
  }>>;
8137
8271
  }) & {};
8272
+ "program-payload": {
8273
+ index: {
8274
+ get: (options: {
8275
+ headers?: Record<string, unknown> | undefined;
8276
+ query: {
8277
+ creator: string;
8278
+ startTimestamp: number;
8279
+ endTimestamp: number;
8280
+ campaign: string;
8281
+ distributionChainId: number;
8282
+ amount: string;
8283
+ rewardToken: string;
8284
+ program: string;
8285
+ };
8286
+ fetch?: RequestInit | undefined;
8287
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8288
+ [x: string]: any;
8289
+ 200: any;
8290
+ }>>;
8291
+ };
8292
+ config: {
8293
+ get: (options: {
8294
+ headers?: Record<string, unknown> | undefined;
8295
+ query: {
8296
+ creator: string;
8297
+ startTimestamp: number;
8298
+ endTimestamp: number;
8299
+ campaign: string;
8300
+ distributionChainId: number;
8301
+ amount: string;
8302
+ rewardToken: string;
8303
+ program: string;
8304
+ };
8305
+ fetch?: RequestInit | undefined;
8306
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8307
+ [x: string]: any;
8308
+ 200: any;
8309
+ }>>;
8310
+ };
8311
+ program: {
8312
+ get: (options: {
8313
+ headers?: Record<string, unknown> | undefined;
8314
+ query: {
8315
+ creator: string;
8316
+ startTimestamp: number;
8317
+ endTimestamp: number;
8318
+ distributionChainId: number;
8319
+ amount: string;
8320
+ rewardToken: string;
8321
+ program: string;
8322
+ };
8323
+ fetch?: RequestInit | undefined;
8324
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8325
+ [x: string]: any;
8326
+ 200: any;
8327
+ }>>;
8328
+ };
8329
+ };
8138
8330
  };
8139
8331
  v3: {
8140
8332
  app: {
@@ -211,6 +211,7 @@ export const extractOpportunities = {
211
211
  "koi",
212
212
  "pancakeswap",
213
213
  "tempest",
214
+ "cross_curve",
214
215
  ],
215
216
  borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow"],
216
217
  lend: [
@@ -394,7 +395,7 @@ export const extractOpportunities = {
394
395
  const opportunity = {
395
396
  id: `${Campaign.EIGENLAYER}_${campaign.mainParameter}`,
396
397
  platform: "EigenLayer strategy",
397
- name: ["EigenLayer", "strategy", params.symbolUnderlyingToken].join(" "),
398
+ name: ["EigenLayer", "strategy for", params.symbolUnderlyingToken].join(" "),
398
399
  chainId: !computeChainId ? chainId : computeChainId,
399
400
  distributionChainId: chainId,
400
401
  tvl,
@@ -2453,6 +2453,7 @@ declare const app: Elysia<"", false, {
2453
2453
  cardName: string;
2454
2454
  blacklistedSupply: number;
2455
2455
  priceTargetToken: number;
2456
+ type: string;
2456
2457
  };
2457
2458
  };
2458
2459
  };
@@ -2608,6 +2609,79 @@ declare const app: Elysia<"", false, {
2608
2609
  };
2609
2610
  };
2610
2611
  };
2612
+ } & {
2613
+ v4: {
2614
+ "program-payload": {
2615
+ index: {
2616
+ get: {
2617
+ body: unknown;
2618
+ params: {};
2619
+ query: {
2620
+ creator: string;
2621
+ startTimestamp: number;
2622
+ endTimestamp: number;
2623
+ campaign: string;
2624
+ distributionChainId: number;
2625
+ amount: string;
2626
+ rewardToken: string;
2627
+ program: string;
2628
+ };
2629
+ headers: unknown;
2630
+ response: {
2631
+ [x: string]: any;
2632
+ 200: any;
2633
+ };
2634
+ };
2635
+ };
2636
+ };
2637
+ } & {
2638
+ "program-payload": {
2639
+ config: {
2640
+ get: {
2641
+ body: unknown;
2642
+ params: {};
2643
+ query: {
2644
+ creator: string;
2645
+ startTimestamp: number;
2646
+ endTimestamp: number;
2647
+ campaign: string;
2648
+ distributionChainId: number;
2649
+ amount: string;
2650
+ rewardToken: string;
2651
+ program: string;
2652
+ };
2653
+ headers: unknown;
2654
+ response: {
2655
+ [x: string]: any;
2656
+ 200: any;
2657
+ };
2658
+ };
2659
+ };
2660
+ };
2661
+ } & {
2662
+ "program-payload": {
2663
+ program: {
2664
+ get: {
2665
+ body: unknown;
2666
+ params: {};
2667
+ query: {
2668
+ creator: string;
2669
+ startTimestamp: number;
2670
+ endTimestamp: number;
2671
+ distributionChainId: number;
2672
+ amount: string;
2673
+ rewardToken: string;
2674
+ program: string;
2675
+ };
2676
+ headers: unknown;
2677
+ response: {
2678
+ [x: string]: any;
2679
+ 200: any;
2680
+ };
2681
+ };
2682
+ };
2683
+ };
2684
+ };
2611
2685
  } & {
2612
2686
  v3: {
2613
2687
  app: {
@@ -60,7 +60,8 @@ export declare enum tokenType {
60
60
  holdstation = "holdstation",
61
61
  staking = "staking",
62
62
  noLinkVault = "noLinkVault",
63
- cpmmGamma = "cpmmGamma"
63
+ cpmmGamma = "cpmmGamma",
64
+ crosscurve = "crosscurve"
64
65
  }
65
66
  export declare const tokenTypeToProtocol: {
66
67
  [key in tokenType]: {
@@ -62,6 +62,7 @@ export var tokenType;
62
62
  tokenType["staking"] = "staking";
63
63
  tokenType["noLinkVault"] = "noLinkVault";
64
64
  tokenType["cpmmGamma"] = "cpmmGamma";
65
+ tokenType["crosscurve"] = "crosscurve";
65
66
  })(tokenType || (tokenType = {}));
66
67
  export const tokenTypeToProtocol = {
67
68
  [tokenType.aave_borrowing]: { protocol: "Aave" },
@@ -151,4 +152,7 @@ export const tokenTypeToProtocol = {
151
152
  [tokenType.cpmmGamma]: {
152
153
  protocol: "GammaSwap",
153
154
  },
155
+ [tokenType.crosscurve]: {
156
+ protocol: "CrossCurve",
157
+ },
154
158
  };
@@ -0,0 +1,39 @@
1
+ import type { Pricer } from "../../../../../utils/pricer";
2
+ import { type Campaign, type CampaignParameters } from "@sdk";
3
+ import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
4
+ import { GenericProcessor, type dataType, type mandatoryCallKeys } from "./GenericProcessor";
5
+ type callType = {
6
+ key: keyof dataRawCurveN;
7
+ call: string;
8
+ target: keyof callKeysCurveN;
9
+ metaData?: keyof callKeysCurveN | string;
10
+ optional?: boolean;
11
+ };
12
+ type callKeysCurveN = mandatoryCallKeys & {
13
+ [key: `token${number}`]: string;
14
+ [key: `symbolToken${number}`]: string;
15
+ [key: `decimalsToken${number}`]: string;
16
+ [key: `balanceToken${number}`]: string;
17
+ [key: `${number}`]: string;
18
+ name: string;
19
+ };
20
+ type dataRawCurveN = callKeysCurveN & {
21
+ numberTokens: number;
22
+ };
23
+ type dataTypeCurveN = dataType & {
24
+ numberTokens: number;
25
+ };
26
+ export declare class CurveNPoolProcessor extends GenericProcessor<callKeysCurveN, dataRawCurveN, dataTypeCurveN> {
27
+ rounds: {
28
+ round1: callType[];
29
+ round2: callType[];
30
+ round3: callType[];
31
+ round4: callType[];
32
+ };
33
+ processingRound2(typeInfo: dataRawCurveN): void;
34
+ processingRound3(typeInfo: dataRawCurveN): void;
35
+ computeRound3(index: number, type: tokenType, typeInfo: dataRawCurveN, calls: string[]): tokenTypeStruct;
36
+ computeRound4(index: number, type: tokenType, typeInfo: dataRawCurveN, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>): tokenTypeStruct;
37
+ processingRound5(_index: number, type: tokenType, typeInfo: dataRawCurveN, _calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeCurveN>;
38
+ }
39
+ export {};
@@ -0,0 +1,81 @@
1
+ import { generateCardName } from "../../../../../utils/generateCardName";
2
+ import { BN2Number } from "@sdk";
3
+ import { GenericProcessor } from "./GenericProcessor";
4
+ export class CurveNPoolProcessor extends GenericProcessor {
5
+ rounds = {
6
+ round1: [{ key: "numberTokens", call: "N_COINS", target: "tokenAddress" }],
7
+ round2: [],
8
+ round3: [],
9
+ round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
10
+ };
11
+ // override computeRound1(): void {}
12
+ processingRound2(typeInfo) {
13
+ typeInfo.numberTokens = Number(typeInfo.numberTokens);
14
+ for (let i = 0; i < typeInfo.numberTokens; i++) {
15
+ typeInfo[`${i}`] = i.toString();
16
+ this.rounds.round2 = this.rounds.round2.concat([
17
+ { key: `token${i}`, call: "coins", target: "tokenAddress", metaData: i.toString() },
18
+ ]);
19
+ }
20
+ }
21
+ processingRound3(typeInfo) {
22
+ for (let i = 0; i < typeInfo.numberTokens; i++) {
23
+ this.rounds.round3 = this.rounds.round3.concat([
24
+ { key: `symbolToken${i}`, call: "symbol", target: `token${i}` },
25
+ { key: `decimalsToken${i}`, call: "decimals", target: `token${i}` },
26
+ { key: `balanceToken${i}`, call: "balances", target: "tokenAddress", metaData: i.toString() },
27
+ ]);
28
+ }
29
+ }
30
+ computeRound3(index, type, typeInfo, calls) {
31
+ for (let i = 0; i < typeInfo.numberTokens; i++) {
32
+ this.rounds.round2 = this.rounds.round2.concat([
33
+ { key: `token${i}`, call: "coins", target: "tokenAddress", metaData: i.toString() },
34
+ ]);
35
+ }
36
+ return super.computeRound3(index, type, typeInfo, calls);
37
+ }
38
+ computeRound4(index, type, typeInfo, calls, campaign) {
39
+ for (let i = 0; i < typeInfo.numberTokens; i++) {
40
+ this.rounds.round3 = this.rounds.round3.concat([
41
+ { key: `symbolToken${i}`, call: "symbol", target: `token${i}` },
42
+ { key: `decimalsToken${i}`, call: "decimals", target: `token${i}` },
43
+ { key: `balanceToken${i}`, call: "balances", target: "tokenAddress", metaData: i.toString() },
44
+ ]);
45
+ }
46
+ return super.computeRound4(index, type, typeInfo, calls, campaign);
47
+ }
48
+ async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
49
+ const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
50
+ let tvl = 0;
51
+ // Hardocded in case we don't find it
52
+ let hardcodedSymbol = "unknown";
53
+ if (typeInfo.name.includes("BTC"))
54
+ hardcodedSymbol = "BTC";
55
+ if (typeInfo.name.includes("ETH"))
56
+ hardcodedSymbol = "ETH";
57
+ if (typeInfo.name.includes("STABLE"))
58
+ hardcodedSymbol = "USDC";
59
+ for (let i = 0; i < typeInfo.numberTokens; i++) {
60
+ const symbol = typeInfo[`symbolToken${i}`];
61
+ const parsedSymbol = symbol.split("_")[0].slice(1);
62
+ let price = (await pricer.get({ symbol: parsedSymbol })) ?? 0;
63
+ if (price === 0) {
64
+ price = (await pricer.get({ symbol: hardcodedSymbol })) ?? 0;
65
+ }
66
+ const decimals = Number(typeInfo[`decimalsToken${i}`]);
67
+ const amount = BN2Number(typeInfo[`balanceToken${i}`], decimals);
68
+ tvl += amount * price;
69
+ }
70
+ const priceTargetToken = tvl / totalSupply;
71
+ return {
72
+ ...typeInfo,
73
+ totalSupply,
74
+ tvl,
75
+ whitelistedSupplyTargetToken,
76
+ blacklistedSupply,
77
+ priceTargetToken,
78
+ cardName: generateCardName(type, typeInfo, campaign),
79
+ };
80
+ }
81
+ }
@@ -30,6 +30,7 @@ import { TorosProcessor } from "./TorosProcessor";
30
30
  import { UniswapProcessor } from "./UniswapProcessor";
31
31
  import { WoofiProcessor } from "./WoofiProcessor";
32
32
  import { ZkSwapThreePoolProcessor } from "./ZkSwapThreePoolProcessor";
33
+ import { CurveNPoolProcessor } from "./curveNPoolProcessor";
33
34
  import { CurveProcessor } from "./curveProcessor";
34
35
  import { StakedCurveProcessor } from "./stakedCurveProcessor";
35
36
  export const processorMapping = {
@@ -72,6 +73,7 @@ export const processorMapping = {
72
73
  [tokenType.filament]: FluidProcessor,
73
74
  [tokenType.enzyme]: EnzymeProcessor,
74
75
  [tokenType.curve_2]: CurveProcessor,
76
+ [tokenType.crosscurve]: CurveNPoolProcessor,
75
77
  [tokenType.fenix]: UniswapProcessor,
76
78
  [tokenType.euler_lend]: EulerLendProcessor,
77
79
  [tokenType.euler_borrow]: EulerBorrowProcessor,
@@ -44,6 +44,8 @@ function satisfiesNameConditions(name, type) {
44
44
  lowerCaseName === "ezeth/wfrxeth" ||
45
45
  lowerCaseName === "pufeth/wsteth" ||
46
46
  lowerCaseName === "hai/lusd");
47
+ case tokenType.crosscurve:
48
+ return lowerCaseName.startsWith("crosscurve");
47
49
  case tokenType.silostaking:
48
50
  return lowerCaseName === "isei";
49
51
  case tokenType.beefy:
@@ -33,6 +33,8 @@ export declare const campaignTypeToEnumMap: {
33
33
  readonly SILO: any;
34
34
  readonly JSON_AIRDROP: any;
35
35
  readonly UNISWAP_V4: any;
36
+ readonly EIGENLAYER: any;
37
+ readonly ION: any;
36
38
  };
37
39
  export type ConvertedCampaignType<C extends CampaignType> = (typeof campaignTypeToEnumMap)[C];
38
40
  export declare const CampaignUniqueDto: import("@sinclair/typebox").TObject<{
@@ -20,6 +20,8 @@ export const campaignTypeToEnumMap = {
20
20
  SILO: CampaignTypeEnum.SILO,
21
21
  JSON_AIRDROP: CampaignTypeEnum.JSON_AIRDROP,
22
22
  UNISWAP_V4: CampaignTypeEnum.UNISWAP_V4,
23
+ EIGENLAYER: CampaignTypeEnum.EIGENLAYER,
24
+ ION: CampaignTypeEnum.ION,
23
25
  };
24
26
  // ─── DTOs ────────────────────────────────────────────────────────────────────
25
27
  export const CampaignUniqueDto = t.Object({
@@ -31,6 +31,7 @@ export declare const DynamicDataController: Elysia<"/dynamic-data", false, {
31
31
  cardName: string;
32
32
  blacklistedSupply: number;
33
33
  priceTargetToken: number;
34
+ type: string;
34
35
  };
35
36
  };
36
37
  };
@@ -5,6 +5,7 @@ type output = {
5
5
  cardName: string;
6
6
  blacklistedSupply: number;
7
7
  priceTargetToken: number;
8
+ type: string;
8
9
  };
9
10
  export declare class DynamicDataService {
10
11
  /** Fetches a single price */
@@ -44,6 +44,7 @@ export class DynamicDataService {
44
44
  blacklistedSupply: result[0]?.typeInfo.blacklistedSupply,
45
45
  cardName: result[0]?.typeInfo.cardName,
46
46
  tvl: result[0]?.typeInfo.tvl,
47
+ type: result[0]?.type ?? "defaultType",
47
48
  };
48
49
  }
49
50
  }
@@ -12,6 +12,7 @@ import { getBadgerMetadata } from "./subservices/getBadgerMetadata.service";
12
12
  import { getClammMetadata } from "./subservices/getClammMetadata.service";
13
13
  import { getCompoundMetadata } from "./subservices/getCompoundMetadata.service";
14
14
  import { getDolomiteMetadata } from "./subservices/getDolomiteMetadata.service";
15
+ import { getEigenLayerMetadata } from "./subservices/getEigenLayerMetadata.service";
15
16
  import { getErc20Metadata } from "./subservices/getErc20Metadata.service";
16
17
  import { getErc20SnapshotMetadata } from "./subservices/getErc20SnapshotMetadata.service";
17
18
  import { getEulerMetadata } from "./subservices/getEulerMetadata.service";
@@ -64,6 +65,8 @@ export class OpportunityService {
64
65
  return getCompoundMetadata(chainId, campaign.subType, campaignParams);
65
66
  case "AJNA":
66
67
  return getAjnaMetadata(chainId, campaign.subType, campaignParams);
68
+ case "EIGENLAYER":
69
+ return getEigenLayerMetadata(chainId, campaignParams);
67
70
  case "EULER":
68
71
  return getEulerMetadata(chainId, campaign.campaignId, campaign.subType, campaign.rewardTokenAddress, campaign.amount, campaignParams);
69
72
  case "INVALID":
@@ -0,0 +1,3 @@
1
+ import type { ChainId, EigenLayerCampaign } from "@sdk";
2
+ import type { OpportunityMetadata } from "../opportunity.model";
3
+ export declare const getEigenLayerMetadata: (chainId: ChainId, params: EigenLayerCampaign["campaignParameters"]) => Promise<OpportunityMetadata>;
@@ -0,0 +1,9 @@
1
+ import { OpportunityAction } from "../../../../../database/api/.generated";
2
+ export const getEigenLayerMetadata = async (chainId, params) => {
3
+ return {
4
+ action: OpportunityAction.LEND,
5
+ name: ["EigenLayer", "strategy for", params.symbolUnderlyingToken].join(" "),
6
+ tokens: [{ chainId, address: params.underlyingToken }],
7
+ mainProtocol: "eigenlayer",
8
+ };
9
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./programPayload.controller";
2
+ export * from "./programPayload.service";
3
+ export * from "./programPayload.model";
@@ -0,0 +1,3 @@
1
+ export * from "./programPayload.controller";
2
+ export * from "./programPayload.service";
3
+ export * from "./programPayload.model";