@merkl/api 0.19.18 → 0.19.20
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/src/engine/dynamicData/implementations/Erc20.js +9 -0
- package/dist/src/engine/erc20SubTypeProcessors/helpers/tokenType.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +6 -2
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -137,9 +137,18 @@ export class Erc20DynamicData {
|
|
137
137
|
field: "averageBoost",
|
138
138
|
}))?.averageBoost ?? 1;
|
139
139
|
}
|
140
|
+
const forfeitingBoost = 1;
|
141
|
+
if (!!campaign.campaignParameters.hooks?.length) {
|
142
|
+
lastEligibilityRatio =
|
143
|
+
(await ComputedValueService.findCampaignValue({
|
144
|
+
campaignId: `${campaign.campaignId}-${chainId}`,
|
145
|
+
field: "forfeitingBoost",
|
146
|
+
}))?.forfeitingBoost ?? 1;
|
147
|
+
}
|
140
148
|
dynamicData.push({
|
141
149
|
...campaign,
|
142
150
|
apr: (lastEligibilityRatio *
|
151
|
+
forfeitingBoost *
|
143
152
|
(priceRewardToken *
|
144
153
|
BN2Number(campaign.amount, campaign.campaignParameters.decimalsRewardToken) *
|
145
154
|
YEAR *
|
@@ -188,6 +188,6 @@ export const tokenTypeToProtocol = {
|
|
188
188
|
[tokenType.hanji_liquidity_vault_token]: { protocol: "Hanji", action: OpportunityAction.POOL },
|
189
189
|
[tokenType.xU308]: { protocol: "Uranium", action: OpportunityAction.HOLD },
|
190
190
|
[tokenType.bunniV2]: { protocol: "Bunni V2", action: OpportunityAction.HOLD },
|
191
|
-
[tokenType.beratrax_vault]: { protocol: "
|
191
|
+
[tokenType.beratrax_vault]: { protocol: "BeraTrax", action: OpportunityAction.POOL },
|
192
192
|
[tokenType.beraborrow_gauge]: { protocol: "Beraborrow", action: OpportunityAction.POOL },
|
193
193
|
};
|
@@ -56,11 +56,15 @@ export class BEXRewardGaugeProcessor extends GenericProcessor {
|
|
56
56
|
tvlUnderlyingPool += poolTokensinfo[poolToken.token].price * poolTokensinfo[poolToken.token].amountInPool;
|
57
57
|
symbols.push(symbol);
|
58
58
|
}
|
59
|
-
let adjustedPoolTotalSupply = BN2Number(typeInfo.totalSupplyUnderlyingPoolTokens, 18);
|
59
|
+
let adjustedPoolTotalSupply = BN2Number(typeInfo.totalSupplyUnderlyingPoolTokens, 18);
|
60
60
|
if (type === tokenType.beratrax_vault) {
|
61
|
-
// Weird edge case where the
|
61
|
+
// Weird edge case where a lot of the supply is in a weird contract
|
62
62
|
adjustedPoolTotalSupply -= BN2Number(typeInfo.poolHolderBalance, 18);
|
63
63
|
}
|
64
|
+
if (type === tokenType.beraborrow_gauge) {
|
65
|
+
// Remove tokens in the vault from the total supply
|
66
|
+
adjustedPoolTotalSupply -= BN2Number(typeInfo.vaultBalance, 18);
|
67
|
+
}
|
64
68
|
let percentageOfSupplyUnderlyingPoolTokens = 1;
|
65
69
|
if (adjustedPoolTotalSupply > 0) {
|
66
70
|
percentageOfSupplyUnderlyingPoolTokens =
|