Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the fee logic, as the value provided is comulative #2346

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

linkielink
Copy link
Contributor

This PR fixes the logic of last24HourFees. The endpoint for the fees returns cumulative fees, not daily fees. Thus, the previous day has to be deducted from the current day.

I ensured this change is also time-machine backward compatible (to clean up already indexed fee data).

@llamabutler
Copy link

The mars-perp adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs mars-perp

🦙 Running MARS-PERP adapter 🦙
---------------------------------------------------
Start Date:	Tue, 21 Jan 2025 07:09:35 GMT
End Date:	Wed, 22 Jan 2025 07:09:35 GMT
---------------------------------------------------

Version -> DERIVATIVES
---------
NEUTRON 👇
Backfill start time: 13/12/2024
Daily volume: 170.92 k
Daily protocol revenue: 14
Daily revenue: 14
Daily fees: 55
Daily short open interest: 115.06 k
Daily long open interest: 139.83 k
Daily open interest: 254.88 k
End timestamp: 1737529774 (2025-01-22T07:09:34.000Z)

@dtmkeng dtmkeng merged commit 3157d5d into DefiLlama:master Jan 22, 2025
2 checks passed
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.

3 participants