-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Spark Liquidity Layer revenue #3907
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 Spark Liquidity Layer revenue #3907
Conversation
The spark-liquidity-layer adapter exports:
|
The spark-liquidity-layer adapter exports:
|
fees/spark-liquidity-layer/index.ts
Outdated
} | ||
|
||
function getSusdsIntegratorRevenueQuery(date: string, chain: string) { | ||
return `select sum(tw_reward) as revenue from query_5562275 where dt = date '${date}' and blockchain = '${chain}';` |
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 pls convert query_5562275 to raw SQL?
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.
hi @b-tarczynski thanks for the PR. Can you pls convert all Dune sub-queries to raw SQL?
The spark-liquidity-layer adapter exports:
|
The spark-liquidity-layer adapter exports:
|
Hey @noateden, thanks for the review. The queries on Diune were modified and now I include complete query SQL in a single file. Could you take a look at the modified code? Also one question: in case if the returned data changes due to adding some historical revenue later on, is there an option to rerun historical data on defiLlama? Or how does it work in cases like this? |
@b-tarczynski can you check SQL query, I got this error: |
Sorry for that, the data has changed after I created the PR. I pushed changes and now the query runs successfully |
The spark-liquidity-layer adapter exports:
|
It calculates Spark Liquidity Layer revenue - it sums up breakdown of revenue based on Dune queries used for this Dune dashboard. The difference is that the queries used for
defiLlama
are using daily data instead of monthly.Could you guys add missing token prices for sUSDS and sUSDC (on Mainnet it's available) or should I handle it in the code instead?