Skip to content

Add Bluefin Alphalend Fees Metrics #3469

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

Merged
merged 3 commits into from
Jun 23, 2025
Merged

Conversation

abdullahabro
Copy link
Contributor

No description provided.

@llamabutler
Copy link

The bluefin-alphalend.ts adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees bluefin-alphalend.ts

🦙 Running BLUEFIN-ALPHALEND.TS adapter 🦙
---------------------------------------------------
Start Date:	Mon, 16 Jun 2025 00:00:00 GMT
End Date:	Tue, 17 Jun 2025 00:00:00 GMT
---------------------------------------------------

@llamabutler
Copy link

The bluefin-alphalend.ts adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees bluefin-alphalend.ts

🦙 Running BLUEFIN-ALPHALEND.TS adapter 🦙
---------------------------------------------------
Start Date:	Mon, 16 Jun 2025 00:00:00 GMT
End Date:	Tue, 17 Jun 2025 00:00:00 GMT
---------------------------------------------------

@noateden noateden self-assigned this Jun 18, 2025
@noateden
Copy link
Contributor

hi @abdullahabro thanks for the PR, can you check your api url, the url returns 404

@abdullahabro
Copy link
Contributor Author

hi @abdullahabro thanks for the PR, can you check your api url, the url returns 404

Hey @noateden , this should be fixed now , can you please check again

@noateden
Copy link
Contributor

@abdullahabro is there anyway to get data from Sui blockchain instead?

@abdullahabro
Copy link
Contributor Author

@abdullahabro is there anyway to get data from Sui blockchain instead?

@noateden nopes , unfortunately not, because on-chain, the fee variables store commutative fee therefore it's hard to know how much fee was accumulated in last 24 hours.
Therefore we need to index chain events and then serve this metric though the API after doing some calculations on received events.
Our Spot protocol fee is also reported through API as wel

@noateden
Copy link
Contributor

@abdullahabro can you try to query events and calculate the fees in the adapter? it's because we will take time to fix your code or contact your team if there is any issue with the api, and we don't want to do that later

@abdullahabro
Copy link
Contributor Author

abdullahabro commented Jun 20, 2025

@abdullahabro can you try to query events and calculate the fees in the adapter? it's because we will take time to fix your code or contact your team if there is any issue with the api, and we don't want to do that later

@noateden , this is going to be a bit difficult and messy , because first we would need to fetch all the required events for the day. Moreover, the data in those events is not complete and we need to do some mannual calculations , using Coin details like coin decimals and coin's current oracle price and some other metaData.
Our Spot and perps fees are reported the same way (through API). Can we approve this for now and meanwhile we will explore if we are able to directly serve this from on-chain contracts some how in next upgrade ?

@noateden
Copy link
Contributor

pls @abdullahabro add meta to explain about fees and revenue methodologies, like this:
https://github.com/DefiLlama/dimension-adapters/blob/master/fees/bonk-bot/index.ts#L18

@llamabutler
Copy link

The bluefin-alphalend.ts adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees bluefin-alphalend.ts

🦙 Running BLUEFIN-ALPHALEND.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 21 Jun 2025 00:00:00 GMT
End Date:	Sun, 22 Jun 2025 00:00:00 GMT
---------------------------------------------------

SUI 👇
Backfill start time: 17/6/2025
Daily fees: 30.03 k
Daily revenue: 30.03 k

@abdullahabro
Copy link
Contributor Author

pls @abdullahabro add meta to explain about fees and revenue methodologies, like this: https://github.com/DefiLlama/dimension-adapters/blob/master/fees/bonk-bot/index.ts#L18

Added @noateden

@noateden noateden merged commit 82a4240 into DefiLlama:master Jun 23, 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