Skip to content

Conversation

KPHEMRAJ
Copy link
Contributor

Closes issue : #2928

@llamabutler
Copy link

The gauntlet.ts adapter exports:

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

🦙 Running GAUNTLET.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 00:00:00 GMT
End Date:	Sun, 14 Sep 2025 00:00:00 GMT
---------------------------------------------------

Error: Request failed with status code 401
    at queryDune (/home/runner/work/dimension-adapters/dimension-adapters/helpers/dune.ts:121:22)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchSolana (/home/runner/work/dimension-adapters/dimension-adapters/fees/gauntlet.ts:145:27)
    at async getChainResult (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:204:18)
    at async Promise.all (index 3)
    at async _runAdapter (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:159:20)
    at async /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:69:24 {
  axiosError: 'Dune API Key is invalid',
  chain: 'solana'
}

@llamabutler
Copy link

The openeden-usdo.ts adapter exports:

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

🦙 Running OPENEDEN-USDO.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 15:18:20 GMT
End Date:	Sun, 14 Sep 2025 15:18:20 GMT
---------------------------------------------------

Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
chain     | Daily fees | Daily user fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---             | ---           | ---                       | ---                    | ---       
base      | 67         | 0               | 5             | 62                        | 5                      | 18/1/2025 
ethereum  | 31.64 k    | 0               | 2.26 k        | 29.38 k                   | 2.26 k                 | 18/1/2025 
Aggregate | 31.71 k    | 0               | 2.26 k        | 29.44 k                   | 2.27 k                 |           

@llamabutler
Copy link

The yearn-finance.ts adapter exports:

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

🦙 Running YEARN-FINANCE.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 15:18:38 GMT
End Date:	Sun, 14 Sep 2025 15:18:38 GMT
---------------------------------------------------

chain     | Daily fees | Daily supply side revenue | Daily revenue | Daily protocol revenue | Start Time
---       | ---        | ---                       | ---           | ---                    | ---       
ethereum  | 96.46 k    | 92.21 k                   | 4.24 k        | 4.25 k                 | 27/7/2020 
polygon   | 56         | 55                        | 2             | 2                      | 1/1/2024  
optimism  | 0          | 0                         | 0             | 0                      | 1/1/2024  
arbitrum  | 0          | 0                         | 0             | 0                      | 1/1/2024  
base      | 689        | 620                       | 69            | 69                     | 1/1/2024  
Aggregate | 97.20 k    | 92.89 k                   | 4.31 k        | 4.32 k                 |           

@llamabutler
Copy link

The treehouse-protocol adapter exports:

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

🦙 Running TREEHOUSE-PROTOCOL adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 00:00:00 GMT
End Date:	Sun, 14 Sep 2025 00:00:00 GMT
---------------------------------------------------

ETHEREUM 👇
Backfill start time: 10/9/2024
Daily fees: 17.54 k
Daily revenue: 12.19 k
Daily holders revenue: 0
Daily protocol revenue: 12.19 k
Daily supply side revenue: 5.35 k

@llamabutler
Copy link

The gauntlet.ts adapter exports:

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

🦙 Running GAUNTLET.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 00:00:00 GMT
End Date:	Sun, 14 Sep 2025 00:00:00 GMT
---------------------------------------------------

Error: Request failed with status code 401
    at queryDune (/home/runner/work/dimension-adapters/dimension-adapters/helpers/dune.ts:121:22)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchSolana (/home/runner/work/dimension-adapters/dimension-adapters/fees/gauntlet.ts:145:27)
    at async getChainResult (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:204:18)
    at async Promise.all (index 3)
    at async _runAdapter (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:159:20)
    at async /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:69:24 {
  axiosError: 'Dune API Key is invalid',
  chain: 'solana'
}

@llamabutler
Copy link

The openeden-usdo.ts adapter exports:

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

🦙 Running OPENEDEN-USDO.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 15:20:56 GMT
End Date:	Sun, 14 Sep 2025 15:20:56 GMT
---------------------------------------------------

Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
chain     | Daily fees | Daily user fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---             | ---           | ---                       | ---                    | ---       
base      | 67         | 0               | 5             | 62                        | 5                      | 18/1/2025 
ethereum  | 31.64 k    | 0               | 2.26 k        | 29.38 k                   | 2.26 k                 | 18/1/2025 
Aggregate | 31.71 k    | 0               | 2.26 k        | 29.44 k                   | 2.27 k                 |           

@llamabutler
Copy link

The yearn-finance.ts adapter exports:

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

🦙 Running YEARN-FINANCE.TS adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 15:21:25 GMT
End Date:	Sun, 14 Sep 2025 15:21:25 GMT
---------------------------------------------------

chain     | Daily fees | Daily supply side revenue | Daily revenue | Daily protocol revenue | Start Time
---       | ---        | ---                       | ---           | ---                    | ---       
ethereum  | 96.43 k    | 92.19 k                   | 4.24 k        | 4.25 k                 | 27/7/2020 
polygon   | 56         | 55                        | 2             | 2                      | 1/1/2024  
optimism  | 0          | 0                         | 0             | 0                      | 1/1/2024  
arbitrum  | 0          | 0                         | 0             | 0                      | 1/1/2024  
base      | 689        | 620                       | 69            | 69                     | 1/1/2024  
Aggregate | 97.18 k    | 92.86 k                   | 4.31 k        | 4.32 k                 |           

@llamabutler
Copy link

The treehouse-protocol adapter exports:

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

🦙 Running TREEHOUSE-PROTOCOL adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Sep 2025 00:00:00 GMT
End Date:	Sun, 14 Sep 2025 00:00:00 GMT
---------------------------------------------------

ETHEREUM 👇
Backfill start time: 10/9/2024
Daily fees: 17.55 k
Daily revenue: 12.20 k
Daily holders revenue: 0
Daily protocol revenue: 12.20 k
Daily supply side revenue: 5.35 k

@llamabutler
Copy link

The gauntlet.ts adapter exports:

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

🦙 Running GAUNTLET.TS adapter 🦙
---------------------------------------------------
Start Date:	Sun, 14 Sep 2025 00:00:00 GMT
End Date:	Mon, 15 Sep 2025 00:00:00 GMT
---------------------------------------------------

Error: Request failed with status code 401
    at queryDune (/home/runner/work/dimension-adapters/dimension-adapters/helpers/dune.ts:121:22)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchSolana (/home/runner/work/dimension-adapters/dimension-adapters/fees/gauntlet.ts:145:27)
    at async getChainResult (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:204:18)
    at async Promise.all (index 3)
    at async _runAdapter (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:159:20)
    at async /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:69:24 {
  axiosError: 'Dune API Key is invalid',
  chain: 'solana'
}

@llamabutler
Copy link

The openeden-usdo.ts adapter exports:

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

🦙 Running OPENEDEN-USDO.TS adapter 🦙
---------------------------------------------------
Start Date:	Sun, 14 Sep 2025 04:04:07 GMT
End Date:	Mon, 15 Sep 2025 04:04:07 GMT
---------------------------------------------------

Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
chain     | Daily fees | Daily user fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---             | ---           | ---                       | ---                    | ---       
base      | 67         | 0               | 5             | 62                        | 5                      | 18/1/2025 
ethereum  | 31.57 k    | 0               | 2.25 k        | 29.32 k                   | 2.25 k                 | 18/1/2025 
Aggregate | 31.64 k    | 0               | 2.26 k        | 29.38 k                   | 2.26 k                 |           

@llamabutler
Copy link

The yearn-finance.ts adapter exports:

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

🦙 Running YEARN-FINANCE.TS adapter 🦙
---------------------------------------------------
Start Date:	Sun, 14 Sep 2025 04:04:30 GMT
End Date:	Mon, 15 Sep 2025 04:04:30 GMT
---------------------------------------------------

chain     | Daily fees | Daily supply side revenue | Daily revenue | Daily protocol revenue | Start Time
---       | ---        | ---                       | ---           | ---                    | ---       
ethereum  | 86.04 k    | 82.65 k                   | 3.38 k        | 3.39 k                 | 27/7/2020 
polygon   | 56         | 55                        | 2             | 2                      | 1/1/2024  
optimism  | 0          | 0                         | 0             | 0                      | 1/1/2024  
arbitrum  | 0          | 0                         | 0             | 0                      | 1/1/2024  
base      | 677        | 610                       | 67            | 67                     | 1/1/2024  
Aggregate | 86.77 k    | 83.31 k                   | 3.45 k        | 3.46 k                 |           

@llamabutler
Copy link

The treehouse-protocol adapter exports:

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

🦙 Running TREEHOUSE-PROTOCOL adapter 🦙
---------------------------------------------------
Start Date:	Sun, 14 Sep 2025 00:00:00 GMT
End Date:	Mon, 15 Sep 2025 00:00:00 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Daily holders revenue | Daily protocol revenue | Daily supply side revenue | Start Time
---       | ---        | ---           | ---                   | ---                    | ---                       | ---       
ethereum  | 6.38 k     | 1.28 k        | 0                     | 1.28 k                 | 5.10 k                    | 10/9/2024 
avax      | 0          | 0             | 0                     | 0                      | 0                         | 28/8/2025 
Aggregate | 6.38 k     | 1.28 k        | 0                     | 1.28 k                 | 5.10 k                    |           

Copy link
Member

@g1nt0ki g1nt0ki left a comment

Choose a reason for hiding this comment

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

.

const dailySupplySideRevenue = options.createBalances();
const dailyProtocolRevenue = options.createBalances();
const markedLogs = await options.getLogs({
target: ADDRESSES[options.chain as keyof typeof ADDRESSES].TREEHOUSE_ACCOUNTING,
Copy link
Member

Choose a reason for hiding this comment

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

one of the reasons why I hate typescript, instead of helping, it is making the code unreadable here, thats why I use any everywhere. The solution here might be:

const { TREEHOUSE_ACCOUNTING, TREEHOUSE_TOKEN, ... } = (ADDRESSES as any)[options.chain]

Again, thanks for the PR @KPHEMRAJ

@g1nt0ki g1nt0ki merged commit a1affea into DefiLlama:master Sep 17, 2025
2 checks passed
@llamabutler
Copy link

The gauntlet.ts adapter exports:

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

🦙 Running GAUNTLET.TS adapter 🦙
---------------------------------------------------
Start Date:	Tue, 16 Sep 2025 00:00:00 GMT
End Date:	Wed, 17 Sep 2025 00:00:00 GMT
---------------------------------------------------

Error: Request failed with status code 401
    at _queryDune (/home/runner/work/dimension-adapters/dimension-adapters/helpers/dune.ts:219:22)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchSolana (/home/runner/work/dimension-adapters/dimension-adapters/fees/gauntlet.ts:145:27)
    at async getChainResult (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:205:18)
    at async Promise.all (index 3)
    at async _runAdapter (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:160:20)
    at async /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:69:24 {
  axiosError: 'Dune API Key is invalid',
  chain: 'solana'
}

@llamabutler
Copy link

The openeden-usdo.ts adapter exports:

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

🦙 Running OPENEDEN-USDO.TS adapter 🦙
---------------------------------------------------
Start Date:	Tue, 16 Sep 2025 06:05:30 GMT
End Date:	Wed, 17 Sep 2025 06:05:30 GMT
---------------------------------------------------

Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs base Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
Token transfers: Failed to use indexer, falling back to logs ethereum Llama Indexer v2 URL/api key is not set
chain     | Daily fees | Daily user fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---             | ---           | ---                       | ---                    | ---       
base      | 57         | 0               | 4             | 53                        | 4                      | 18/1/2025 
ethereum  | 39.96 k    | 10.20 k         | 12.33 k       | 27.63 k                   | 12.33 k                | 18/1/2025 
Aggregate | 40.01 k    | 10.20 k         | 12.33 k       | 27.68 k                   | 12.33 k                |           

@llamabutler
Copy link

The yearn-finance.ts adapter exports:

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

🦙 Running YEARN-FINANCE.TS adapter 🦙
---------------------------------------------------
Start Date:	Tue, 16 Sep 2025 06:05:44 GMT
End Date:	Wed, 17 Sep 2025 06:05:44 GMT
---------------------------------------------------

chain     | Daily fees | Daily supply side revenue | Daily revenue | Daily protocol revenue | Start Time
---       | ---        | ---                       | ---           | ---                    | ---       
ethereum  | 77.35 k    | 73.34 k                   | 4.00 k        | 4.00 k                 | 27/7/2020 
polygon   | 54         | 52                        | 1             | 1                      | 1/1/2024  
optimism  | 0          | 0                         | 0             | 0                      | 1/1/2024  
arbitrum  | 0          | 0                         | 0             | 0                      | 1/1/2024  
base      | 625        | 563                       | 62            | 62                     | 1/1/2024  
Aggregate | 78.03 k    | 73.96 k                   | 4.06 k        | 4.06 k                 |           

@llamabutler
Copy link

The treehouse-protocol adapter exports:

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

🦙 Running TREEHOUSE-PROTOCOL adapter 🦙
---------------------------------------------------
Start Date:	Tue, 16 Sep 2025 00:00:00 GMT
End Date:	Wed, 17 Sep 2025 00:00:00 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Daily holders revenue | Daily protocol revenue | Daily supply side revenue | Start Time
---       | ---        | ---           | ---                   | ---                    | ---                       | ---       
ethereum  | 7.03 k     | 1.93 k        | 0                     | 1.93 k                 | 5.11 k                    | 10/9/2024 
avax      | 12         | 2             | 0                     | 2                      | 10                        | 28/8/2025 
Aggregate | 7.04 k     | 1.93 k        | 0                     | 1.93 k                 | 5.12 k                    |           

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