Skip to content

Conversation

@tomrpl
Copy link

@tomrpl tomrpl commented Jul 17, 2025

No description provided.

@ReynardoEW
Copy link
Member

could you give reason for the filter?

@tomrpl
Copy link
Author

tomrpl commented Jul 17, 2025

Hey @ReynardoEW the emission should take into account the last 30d of emission and anualize it as per the definition, and here it seems it's not filtering out potentially old rewards program that are no longer in the scope. Thus the filters

Does that make sense?

@ReynardoEW
Copy link
Member

Hey @ReynardoEW the emission should take into account the last 30d of emission and anualize it as per the definition, and here it seems it's not filtering out potentially old rewards program that are no longer in the scope. Thus the filters

Does that make sense?

i see, but on airdrop emission we are using cliff result therefore it will just be a one big unlock and for non airdrop it will be linearly unlocked and it wont calculate emissions ahead of today's date so the issue shouldn't be there?

@tomrpl
Copy link
Author

tomrpl commented Jul 17, 2025

Hmm that make sense, but given this is litterally no longer an emission of the past 30d, i think we should still remove it.

Otherwise for the other programs, we should still filter out if end is before 30 days ago

if (end < thirtyDaysAgo) {
        return null;
      }

@ReynardoEW
Copy link
Member

Hmm that make sense, but given this is litterally no longer an emission of the past 30d, i think we should still remove it.

Otherwise for the other programs, we should still filter out if end is before 30 days ago

if (end < thirtyDaysAgo) {
        return null;
      }

if we remove it then historical data of those wont be available which we want to keep

@tomrpl
Copy link
Author

tomrpl commented Jul 17, 2025

Hey @ReynardoEW I think there might be a misunderstanding about what the 30-day emission calculation should represent.
It's prob on me, I'll bring you my understanding below and we can move forward:

According to DefiLlama's definition: "This is calculated by taking data from the last 30 days and multiplying it by 12 to annualize it" (visible when hovering on the incentives at the protocol page level)

image

The key phrase is "last 30 days" - this should reflect current earning potential, not historical programs that ended months ago.

For example:

  • Airdrop from 60 days ago: Users can't earn this anymore, shouldn't inflate current rates
  • Program that ended 45 days ago: No longer contributing to current emissions

The filter ensures users see realistic, current earning potential rather than inflated rates from expired programs.

If historical data preservation is the concern, we could discuss alternative approaches, but for current emission calculations, the 30-day filter is essential for accuracy.

Am I confused somewhere?

@ReynardoEW
Copy link
Member

Hey @ReynardoEW I think there might be a misunderstanding about what the 30-day emission calculation should represent. It's prob on me, I'll bring you my understanding below and we can move forward:

According to DefiLlama's definition: "This is calculated by taking data from the last 30 days and multiplying it by 12 to annualize it" (visible when hovering on the incentives at the protocol page level)

image The key phrase is "last 30 days" - this should reflect current earning potential, not historical programs that ended months ago.

For example:

  • Airdrop from 60 days ago: Users can't earn this anymore, shouldn't inflate current rates
  • Program that ended 45 days ago: No longer contributing to current emissions

The filter ensures users see realistic, current earning potential rather than inflated rates from expired programs.

If historical data preservation is the concern, we could discuss alternative approaches, but for current emission calculations, the 30-day filter is essential for accuracy.

Am I confused somewhere?

if i am getting this right, you want to filter programs that ended >30 days ago, but this shouldn't skew the calculation?
for example if program A ended 50 days ago, and it's airdrop for example therefore it's cliff (unlocked in all one go) then current calculation of the annualization won't even include the program in the end, and again we can't just filter them because it will remove those programs from the charts causing total emitted to be lower

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants