-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add SaberDao adapter to fetch last 24h fees from SaberDAO #2675
Conversation
The saber adapter exports:
|
The saber adapter exports:
|
The saber adapter exports:
|
fees/saber/index.ts
Outdated
if (!tokenAMint) return; | ||
|
||
if (pool.feesUsd > 0) { | ||
dailyFees.add(tokenAMint.toString(), pool.feesUsd) |
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.
if you are adding USD fee value, no need to pass token, can do dailyFees.addUSDValue(pool.feesUsd)
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/saber/index.ts
Outdated
}) | ||
console.log(dailyFees); | ||
|
||
return { dailyFees, dailyRevenue: dailyFees, } |
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.
dont think thats the case? all the fees goes to the LPs? https://docs.llama.fi/list-your-project/other-dashboards/dimensions
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.
you are right, it will be different for dailyRevenue, as they have dynamic fee per pools and it keeps changing as new votes are passed afaik. so will find out if there is any other way to calculate the protocol fees.
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.
updated fees, and added doc for fee calculation as per contract and docs.
The saber adapter exports:
|
The saber adapter exports:
|
fees/saber/index.ts
Outdated
|
||
return { | ||
dailyFees, | ||
dailyRevenue: dailyFees, |
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.
daily revenue is what goes to the protocol (and maybe the protocol token holders), so it is dailyProtocolRevenue in this case?
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.
can you also fix the dex adapter of saber?
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.
Fixed dailyRevenue
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.
dex adapter is no longer working, as doesn't give correct data, should i remove that or move fees adapter to there?
The saber adapter exports:
|
The saber adapter exports:
|
The saber adapter exports:
|
The saber adapter exports:
|
The saber adapter exports:
|
#2604