Skip to content

Commit b6bed64

Browse files
committed
fix exclude
1 parent 2948a08 commit b6bed64

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

utils/v2-processor.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export class V2Processor {
149149
let maxSupply = 0;
150150
let tbdAmount = 0;
151151
let incentiveAmount = 0;
152+
let excludedAmount = 0;
152153
const currentTimestamp = Math.floor(Date.now() / 1000);
153154

154155
// Helper function to find unlocked amount at current time from chart data
@@ -272,21 +273,26 @@ export class V2Processor {
272273
);
273274

274275
const excludeFromAdjusted = (fullProtocol.meta as any).excludeFromAdjustedSupply || [];
275-
const isV1Incentive = sectionCategory === "farming" || excludeFromAdjusted.includes(sectionName);
276+
const isV1Incentive = sectionCategory === "farming";
277+
const isV1Excluded = excludeFromAdjusted.includes(sectionName);
276278
const isV1TBD = sectionCategory === "noncirculating";
277279

278-
if (isV1Incentive) {
280+
if (isV1Incentive || isV1Excluded) {
279281
incentiveAmount += v1SectionTotal;
280282
}
281283

284+
if (isV1Excluded) {
285+
excludedAmount += v1SectionTotal;
286+
}
287+
282288
if (isV1TBD) {
283289
// Use time-adjusted TBD: total - unlocked at current time
284290
const unlockedAmount = getUnlockedAmountFromChart(sectionName);
285291
tbdAmount += (v1SectionTotal - unlockedAmount);
286292
}
287293
}
288294

289-
const adjustedSupply = maxSupply - tbdAmount;
295+
const adjustedSupply = maxSupply - tbdAmount - excludedAmount;
290296
const nonIncentiveAmount = maxSupply - incentiveAmount;
291297

292298
return {

0 commit comments

Comments
 (0)