Skip to content

Echo Fees #2865

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

Merged
merged 120 commits into from
Apr 24, 2025
Merged

Echo Fees #2865

merged 120 commits into from
Apr 24, 2025

Conversation

treeoflife2
Copy link
Member

No description provided.

@treeoflife2 treeoflife2 requested a review from g1nt0ki April 10, 2025 17:34
@llamabutler
Copy link

The jellyverse adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts dexs jellyverse

🦙 Running JELLYVERSE adapter 🦙
---------------------------------------------------
Start Date:	Wed, 09 Apr 2025 00:00:00 GMT
End Date:	Thu, 10 Apr 2025 00:00:00 GMT
---------------------------------------------------

Version -> V2
---------
SEI 👇
Backfill start time: 1/6/2024
Daily volume: 1.58 M
Daily fees: 3.33 k
Daily revenue: 471
Total volume: 327.28 M
Total fees: 371.72 k
Total revenue: 178.25 k

@llamabutler
Copy link

The echo adapter exports:

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

🦙 Running ECHO adapter 🦙
---------------------------------------------------
Start Date:	Wed, 09 Apr 2025 15:05:24 GMT
End Date:	Thu, 10 Apr 2025 15:05:24 GMT
---------------------------------------------------

Token transfers: Failed to use indexer, falling back to logs Llama Indexer URL/api key is not set
BASE 👇
Backfill start time: 27/3/2024
Daily fees: 0
Daily revenue: 0
End timestamp: 1744297523 (2025-04-10T15:05:23.000Z)

@g1nt0ki g1nt0ki self-assigned this Apr 10, 2025
@llamabutler
Copy link

The echo adapter exports:

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

🦙 Running ECHO adapter 🦙
---------------------------------------------------
Start Date:	Thu, 10 Apr 2025 12:25:03 GMT
End Date:	Fri, 11 Apr 2025 12:25:03 GMT
---------------------------------------------------

BASE 👇
Backfill start time: 27/3/2024
Daily fees: 0
Daily revenue: 0
End timestamp: 1744374302 (2025-04-11T12:25:02.000Z)


// Process each log, keeping only the platform fee portion
for (const log of logs) {
if (log.topics[2] !== ECHO_FEE_RECEIVER_TOPIC) continue;
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed it

for (const log of logs) {
if (log.topics[2] !== ECHO_FEE_RECEIVER_TOPIC) continue;
const token = '0x' + log.topics[1].slice(26);
const amount = BigInt(log.data);
Copy link
Member

Choose a reason for hiding this comment

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

why convert to BigInt and later convert to string? can leave it as is?

Copy link
Member

Choose a reason for hiding this comment

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

ah, I see the check in line 49, I think dailyFees.add accepts bigInt?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed it

@llamabutler
Copy link

The echo adapter exports:

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

🦙 Running ECHO adapter 🦙
---------------------------------------------------
Start Date:	Thu, 10 Apr 2025 14:59:52 GMT
End Date:	Fri, 11 Apr 2025 14:59:52 GMT
---------------------------------------------------

BASE 👇
Backfill start time: 27/3/2024
Daily fees: 0
Daily revenue: 0
End timestamp: 1744383591 (2025-04-11T14:59:51.000Z)

@llamabutler
Copy link

The echo adapter exports:

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

🦙 Running ECHO adapter 🦙
---------------------------------------------------
Start Date:	Thu, 10 Apr 2025 14:58:55 GMT
End Date:	Fri, 11 Apr 2025 14:58:55 GMT
---------------------------------------------------

BASE 👇
Backfill start time: 27/3/2024
Daily fees: 1.12 M
Daily revenue: 1.12 M
End timestamp: 1744383534 (2025-04-11T14:58:54.000Z)

noateden and others added 25 commits April 24, 2025 17:07
* fix fjord-foundry dexs v2 api

* set kyberswap dead date for classic and elastic products
* query premia data using factories and blocks

* remove console log
* refresh to new data api

* refresh api
* vanilla finance perps

* use log instead

* use log instead

* code refactor

---------

Co-authored-by: osel <[email protected]>
Co-authored-by: g1nt0ki <[email protected]>
* add m0.org fees adapter

* update start date

* update correct start date
* feat: bucket fee & revenue statistic

* code refactor

---------

Co-authored-by: Jarek Lin <[email protected]>
* add typus fees

* fix calculation

* minor fix

---------

Co-authored-by: g1nt0ki <[email protected]>
DexToro's perpetual DEX on Optimism has been discontinued, and the company has transitioned to an iOS trading app based on Solana. This commit replaces the code that was tracking the old Optimism app with updated code to track revenue (fees collected) on the project's Solana Treasury wallet.
@llamabutler
Copy link

The perpie adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregator-derivatives perpie

🦙 Running PERPIE adapter 🦙
---------------------------------------------------
Start Date:	Wed, 23 Apr 2025 00:00:00 GMT
End Date:	Thu, 24 Apr 2025 00:00:00 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: 'arbitrum'
}

@llamabutler
Copy link

The 1delta adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregators 1delta

🦙 Running 1DELTA adapter 🦙
---------------------------------------------------
Start Date:	Wed, 23 Apr 2025 12:37:39 GMT
End Date:	Thu, 24 Apr 2025 12:37:39 GMT
---------------------------------------------------

MANTLE 👇
Backfill start time: 1/3/2025
Daily volume: 16.25 k
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


OPTIMISM 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


POLYGON 👇
Backfill start time: 1/3/2025
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


LINEA 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


BSC 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


AVAX 👇
Backfill start time: 1/3/2025
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


TAIKO 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


BASE 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


ARBITRUM 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


BLAST 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


METIS 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


XDAI 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


MODE 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


HEMI 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


SCROLL 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


CORE 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


SONIC 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


FANTOM 👇
Backfill start time: 1/3/2025
Daily volume: 0
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


FUEL 👇
Backfill start time: 20/1/2025
Daily volume: 112.16 k
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)


---- AGGREGATE 👇
Backfill start time not defined
End timestamp: 1745498258 (2025-04-24T12:37:38.000Z)
Daily volume: 128.41 k

@llamabutler
Copy link

The dodo-agg adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregators dodo-agg

🦙 Running DODO-AGG adapter 🦙
---------------------------------------------------
Start Date:	Wed, 23 Apr 2025 00:00:00 GMT
End Date:	Thu, 24 Apr 2025 00:00:00 GMT
---------------------------------------------------

ETHEREUM 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 19.88 k


OPTIMISM 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 2


BSC 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 1.29 M


POLYGON 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 13.04 k


BOBA 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 0


CONFLUX 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 0


MOONRIVER 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 0


MANTLE 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 21


BASE 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 2.74 k


AVAX 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 2.77 k


ARBITRUM 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 8.83 k


LINEA 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 562


SCROLL 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 0


MANTA 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 83


ZERO_NETWORK 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 59


ZIRCUIT 👇
Backfill start time: 1/8/2024
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 0


---- AGGREGATE 👇
Backfill start time not defined
End timestamp: 1745452799 (2025-04-23T23:59:59.000Z)
Daily volume: 1.34 M

@g1nt0ki g1nt0ki merged commit dae3ac3 into DefiLlama:master Apr 24, 2025
1 of 2 checks passed
@llamabutler
Copy link

The enso adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts aggregators enso

🦙 Running ENSO adapter 🦙
---------------------------------------------------
Start Date:	Wed, 23 Apr 2025 00:00:00 GMT
End Date:	Thu, 24 Apr 2025 00:00:00 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: 'bsc'
}

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.