@merkl/api 0.11.2 → 0.11.3
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.
@@ -1063,6 +1063,40 @@ export const extractOpportunities = {
|
|
1063
1063
|
};
|
1064
1064
|
return opportunity;
|
1065
1065
|
},
|
1066
|
+
[Campaign.AMBIENTPROCESSOR]: (campaign, campaigns, prices) => {
|
1067
|
+
const { chainId, tvl, campaignSubType, campaignParameters: params, computeChainId } = campaign;
|
1068
|
+
const { active, all } = campaigns;
|
1069
|
+
const aprBreakdown = active.reduce((res, campaign) => {
|
1070
|
+
res[`Campaign ${campaign.campaignId.slice(0, 8)}`] = {
|
1071
|
+
value: campaign.apr ?? 0,
|
1072
|
+
address: campaign.campaignId,
|
1073
|
+
type: EAprBreakdownType.DETAILS,
|
1074
|
+
};
|
1075
|
+
return res;
|
1076
|
+
}, {});
|
1077
|
+
const aprBreakdown2 = getCampaignsApr(active);
|
1078
|
+
const opportunity = {
|
1079
|
+
id: `${Campaign.AMBIENTPROCESSOR}_${campaign.mainParameter}`,
|
1080
|
+
platform: "Ambient",
|
1081
|
+
name: `Ambient ${params.symbolBaseToken} ${params.symbolQuoteToken} ${params.poolId.slice(0, 7)}`,
|
1082
|
+
chainId: !computeChainId ? chainId : computeChainId,
|
1083
|
+
distributionChainId: chainId,
|
1084
|
+
tvl,
|
1085
|
+
action: "pool",
|
1086
|
+
subtype: campaignSubType,
|
1087
|
+
status: getStatus(all),
|
1088
|
+
tags: getTags(campaigns.all),
|
1089
|
+
dailyrewards: getDailyRewards(active, prices),
|
1090
|
+
tokenIcons: ["AMBIENT"],
|
1091
|
+
campaigns: { ...campaigns, type: Campaign.HYPERDRIVELOGPROCESSOR, ids: campaigns.all.map(c => c.campaignId) },
|
1092
|
+
rewardTokenIcons: getRewardTokenIcons(campaigns.active),
|
1093
|
+
dailyRewardTokens: getRewardTokens(campaigns.active),
|
1094
|
+
apr: getApr(active),
|
1095
|
+
aprBreakdown,
|
1096
|
+
aprBreakdown2,
|
1097
|
+
};
|
1098
|
+
return opportunity;
|
1099
|
+
},
|
1066
1100
|
};
|
1067
1101
|
/**
|
1068
1102
|
* @returns the opportunities map with their corresponding campaign's data added
|
@@ -4,6 +4,8 @@ export declare const dexIdToProtocolId: {
|
|
4
4
|
readonly DEX_PANCAKESWAPV3: "pancakeswap-v3";
|
5
5
|
readonly DEX_SUSHISWAPV3: "sushiswap-v3";
|
6
6
|
readonly DEX_CURVE: "curve";
|
7
|
+
readonly DEX_SYNCSWAP_V3: "syncswap";
|
8
|
+
readonly DEX_ZKSWAP_V3: "zkswap";
|
7
9
|
readonly DEX_QUICKSWAPV3UNI: "quickswap-uni";
|
8
10
|
readonly DEX_QUICKSWAPV3ALGEBRA: "quickswap-algebra";
|
9
11
|
readonly DEX_THRUSTERV3: "thruster";
|
@@ -6,6 +6,9 @@ export const dexIdToProtocolId = {
|
|
6
6
|
DEX_PANCAKESWAPV3: "pancakeswap-v3",
|
7
7
|
DEX_SUSHISWAPV3: "sushiswap-v3",
|
8
8
|
DEX_CURVE: "curve",
|
9
|
+
DEX_SYNCSWAP_V3: "syncswap",
|
10
|
+
// DEX_SYNCSWAP_V1_V2: "syncswap",
|
11
|
+
DEX_ZKSWAP_V3: "zkswap",
|
9
12
|
DEX_QUICKSWAPV3UNI: "quickswap-uni",
|
10
13
|
DEX_QUICKSWAPV3ALGEBRA: "quickswap-algebra",
|
11
14
|
DEX_THRUSTERV3: "thruster",
|