Skip to content
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

feat(dopex): holder and supply side revenue #1277

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

Conversation

Aercwarden
Copy link

@Aercwarden Aercwarden commented Mar 8, 2024

Current implementation shows same data for daily revenue and daily fees this PR fixes that

current:
image

with fix:
image

@llamatester
Copy link

The dopex adapter exports:


Options for 7/3/2024
_______________________________________

Version -> CLAMM
---------
ARBITRUM 👇
Backfill start time: 12/11/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1709855998 (2024-03-07T23:59:58.000Z)
Total notional volume: 147.40 M
Total fees: 354.19 k
Total revenue: 121.12 k
Daily notional volume: 2.20 M
Daily fees: 7.88 k
Daily revenue: 2.68 k


Done in 6.68s.

@llamatester
Copy link

The dopex adapter exports:


Options for 8/3/2024
_______________________________________

Version -> CLAMM
---------
ARBITRUM 👇
Backfill start time: 12/11/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1709942398 (2024-03-08T23:59:58.000Z)
Total premium volume: 354.19 k
Daily premium volume: 11.72 k
Total notional volume: 147.40 M
Total fees: 354.19 k
Total revenue: 121.12 k
Daily notional volume: 2.53 M
Daily fees: 11.72 k
Daily revenue: 3.99 k


Done in 8.56s.

@@ -74,23 +77,23 @@ async function getChainStats({ graphUrl, timestamp }: IGetChainStatsParams) {
(acc, market) => {
return {
dailyNotionalVolume: acc.dailyNotionalVolume + Number(market.volume),
dailyPremiumVolume: acc.dailyPremiumVolume + Number(market.premium),
dailyFees: acc.dailyFees + Number(market.premium),
Copy link
Contributor

Choose a reason for hiding this comment

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

for options we can't include premium on fees

Copy link
Author

@Aercwarden Aercwarden Mar 9, 2024

Choose a reason for hiding this comment

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

Oh okay! Can you suggest how can we show premiums as premiums and not as premium volume (which is only visible on a graph). premiums should be shown in the side bars as well along with fees, revenue etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

image you mean rev 24h, it is wrong file is should be 24h premiums data we will fix

Copy link
Author

Choose a reason for hiding this comment

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

Yes, 24h revenue should show as premiums 24h. anyways I've updated the code to show only revenue and not fees since they're the same data :)

Copy link
Author

Choose a reason for hiding this comment

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

image

premiums should show here on the left panel too

Copy link
Contributor

Choose a reason for hiding this comment

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

no fees is only add on fees when user buy option premium is not fees

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, 24h revenue should show as premiums 24h. anyways I've updated the code to show only revenue and not fees since they're the same data :)

if you need update fees/rev plz set at field dailyFees, dailyRevenue
now current adapter set fees = rev then show fees = rev premiums is show only options page

Copy link
Author

@Aercwarden Aercwarden Mar 11, 2024

Choose a reason for hiding this comment

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

If that's the case, no change has to be made and this PR can be closed. Our only concern is premiums not showing in main options page or anywhere except in just the bar graph as premium volume which as you mentioned will be fixed :)

Copy link
Contributor

Choose a reason for hiding this comment

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

yes will take look why option is show daily rev instead daily premium

Copy link
Author

Choose a reason for hiding this comment

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

Hey! updated the PR to just show more stats as per teams feedback :) please review

@llamatester
Copy link

The dopex adapter exports:


Options for 8/3/2024
_______________________________________

Version -> CLAMM
---------
ARBITRUM 👇
Backfill start time: 12/11/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1709942398 (2024-03-08T23:59:58.000Z)
Total notional volume: 148.72 M
Total premium volume: 357.70 k
Total revenue: 122.31 k
Daily notional volume: 2.53 M
Daily premium volume: 11.72 k
Daily revenue: 3.99 k


Done in 7.28s.

@Aercwarden Aercwarden changed the title fix(dopex): fees and revenue stats labels for clamm featdopex): holder and supply side revenue Mar 29, 2024
@llamatester
Copy link

The dopex adapter exports:


Options for 28/3/2024
_______________________________________

Version -> CLAMM
---------
ARBITRUM 👇
Backfill start time: 12/11/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1711670399 (2024-03-28T23:59:59.000Z)
Total notional volume: 189.58 M
Total premium volume: 496.27 k
Total revenue: 169.43 k
Daily notional volume: 1.70 M
Daily premium volume: 6.39 k
Daily revenue: 2.17 k
Daily supply side revenue: 6.39 k
Total supply side revenue: 496.27 k
Daily holders revenue: 2.17 k
Total daily holders revenue: 169.43 k


Done in 6.02s.

@Aercwarden Aercwarden changed the title featdopex): holder and supply side revenue feat(dopex): holder and supply side revenue Mar 29, 2024
@@ -88,9 +92,11 @@ async function getChainStats({ graphUrl, timestamp }: IGetChainStatsParams) {
return {
timestamp,
...cumulative,
totalFees: cumulative.totalRevenue,
...daily,
Copy link
Contributor

Choose a reason for hiding this comment

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

fees is require dailyFees we can't list without dailyFees

Copy link
Author

@Aercwarden Aercwarden Jun 23, 2024

Choose a reason for hiding this comment

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

In our context, this will be protocol fees + premium?

dailyFees = daily protocol fees + daily premium?

when a user purchases options on stryke they pay premium + protocol fees

image

@noelportillo
Copy link

The first thing that came up

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.

5 participants