@merkl/api 0.10.248 → 0.10.249
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/entities/opportunity.js +7 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/RfxProcessor.d.ts +4 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/RfxProcessor.js +2 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/WoofiProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/WoofiProcessor.js +2 -2
- package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.js +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/utils/generateCardName.js +2 -2
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -217,6 +217,7 @@ export const extractOpportunities = {
|
|
217
217
|
"maverickBoostedPosition",
|
218
218
|
"zkSwapThreePool",
|
219
219
|
"syncswap",
|
220
|
+
"rfx",
|
220
221
|
],
|
221
222
|
borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow", "zerolend_borrowing"],
|
222
223
|
lend: [
|
@@ -247,6 +248,12 @@ export const extractOpportunities = {
|
|
247
248
|
.filter(tkn => tkn);
|
248
249
|
if (["curve"].includes(campaign.type ?? ""))
|
249
250
|
return Object.values(typeInfo.poolTokens ?? {}).filter(tkn => tkn);
|
251
|
+
if (["rfx"].includes(campaign.type ?? "")) {
|
252
|
+
return [typeInfo.symbolShortToken, typeInfo.symbolLongToken];
|
253
|
+
}
|
254
|
+
if (["maverickBoostedPosition"].includes(campaign.type ?? "")) {
|
255
|
+
return [typeInfo.symbolTokenA, typeInfo.symbolTokenB];
|
256
|
+
}
|
250
257
|
return [typeInfo.symbolToken0, typeInfo.symbolToken1];
|
251
258
|
},
|
252
259
|
lend: () => (campaign.type === "compound" ? [typeInfo.symbolBaseToken] : [typeInfo.symbolUnderlyingToken]),
|
@@ -147,7 +147,7 @@ export async function ERC20DynamicData(chainId, campaigns) {
|
|
147
147
|
campaign.campaignParameters.duration /
|
148
148
|
(whitelistedSupplyTargetToken * priceTargetToken),
|
149
149
|
totalSupplyTargetToken,
|
150
|
-
tvl: getTVL(tokenTypesByCampaign[campaign.campaignId].typeInfo.type,
|
150
|
+
tvl: getTVL(tokenTypesByCampaign[campaign.campaignId].typeInfo.type, tokenTypesByCampaign[campaign.campaignId].typeInfo.totalSupply, whitelistedSupplyTargetToken, priceTargetToken),
|
151
151
|
type: tokenTypesByCampaign[campaign.campaignId].type,
|
152
152
|
typeInfo: tokenTypesByCampaign[campaign.campaignId].typeInfo,
|
153
153
|
priceRewardToken: priceRewardToken,
|
@@ -23,7 +23,10 @@ type callKeysRfx = mandatoryCallKeys & {
|
|
23
23
|
metaDataLong: string;
|
24
24
|
};
|
25
25
|
type dataRawTemplate = callKeysRfx & {};
|
26
|
-
type dataTypeRfx = dataType & {
|
26
|
+
type dataTypeRfx = dataType & {
|
27
|
+
symbolShortToken: string;
|
28
|
+
symbolLongToken: string;
|
29
|
+
};
|
27
30
|
export declare class RfxProcessor extends GenericProcessor<callKeysRfx, dataRawTemplate, dataTypeRfx> {
|
28
31
|
rounds: {
|
29
32
|
round1: callType[];
|
@@ -59,6 +59,8 @@ export class RfxProcessor extends GenericProcessor {
|
|
59
59
|
cardName: generateCardName(type, typeInfo, campaign),
|
60
60
|
priceTargetToken: priceTargetToken, // Add the appropriate value here
|
61
61
|
tvl,
|
62
|
+
symbolShortToken: typeInfo.symbolShortToken,
|
63
|
+
symbolLongToken: typeInfo.symbolLongToken,
|
62
64
|
};
|
63
65
|
}
|
64
66
|
}
|
@@ -13,7 +13,7 @@ type callKeysBeefy = mandatoryCallKeys & {
|
|
13
13
|
underlying: string;
|
14
14
|
pricePerShare: string;
|
15
15
|
totalSupplyUnderlying: string;
|
16
|
-
|
16
|
+
symbolUnderlyingToken: string;
|
17
17
|
};
|
18
18
|
type dataRawBeefy = callKeysBeefy & {};
|
19
19
|
type dataTypeBeefy = dataType & {
|
@@ -8,7 +8,7 @@ export class WoofiProcessor extends GenericProcessor {
|
|
8
8
|
{ key: "underlying", call: "want", target: "tokenAddress" },
|
9
9
|
],
|
10
10
|
round2: [
|
11
|
-
{ key: "
|
11
|
+
{ key: "symbolUnderlyingToken", call: "symbol", target: "underlying" },
|
12
12
|
{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" },
|
13
13
|
{ key: "decimalsToken", call: "decimals", target: "underlying" },
|
14
14
|
],
|
@@ -18,7 +18,7 @@ export class WoofiProcessor extends GenericProcessor {
|
|
18
18
|
// override computeRound1(): void {}
|
19
19
|
async processingRound5(index, type, typeInfo, calls, campaign, pricer) {
|
20
20
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
21
|
-
const priceToken = (await pricer.get({ symbol: typeInfo.
|
21
|
+
const priceToken = (await pricer.get({ symbol: typeInfo.symbolUnderlyingToken })) ?? 0;
|
22
22
|
let normalizedFactor = 1;
|
23
23
|
if (Number(typeInfo.decimalsToken) < campaign.campaignParameters.decimalsTargetToken) {
|
24
24
|
normalizedFactor = 10 ** (campaign.campaignParameters.decimalsTargetToken - Number(typeInfo.decimalsToken));
|
@@ -5,7 +5,7 @@ import type { Resource } from "../prisma";
|
|
5
5
|
* @see {@link Resource}
|
6
6
|
*/
|
7
7
|
export type Protocol = Resource<"Protocol">;
|
8
|
-
declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap-v3", "neptune", "zkSwapThreePool", "syncswap", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer"];
|
8
|
+
declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap-v3", "neptune", "zkSwapThreePool", "syncswap", "rfx", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer"];
|
9
9
|
export type ProtocolId = (typeof protocolTypes)[number];
|
10
10
|
export declare const ProtocolResourceDto: import("@sinclair/typebox").TObject<{
|
11
11
|
id: import("@sinclair/typebox").TString;
|
@@ -42,7 +42,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
|
|
42
42
|
return `Lend ${cardToken} on ${typeInfo.protocol}`;
|
43
43
|
}
|
44
44
|
case tokenType.rfx:
|
45
|
-
return
|
45
|
+
return `${typeInfo.protocol} ${typeInfo.symbolShortToken}/${typeInfo.symbolLongToken}`;
|
46
46
|
case tokenType.radiant_borrow:
|
47
47
|
case tokenType.aave_borrowing:
|
48
48
|
case tokenType.yei_borrowing:
|
@@ -87,7 +87,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
|
|
87
87
|
case tokenType.ironcladStaking:
|
88
88
|
return `Stake ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.protocol}`;
|
89
89
|
case tokenType.woofi:
|
90
|
-
return `Supercharge ${typeInfo.
|
90
|
+
return `Supercharge ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol}`;
|
91
91
|
case tokenType.maverickBoostedPosition:
|
92
92
|
return `Maverick Boosted Position ${campaign.campaignParameters.symbolTargetToken}`;
|
93
93
|
case tokenType.zkSwapThreePool:
|