-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Frankencoin protocol revenue adapter #3880
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
base: master
Are you sure you want to change the base?
Add Frankencoin protocol revenue adapter #3880
Conversation
The frankencoin adapter exports:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
fees/frankencoin/index.ts
Outdated
limit: 1, | ||
) { | ||
items { | ||
profits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need more information regarding the how profit/loss are calculated? as daily ~1M revenue for 30m TVL looks very high, so please provide more information, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoi
the graph table is just an entry of all profits and losses. And therefore its the accumulated profits/losses of all times. I thought the defillama api is regularly fetching the numbers and calculate the difference between the fetches and therefore knows how much the daily values would be.
{
"amount": "167395000000000000000", **<-- individual change per this entry**
"chainId": 1,
"count": "353",
"created": "1754328179",
"kind": "Profit", **<-- this entry reflects a profit change**
"losses": "20513419393164404266345", **<-- all time losses (accum.)**
"minter": "0x5ed0d010e20c262cc264aaf060fb9e3037cd383e",
"perFPS": "90297226610802112896",
"profits": "802597897386182421051766" **<-- all time profits (accum.)**
},
maybe i have to refactor this.
So you need explicitly the daily p/l?
How does the fetcher function know which date it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samclassix you can read more about how dimension adapter works here(https://docs.llama.fi/list-your-project/other-dashboards)
but i will give you tldr
we run it each day at UTC 00:00 if it's version 1 adapter(default)
so we have options in fetch function, which has options.starttimestamp and options.endtimestamp
which will be previous day start and end timestamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't understand how all profit goes to protocol, isn't there any yield for token holders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't understand how all profit goes to protocol, isn't there any yield for token holders?
the protocol uses a token "Frankencoin Pool Share" which acts like the governance token, receiver of the earnings and also takes the losses of the protocol.
https://frankencoin.com/fps.html
https://app.frankencoin.com/equity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samclassix can you please fix the adapter, the adapter is supposed to return daily value. Else, I will close this as stale
will look into it beginning of next week. |
The frankencoin adapter exports:
|
The frankencoin adapter exports:
|
The frankencoin adapter exports:
|
a125519
to
89adfc9
Compare
The frankencoin adapter exports:
|
Test Output
β― npm test fees frankencoin 2025-07-30
π¦ Running FRANKENCOIN adapter π¦
Start Date: Tue, 29 Jul 2025 00:00:00 GMT
End Date: Wed, 30 Jul 2025 00:00:00 GMT
ETHEREUM π
Backfill start time: 28/10/2023
Daily fees: 994.10 k
Daily revenue: 968.76 k
Daily protocol revenue: 968.76 k
End timestamp: 1753833599 (2025-07-29T23:59:59.000Z)