Skip to content

Jito DAO Protocol Revenue #3004

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Jito DAO Protocol Revenue #3004

wants to merge 2 commits into from

Conversation

push-xx
Copy link

@push-xx push-xx commented Apr 23, 2025

  • Removed old jito.ts in favor of jito/index.ts
  • Included protocol revenue related to JitoSOL and also Jito Restaking Ecosystem

@llamabutler
Copy link

The jito-restaking adapter exports:

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

🦙 Running JITO-RESTAKING adapter 🦙
---------------------------------------------------
Start Date:	Tue, 22 Apr 2025 08:38:48 GMT
End Date:	Wed, 23 Apr 2025 08:38:48 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.dune.com/api/v1/query/3996608/execute',
  method: 'POST',
  axiosError: 'invalid API Key',
  chain: 'solana'
}

@llamabutler
Copy link

The jito adapter exports:

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

🦙 Running JITO adapter 🦙
---------------------------------------------------
Start Date:	Tue, 22 Apr 2025 08:38:51 GMT
End Date:	Wed, 23 Apr 2025 08:38:51 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.dune.com/api/v1/query/3996608/execute',
  method: 'POST',
  axiosError: 'invalid API Key',
  chain: 'solana'
}

@push-xx
Copy link
Author

push-xx commented Apr 23, 2025

Local outputs of test runs with correctly set DUNE_API_KEYS env var

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees jito-restaking 1744898400

🦙 Running JITO-RESTAKING adapter 🦙
---------------------------------------------------
Start Date:     Wed, 16 Apr 2025 14:00:00 GMT
End Date:       Thu, 17 Apr 2025 14:00:00 GMT
---------------------------------------------------

waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
SOLANA 👇
Backfill start time: 1/4/2024
Daily protocol revenue: 125.08 k
End timestamp: 1744898399 (2025-04-17T13:59:59.000Z)
> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees jito 1745157600

🦙 Running JITO adapter 🦙
---------------------------------------------------
Start Date:     Sat, 19 Apr 2025 14:00:00 GMT
End Date:       Sun, 20 Apr 2025 14:00:00 GMT
---------------------------------------------------

waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
waiting for query id 3996608 to complete...
SOLANA 👇
Backfill start time: 1/4/2024
Daily protocol revenue: 53.39 k
End timestamp: 1745157599 (2025-04-20T13:59:59.000Z)

// Jito Restaking Related revenue

// https://dune.com/queries/4908531
const sql = getSqlFromFile("helpers/queries/jito-restaking.sql", {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dailyFees type is required,(https://docs.llama.fi/list-your-project/other-dashboards/dimensions) here's all of the definitions, we suggest you add others to like dailyRevenue, dailySupplySideRevenue.

information about fee from docs: https://www.jito.network/restaking/learn/

The restaking program charges a 5% fee on rewards and a 0.1% (10 bps) withdrawal fee. Additionally, individual vaults have different deposit, withdrawal, and rewards fees. Be sure to check the specific fee structure of each vault before you deposit.

});

const data: any[] = (await queryDuneSql(options, sql));
if (data[0] == undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we prefer if it throws an error, instead of handling and returning zero value.

const data: any[] = (await queryDuneSql(options, sql));
if (data[0] == undefined) {
return {
dailyProtocolRevenue: 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same required changes as jito-restaking, we need dailyFees, and let it fail, instead of handling it. and update methodology too

daily_jitoSOL_amt as jitoSOL_amt,
COALESCE(usd_amt, 0) as usd_amt
FROM
query_4908531
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible please add the query_4908531 as CTE in sql file, so things don't break if someone changes the query in dune.

jitoSOL_amt,
usd_amt
FROM
query_4908703
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add both dune queries as CTE in sql file

@llamabutler
Copy link

The jito-restaking adapter exports:

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

🦙 Running JITO-RESTAKING adapter 🦙
---------------------------------------------------
Start Date:	Tue, 22 Apr 2025 21:39:20 GMT
End Date:	Wed, 23 Apr 2025 21:39:20 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.dune.com/api/v1/query/3996608/execute',
  method: 'POST',
  axiosError: 'invalid API Key',
  chain: 'solana'
}

@llamabutler
Copy link

The jito adapter exports:

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

🦙 Running JITO adapter 🦙
---------------------------------------------------
Start Date:	Tue, 22 Apr 2025 21:39:22 GMT
End Date:	Wed, 23 Apr 2025 21:39:22 GMT
---------------------------------------------------

[Error: Request failed with status code 401] {
  url: 'https://api.dune.com/api/v1/query/3996608/execute',
  method: 'POST',
  axiosError: 'invalid API Key',
  chain: 'solana'
}

@treeoflife2
Copy link
Member

@push-xx created new PR as i didn't have permission to add commit to the forked repo. and i've added the optimized query for jito liquid staking, but why did you added the DAO Tip Router Rewards as the jito restaking dao protocol fees? won't it come under the jito liquid staking? as i believe only jito restaking vault should come under the and protocol share from the rewards 5% and 0.1% withdrawal fees

@push-xx
Copy link
Author

push-xx commented May 6, 2025

@push-xx created new PR as i didn't have permission to add commit to the forked repo. and i've added the optimized query for jito liquid staking, but why did you added the DAO Tip Router Rewards as the jito restaking dao protocol fees? won't it come under the jito liquid staking? as i believe only jito restaking vault should come under the and protocol share from the rewards 5% and 0.1% withdrawal fees

Hey! Thanks so much for this.
I believe that DAO Tip Router rewards fall into the restaking protocol as tip router is an NCN, lying within the restaking ecosystem.

I would say that restaking related fees/rev are actually the lowest prio atm as the generated fees are quite small compared to everything else and we would need to correctly value all the Vault Receipt Tokens for which the fees are mostly paid in.

Before I looped back to this, I have been cleaning up the DAO Revenue Dashboard on Dune, so we have an initial source of truth and path forward. I think if we captured all DAO revenue listed here, it would get us most of the way.

Specifically aligning with the defillama docs, I propose the following.

Protocol: Jito Liquid Staking
User Fees: Withdrawal fees, reward fees, interceptor
Fees: Above + Stakepool rewards + MEV rewards
Supply side Revenue: Stakepool rewards + MEV rewards
Revenue: Withdrawal fees, reward fees, interceptor
Protocol Revenue (DAO Treasury): Withdrawal fees, reward fees, interceptor
Holders Revenue: n/a
Protocol: Jito Restaking
User Fees: Restaking reward fee, restaking withdrawal fee (Can be ignored for now)
Fees: Above + Tip router
Supply side Revenue: Node Operators + Staker tip router rewards
Revenue: Restaking reward fee, restaking withdrawal fee, DAO tip router rewards
Holders Revenue: n/a

@treeoflife2
Copy link
Member

@push-xx this PR #3116 is merged, but let's align on the sub protocols/products of Jito, so we have accurate revenue/fees and then we will refill older data. i have few questions i want to clarify before we make new changes regarding MEV, can we chat on discord(treeoflife2)?

@push-xx
Copy link
Author

push-xx commented May 6, 2025

sg. sent you a request - push_jito on discord

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