@merkl/api 0.21.20 → 0.21.22
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/dist/database/api/.generated/drizzle/schema.d.ts +51 -0
- package/dist/database/api/.generated/drizzle/schema.js +4 -1
- package/dist/database/api/.generated/drizzle/schema.ts +4 -1
- package/dist/database/api/.generated/edge.js +7 -4
- package/dist/database/api/.generated/index-browser.js +4 -1
- package/dist/database/api/.generated/index.d.ts +128 -2
- package/dist/database/api/.generated/index.js +7 -4
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +8 -5
- package/dist/database/api/.generated/wasm.js +4 -1
- package/dist/src/eden/index.d.ts +24 -88
- package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Compound.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.js +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Silo.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Vest.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.js +1 -1
- package/dist/src/engine/implementations/Erc20/metadata.js +2 -2
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +2 -2
- package/dist/src/engine/implementations/MultiLog/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/MultiLog/tvl.d.ts +2 -2
- package/dist/src/engine/metadata/factory.js +1 -0
- package/dist/src/engine/tvl/factory.d.ts +4 -1
- package/dist/src/engine/tvl/factory.js +59 -6
- package/dist/src/index.d.ts +8 -34
- package/dist/src/jobs/dynamic-data.js +16 -14
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +4 -1
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +2 -31
- package/dist/src/modules/v4/campaign/campaign.test.controller.js +0 -11
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +3 -0
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +3 -0
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +3 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +0 -11
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +8 -50
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +3 -3
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +9 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +50 -0
- package/dist/src/modules/v4/router.d.ts +8 -34
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/dist/src/engine/deprecated/dynamicData/factory.d.ts +0 -3
- package/dist/src/engine/deprecated/dynamicData/factory.js +0 -68
@@ -99,35 +99,6 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
99
99
|
};
|
100
100
|
};
|
101
101
|
};
|
102
|
-
} & {
|
103
|
-
"dry-run": {
|
104
|
-
tvl: {
|
105
|
-
get: {
|
106
|
-
body: unknown;
|
107
|
-
params: {};
|
108
|
-
query: {
|
109
|
-
decimals?: number | undefined;
|
110
|
-
chainId: number;
|
111
|
-
tokenAddress: string;
|
112
|
-
rewardTokenAddress: string;
|
113
|
-
symbolRewardToken: string;
|
114
|
-
};
|
115
|
-
headers: {
|
116
|
-
authorization: string;
|
117
|
-
};
|
118
|
-
response: {
|
119
|
-
200: {
|
120
|
-
tvl: number;
|
121
|
-
totalSupply: number;
|
122
|
-
cardName: string;
|
123
|
-
blacklistedSupply: number;
|
124
|
-
priceTargetToken: number;
|
125
|
-
type: string;
|
126
|
-
};
|
127
|
-
};
|
128
|
-
};
|
129
|
-
};
|
130
|
-
};
|
131
102
|
} & {
|
132
103
|
"dry-run": {
|
133
104
|
metadata: {
|
@@ -239,7 +210,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
239
210
|
} & {
|
240
211
|
price?: number | null | undefined;
|
241
212
|
})[];
|
242
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
213
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
243
214
|
description: string;
|
244
215
|
howToSteps: string[];
|
245
216
|
depositUrl: string | undefined;
|
@@ -351,7 +322,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
351
322
|
} & {
|
352
323
|
price?: number | null | undefined;
|
353
324
|
})[];
|
354
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
325
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
355
326
|
description: string;
|
356
327
|
howToSteps: string[];
|
357
328
|
depositUrl: string | undefined;
|
@@ -2,10 +2,8 @@ import { NotFoundError } from "@/errors";
|
|
2
2
|
import { InvalidParameter } from "@/errors/InvalidParameter.error";
|
3
3
|
import { BackOfficeGuard } from "@/guards/BackOffice.guard";
|
4
4
|
import { AuthorizationHeadersDto } from "@/guards/Engine.guard";
|
5
|
-
import { DynamicDataSourceIdentifier } from "@/modules/v4/dynamicData/dynamicData.model";
|
6
5
|
import { DynamicDataService } from "@/modules/v4/dynamicData/dynamicData.service";
|
7
6
|
import { OpportunityConvertorService } from "@/modules/v4/opportunity/opportunity.converter";
|
8
|
-
import { throwOnUnsupportedChainId } from "@/utils/throw";
|
9
7
|
import { Campaign as CampaignType } from "@sdk";
|
10
8
|
import Elysia, { t } from "elysia";
|
11
9
|
import { CampaignConfigMinimal, CampaignsDto } from "./campaign.model";
|
@@ -66,15 +64,6 @@ export const CampaignTestController = new Elysia({
|
|
66
64
|
return await DynamicDataService.update(campaign.computeChainId, campaign.campaignType, [campaign], true);
|
67
65
|
}, {
|
68
66
|
body: CampaignConfigMinimal,
|
69
|
-
})
|
70
|
-
// ─── Test TVL computation with campaign config ───────────────────────
|
71
|
-
.get("/tvl", async ({ query }) => await DynamicDataService.queryERC20DynamicData(query.chainId, query.tokenAddress, query.rewardTokenAddress, query.symbolRewardToken, query.decimals), {
|
72
|
-
query: DynamicDataSourceIdentifier,
|
73
|
-
headers: AuthorizationHeadersDto,
|
74
|
-
beforeHandle: async ({ query, headers }) => {
|
75
|
-
await BackOfficeGuard({ headers });
|
76
|
-
throwOnUnsupportedChainId(query.chainId);
|
77
|
-
},
|
78
67
|
})
|
79
68
|
// ─── Test Opportunity creation through a campaign config ───────────────────────
|
80
69
|
// @dev Starts from the engine db to debug opportunity creation failing and preventing the api db to be filled
|
@@ -29,6 +29,9 @@ export declare const ComputedValueController: Elysia<"/value", false, {
|
|
29
29
|
averageBoost: number | null;
|
30
30
|
totalDistributedInUSD: number | null;
|
31
31
|
forfeitingBoost: number | null;
|
32
|
+
averageAPIBoost: number | null;
|
33
|
+
computeMethodBoost: number | null;
|
34
|
+
lastRecordedNumberOfRecipients: number | null;
|
32
35
|
} | null;
|
33
36
|
};
|
34
37
|
};
|
@@ -4,6 +4,9 @@ export declare abstract class ComputedValueRepository {
|
|
4
4
|
averageBoost: number | null;
|
5
5
|
totalDistributedInUSD: number | null;
|
6
6
|
forfeitingBoost: number | null;
|
7
|
+
averageAPIBoost: number | null;
|
8
|
+
computeMethodBoost: number | null;
|
9
|
+
lastRecordedNumberOfRecipients: number | null;
|
7
10
|
} | null>;
|
8
11
|
static upsertCampaignComputedValue(data: UpsertCampaignComputedValueModel): Promise<void>;
|
9
12
|
static findUserValues(data: GetUserComputedValuesModel): Promise<{
|
@@ -5,6 +5,9 @@ export declare abstract class ComputedValueService {
|
|
5
5
|
averageBoost: number | null;
|
6
6
|
totalDistributedInUSD: number | null;
|
7
7
|
forfeitingBoost: number | null;
|
8
|
+
averageAPIBoost: number | null;
|
9
|
+
computeMethodBoost: number | null;
|
10
|
+
lastRecordedNumberOfRecipients: number | null;
|
8
11
|
} | null>;
|
9
12
|
static upsertCampaignComputedValue(data: UpsertCampaignComputedValueModel): Promise<void>;
|
10
13
|
static findUserValues(params: GetUserComputedValuesModel): Promise<{
|
@@ -7,17 +7,6 @@ export declare class DynamicDataService {
|
|
7
7
|
*/
|
8
8
|
static checkValidUpdate(opportunityId: string, newApr: number): Promise<boolean>;
|
9
9
|
static update(chainId: ChainId, type: CampaignType, campaigns: CampaignParameters<CampaignType>[], dryRun?: boolean): Promise<unknown[]>;
|
10
|
-
/**
|
11
|
-
* @dev Test function used to create mock ERC20 static campaigns and check tvl and metadata
|
12
|
-
*/
|
13
|
-
static queryERC20DynamicData(chainId: ChainId, tokenAddress: string, rewardTokenAddress: string, symbolRewardToken: string, decimals?: number): Promise<{
|
14
|
-
tvl: number;
|
15
|
-
totalSupply: number;
|
16
|
-
cardName: string;
|
17
|
-
blacklistedSupply: number;
|
18
|
-
priceTargetToken: number;
|
19
|
-
type: string;
|
20
|
-
}>;
|
21
10
|
/**
|
22
11
|
* @dev Recursive function to handle errors in fetching dynamic data
|
23
12
|
*/
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { dynamicDataBuilderFactory } from "@/engine/deprecated/dynamicData/factory";
|
2
1
|
import { campaignTVLBuilderFactory } from "@/engine/tvl/factory";
|
3
2
|
import { HttpError } from "@/errors";
|
4
3
|
import { InvalidParameter } from "@/errors/InvalidParameter.error";
|
@@ -41,8 +40,8 @@ export class DynamicDataService {
|
|
41
40
|
}
|
42
41
|
const initialOpportunityIds = new Set(campaigns.map(c => OpportunityService.hashId({ chainId, identifier: c.mainParameter, type: CampaignType[+type] }))).size;
|
43
42
|
// 2 - If the new dynamic data builder is available, use it
|
44
|
-
|
45
|
-
|
43
|
+
if (!campaignTVLBuilderFactory(type)?.deprecated) {
|
44
|
+
const builder = campaignTVLBuilderFactory(type);
|
46
45
|
// 2.a - Call the builder
|
47
46
|
const records = await DynamicDataService.fetchWithRecursiveErrorHandling(builder.build, campaigns, chainId);
|
48
47
|
// 2.b - Regroup by opportunity and build records
|
@@ -147,7 +146,10 @@ export class DynamicDataService {
|
|
147
146
|
}
|
148
147
|
const lastEligibilityRatio = (await ComputedValueService.findCampaignValue(Bun.hash(`${record.campaign.chainId}${record.campaign.campaignId}`).toString(), "averageBoost"))?.averageBoost ?? 1;
|
149
148
|
const forfeitingBoost = (await ComputedValueService.findCampaignValue(Bun.hash(`${record.campaign.chainId}${record.campaign.campaignId}`).toString(), "forfeitingBoost"))?.forfeitingBoost ?? 1;
|
150
|
-
|
149
|
+
const averageAPIBoost = (await ComputedValueService.findCampaignValue(Bun.hash(`${record.campaign.chainId}${record.campaign.campaignId}`).toString(), "averageAPIBoost"))?.averageAPIBoost ?? 1;
|
150
|
+
const computeMethodBoost = (await ComputedValueService.findCampaignValue(Bun.hash(`${record.campaign.chainId}${record.campaign.campaignId}`).toString(), "computeMethodBoost"))?.computeMethodBoost ?? 1;
|
151
|
+
aprCampaignValue =
|
152
|
+
aprCampaignValue * lastEligibilityRatio * forfeitingBoost * averageAPIBoost * computeMethodBoost;
|
151
153
|
if (aprCampaignValue === Number.POSITIVE_INFINITY)
|
152
154
|
aprCampaignValue = 10_001;
|
153
155
|
if (aprCampaignValue > 0) {
|
@@ -191,8 +193,9 @@ export class DynamicDataService {
|
|
191
193
|
}
|
192
194
|
return updates;
|
193
195
|
}
|
196
|
+
const builder = campaignTVLBuilderFactory(type);
|
194
197
|
const dynamicDataArray = [];
|
195
|
-
const dynamicData = await DynamicDataService.fetchWithRecursiveErrorHandling(
|
198
|
+
const dynamicData = await DynamicDataService.fetchWithRecursiveErrorHandling(builder.build, campaigns, chainId);
|
196
199
|
const oppMap = {};
|
197
200
|
for (const data of dynamicData) {
|
198
201
|
if (!!data) {
|
@@ -228,51 +231,6 @@ export class DynamicDataService {
|
|
228
231
|
log.info(`[${NETWORK_LABELS[chainId]}][${CampaignType[type]}] updated ${dynamicData.length}/${campaigns.length} campaigns`);
|
229
232
|
return dynamicDataArray;
|
230
233
|
}
|
231
|
-
/**
|
232
|
-
* @dev Test function used to create mock ERC20 static campaigns and check tvl and metadata
|
233
|
-
*/
|
234
|
-
static async queryERC20DynamicData(chainId, tokenAddress, rewardTokenAddress, symbolRewardToken, decimals = 18) {
|
235
|
-
const campaigns = [
|
236
|
-
{
|
237
|
-
campaignId: tokenAddress,
|
238
|
-
amount: "1000000000000000000", // 1 EXR in wei
|
239
|
-
campaignSubType: 0,
|
240
|
-
chainId: chainId,
|
241
|
-
computeChainId: chainId,
|
242
|
-
creator: "0xexamplecreatoraddress",
|
243
|
-
endTimestamp: 1672531199, // Example end timestamp
|
244
|
-
index: 0,
|
245
|
-
mainParameter: "0xexamplemainparameter",
|
246
|
-
rewardToken: rewardTokenAddress,
|
247
|
-
startTimestamp: 1672444800, // Example start timestamp
|
248
|
-
lastEligibilityRatio: 1,
|
249
|
-
campaignParameters: {
|
250
|
-
blacklist: [],
|
251
|
-
decimalsRewardToken: 18,
|
252
|
-
decimalsTargetToken: decimals,
|
253
|
-
duration: 30,
|
254
|
-
whitelist: [],
|
255
|
-
forwarders: [],
|
256
|
-
hooks: [],
|
257
|
-
shouldIgnore: false,
|
258
|
-
symbolRewardToken: symbolRewardToken,
|
259
|
-
symbolTargetToken: "EXT",
|
260
|
-
targetToken: tokenAddress,
|
261
|
-
},
|
262
|
-
campaignType: CampaignType.ERC20,
|
263
|
-
},
|
264
|
-
];
|
265
|
-
log.info(`querying mock campaign on chain: ${NETWORK_LABELS[chainId]}`);
|
266
|
-
const result = await dynamicDataBuilderFactory(CampaignType.ERC20).build(Number(chainId), campaigns);
|
267
|
-
return {
|
268
|
-
priceTargetToken: result[0]?.typeInfo.priceTargetToken,
|
269
|
-
totalSupply: result[0]?.typeInfo.totalSupply,
|
270
|
-
blacklistedSupply: result[0]?.typeInfo.blacklistedSupply,
|
271
|
-
cardName: result[0]?.typeInfo.cardName,
|
272
|
-
tvl: result[0]?.typeInfo.tvl,
|
273
|
-
type: result[0]?.type ?? "defaultType",
|
274
|
-
};
|
275
|
-
}
|
276
234
|
/**
|
277
235
|
* @dev Recursive function to handle errors in fetching dynamic data
|
278
236
|
*/
|
@@ -1124,7 +1124,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
1124
1124
|
} & {
|
1125
1125
|
price?: number | null | undefined;
|
1126
1126
|
})[];
|
1127
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
1127
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1128
1128
|
description: string;
|
1129
1129
|
howToSteps: string[];
|
1130
1130
|
depositUrl: string | undefined;
|
@@ -1262,7 +1262,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
1262
1262
|
} & {
|
1263
1263
|
price?: number | null | undefined;
|
1264
1264
|
})[];
|
1265
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
1265
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1266
1266
|
description: string;
|
1267
1267
|
howToSteps: string[];
|
1268
1268
|
depositUrl: string | undefined;
|
@@ -109,7 +109,7 @@ export declare abstract class OpportunityService {
|
|
109
109
|
} & {
|
110
110
|
price?: number | null | undefined;
|
111
111
|
})[];
|
112
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
112
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
113
113
|
description: string;
|
114
114
|
howToSteps: string[];
|
115
115
|
depositUrl: string | undefined;
|
@@ -239,7 +239,7 @@ export declare abstract class OpportunityService {
|
|
239
239
|
} & {
|
240
240
|
price?: number | null | undefined;
|
241
241
|
})[];
|
242
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
242
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
243
243
|
description: string;
|
244
244
|
howToSteps: string[];
|
245
245
|
depositUrl: string | undefined;
|
@@ -317,7 +317,7 @@ export declare abstract class OpportunityService {
|
|
317
317
|
} & {
|
318
318
|
price?: number | null | undefined;
|
319
319
|
})[];
|
320
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "
|
320
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
321
321
|
description: string;
|
322
322
|
howToSteps: string[];
|
323
323
|
depositUrl: string | undefined;
|
@@ -16,7 +16,8 @@ export declare enum program {
|
|
16
16
|
HypurrFi = "HypurrFi",
|
17
17
|
WorldChain = "WorldChain",
|
18
18
|
StableJack = "StableJack",
|
19
|
-
Corn = "Corn"
|
19
|
+
Corn = "Corn",
|
20
|
+
Superlend = "Superlend"
|
20
21
|
}
|
21
22
|
export declare enum roninCampaigns {
|
22
23
|
Katana_WETH_RON_Ronin = "Katana WETH-RON Ronin 0x90f31f1907a4d1443a6aacdc91ac2312f91bafa7",
|
@@ -463,6 +464,9 @@ export declare enum modeCampaigns {
|
|
463
464
|
Bedrock_Ionic_Supply_ionuniBTC_Mode = "Bedrock Ionic Supply uniBTC 0xa48750877a83f7dec11f722178c317b54a44d142",
|
464
465
|
Bedrock_Ironclad_Supply_uniBTC_Mode = "Bedrock Ironclad Supply uniBTC 0x0F041cf2ae959f39215EFfB50d681Df55D4d90B1"
|
465
466
|
}
|
467
|
+
export declare enum superlendCampaigns {
|
468
|
+
Superlend_NET_USDC_SUPPLY = "Superlend net USDC supply on Etherlink"
|
469
|
+
}
|
466
470
|
declare const RoninInterfaceCampaigns: {
|
467
471
|
"Katana WETH-RON Ronin 0x90f31f1907a4d1443a6aacdc91ac2312f91bafa7": {
|
468
472
|
campaignType: any;
|
@@ -1300,6 +1304,9 @@ declare const BeetsInterfaceCampaigns: {
|
|
1300
1304
|
declare const ReserveInterfaceCampaigns: {
|
1301
1305
|
[key in reserveCampaigns]: partialConfig;
|
1302
1306
|
};
|
1307
|
+
declare const SuperlendInterfaceCampaigns: {
|
1308
|
+
[key in superlendCampaigns]: partialConfig;
|
1309
|
+
};
|
1303
1310
|
declare const SonicmarketInterfaceCampaigns: {
|
1304
1311
|
[key in sonicmarketCampaigns]: partialConfig;
|
1305
1312
|
};
|
@@ -1755,6 +1762,6 @@ declare const StableJackInterfaceCampaigns: {
|
|
1755
1762
|
[key in StableJackCampaigns]: partialConfig;
|
1756
1763
|
};
|
1757
1764
|
export declare const MerklInterfaceCampaigns: {
|
1758
|
-
[key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns | typeof SonicmarketInterfaceCampaigns | typeof ReserveInterfaceCampaigns | typeof BeetsInterfaceCampaigns | typeof CeloInterfaceCampaigns | typeof EtherlinkInterfaceCampaigns | typeof SwapxInterfaceCampaigns | typeof AnglesInterfaceCampaigns | typeof RoninInterfaceCampaigns | typeof TACInterfaceCampaigns | typeof HypurrFiCampaignsInterface | typeof WorldChainInterfaceCampaigns | typeof StableJackInterfaceCampaigns | typeof CornInterfaceCampaigns;
|
1765
|
+
[key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns | typeof SonicmarketInterfaceCampaigns | typeof ReserveInterfaceCampaigns | typeof BeetsInterfaceCampaigns | typeof CeloInterfaceCampaigns | typeof EtherlinkInterfaceCampaigns | typeof SwapxInterfaceCampaigns | typeof AnglesInterfaceCampaigns | typeof RoninInterfaceCampaigns | typeof TACInterfaceCampaigns | typeof HypurrFiCampaignsInterface | typeof WorldChainInterfaceCampaigns | typeof StableJackInterfaceCampaigns | typeof CornInterfaceCampaigns | typeof SuperlendInterfaceCampaigns;
|
1759
1766
|
};
|
1760
1767
|
export {};
|
@@ -20,6 +20,7 @@ export var program;
|
|
20
20
|
program["WorldChain"] = "WorldChain";
|
21
21
|
program["StableJack"] = "StableJack";
|
22
22
|
program["Corn"] = "Corn";
|
23
|
+
program["Superlend"] = "Superlend";
|
23
24
|
})(program || (program = {}));
|
24
25
|
export var roninCampaigns;
|
25
26
|
(function (roninCampaigns) {
|
@@ -539,6 +540,10 @@ export var modeCampaigns;
|
|
539
540
|
modeCampaigns["Bedrock_Ionic_Supply_ionuniBTC_Mode"] = "Bedrock Ionic Supply uniBTC 0xa48750877a83f7dec11f722178c317b54a44d142";
|
540
541
|
modeCampaigns["Bedrock_Ironclad_Supply_uniBTC_Mode"] = "Bedrock Ironclad Supply uniBTC 0x0F041cf2ae959f39215EFfB50d681Df55D4d90B1";
|
541
542
|
})(modeCampaigns || (modeCampaigns = {}));
|
543
|
+
export var superlendCampaigns;
|
544
|
+
(function (superlendCampaigns) {
|
545
|
+
superlendCampaigns["Superlend_NET_USDC_SUPPLY"] = "Superlend net USDC supply on Etherlink";
|
546
|
+
})(superlendCampaigns || (superlendCampaigns = {}));
|
542
547
|
const RoninInterfaceCampaigns = {
|
543
548
|
[roninCampaigns.Katana_WETH_RON_Ronin]: {
|
544
549
|
campaignType: Campaign.CLAMM,
|
@@ -2852,6 +2857,50 @@ const ReserveInterfaceCampaigns = {
|
|
2852
2857
|
composedCampaignsCompute: "1-2",
|
2853
2858
|
},
|
2854
2859
|
};
|
2860
|
+
const SuperlendInterfaceCampaigns = {
|
2861
|
+
[superlendCampaigns.Superlend_NET_USDC_SUPPLY]: {
|
2862
|
+
campaignType: Campaign.MULTILOG,
|
2863
|
+
computeScoreParameters: {
|
2864
|
+
computeMethod: ComputeScoreMethod.genericTimeWeighted,
|
2865
|
+
},
|
2866
|
+
whitelist: [],
|
2867
|
+
blacklist: [],
|
2868
|
+
hooks: [],
|
2869
|
+
composedCampaigns: [
|
2870
|
+
{
|
2871
|
+
composedIndex: 1,
|
2872
|
+
composedType: ComposedType.MAIN,
|
2873
|
+
campaignType: Campaign.ERC20REBASELOGPROCESSOR,
|
2874
|
+
targetToken: "0xd03bfdF9B26DB1e6764724d914d7c3d18106a9Fb",
|
2875
|
+
computeChainId: ChainId.ETHERLINK,
|
2876
|
+
computeScoreParameters: {
|
2877
|
+
computeMethod: ComputeScoreMethod.genericScorePunctual,
|
2878
|
+
},
|
2879
|
+
composedMultiplier: BASE_9.toString(),
|
2880
|
+
whitelist: [],
|
2881
|
+
blacklist: [],
|
2882
|
+
forwarders: [],
|
2883
|
+
hooks: [],
|
2884
|
+
},
|
2885
|
+
{
|
2886
|
+
composedIndex: 2,
|
2887
|
+
composedType: ComposedType.DEFAULT,
|
2888
|
+
campaignType: Campaign.ERC20REBASELOGPROCESSOR,
|
2889
|
+
targetToken: "0x904A51d7b418d8D5f3739e421A6eD532d653f625",
|
2890
|
+
computeChainId: ChainId.ETHERLINK,
|
2891
|
+
computeScoreParameters: {
|
2892
|
+
computeMethod: ComputeScoreMethod.genericScorePunctual,
|
2893
|
+
},
|
2894
|
+
composedMultiplier: BASE_9.toString(),
|
2895
|
+
whitelist: [],
|
2896
|
+
blacklist: [],
|
2897
|
+
forwarders: [],
|
2898
|
+
hooks: [],
|
2899
|
+
},
|
2900
|
+
],
|
2901
|
+
composedCampaignsCompute: "1-2",
|
2902
|
+
},
|
2903
|
+
};
|
2855
2904
|
function generateComposedCampaignForTradingCompetitionForReserve(pool, wethIndex, chainId) {
|
2856
2905
|
return [
|
2857
2906
|
{
|
@@ -7171,4 +7220,5 @@ export const MerklInterfaceCampaigns = {
|
|
7171
7220
|
[program.WorldChain]: WorldChainInterfaceCampaigns,
|
7172
7221
|
[program.StableJack]: StableJackInterfaceCampaigns,
|
7173
7222
|
[program.Corn]: CornInterfaceCampaigns,
|
7223
|
+
[program.Superlend]: SuperlendInterfaceCampaigns,
|
7174
7224
|
};
|