Skip to content

track concrete fees#5070

Merged
noateden merged 7 commits intoDefiLlama:masterfrom
KPHEMRAJ:concrete-fees
Dec 23, 2025
Merged

track concrete fees#5070
noateden merged 7 commits intoDefiLlama:masterfrom
KPHEMRAJ:concrete-fees

Conversation

@KPHEMRAJ
Copy link
Contributor

@KPHEMRAJ KPHEMRAJ commented Dec 14, 2025

Closes : #4791

@llamabutler
Copy link

The concrete-v1 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v1

🦙 Running CONCRETE-V1 adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Dec 2025 12:11:31 GMT
End Date:	Sun, 14 Dec 2025 12:11:31 GMT
---------------------------------------------------

------ ERROR ------
Error: token is required
    at Balances.add (/home/runner/work/dimension-adapters/dimension-adapters/node_modules/.pnpm/@defillama+sdk@5.0.195_typescript@5.9.3/node_modules/@defillama/sdk/build/Balances.js:71:19)
    at fetch (/home/runner/work/dimension-adapters/dimension-adapters/fees/concrete-v1/index.ts:98:22)
token is required

@KPHEMRAJ KPHEMRAJ marked this pull request as draft December 14, 2025 14:43
@KPHEMRAJ KPHEMRAJ marked this pull request as ready for review December 14, 2025 14:49
@llamabutler
Copy link

The concrete-v1 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v1

🦙 Running CONCRETE-V1 adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Dec 2025 12:19:39 GMT
End Date:	Sun, 14 Dec 2025 12:19:39 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue
---       | ---        | ---           | ---                       | ---                   
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                  
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                  
berachain | 88.00      | 88.00         | 0.00                      | 88.00                 
katana    | 0.00       | 0.00          | 0.00                      | 0.00                  
Aggregate | 88.00      | 88.00         | 0.00                      | 88.00                 

@llamabutler
Copy link

The concrete-v2 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v2

🦙 Running CONCRETE-V2 adapter 🦙
---------------------------------------------------
Start Date:	Sat, 13 Dec 2025 12:20:42 GMT
End Date:	Sun, 14 Dec 2025 12:20:42 GMT
---------------------------------------------------

error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue
---       | ---        | ---           | ---                       | ---                   
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                  
stable    | 0.00       | 0.00          | 0.00                      | 0.00                  
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                  
Aggregate | 0.00       | 0.00          | 0.00                      | 0.00                  

@noateden noateden self-assigned this Dec 14, 2025
Copy link
Contributor

@noateden noateden left a comment

Choose a reason for hiding this comment

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

can you try to get revenue from fee instead, do not use token received? try to find functions from vault contracts to get performance and management fees if any.

@llamabutler
Copy link

The concrete-v1 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v1

🦙 Running CONCRETE-V1 adapter 🦙
---------------------------------------------------
Start Date:	Mon, 15 Dec 2025 07:39:13 GMT
End Date:	Tue, 16 Dec 2025 07:39:13 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue
---       | ---        | ---           | ---                       | ---                   
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                  
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                  
berachain | 0.00       | 0.00          | 0.00                      | 0.00                  
katana    | 0.00       | 0.00          | 0.00                      | 0.00                  
Aggregate | 0.00       | 0.00          | 0.00                      | 0.00                  

@llamabutler
Copy link

The concrete-v2 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v2

🦙 Running CONCRETE-V2 adapter 🦙
---------------------------------------------------
Start Date:	Mon, 15 Dec 2025 07:40:26 GMT
End Date:	Tue, 16 Dec 2025 07:40:26 GMT
---------------------------------------------------

error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue
---       | ---        | ---           | ---                       | ---                   
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                  
stable    | 0.00       | 0.00          | 0.00                      | 0.00                  
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                  
Aggregate | 0.00       | 0.00          | 0.00                      | 0.00                  

@KPHEMRAJ
Copy link
Contributor Author

can you try to get revenue from fee instead, do not use token received? try to find functions from vault contracts to get performance and management fees if any.

done

@noateden
Copy link
Contributor

hi @KPHEMRAJ, I tested and got all 0 fees. Can you check?

@llamabutler
Copy link

The concrete-v1 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v1

🦙 Running CONCRETE-V1 adapter 🦙
---------------------------------------------------
Start Date:	Tue, 16 Dec 2025 14:47:10 GMT
End Date:	Wed, 17 Dec 2025 14:47:10 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---           | ---                       | ---                    | ---       
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 11/2/2025 
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 15/8/2025 
berachain | 0.00       | 0.00          | 0.00                      | 0.00                   | 22/4/2025 
katana    | 0.00       | 0.00          | 0.00                      | 0.00                   | 29/7/2025 
Aggregate | 0.00       | 0.00          | 0.00                      | 0.00                   |           

@llamabutler
Copy link

The concrete-v2 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v2

🦙 Running CONCRETE-V2 adapter 🦙
---------------------------------------------------
Start Date:	Tue, 16 Dec 2025 14:48:13 GMT
End Date:	Wed, 17 Dec 2025 14:48:13 GMT
---------------------------------------------------

error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---           | ---                       | ---                    | ---       
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 22/10/2025
stable    | 0.00       | 0.00          | 0.00                      | 0.00                   | 8/12/2025 
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 6/11/2025 
Aggregate | 0.00       | 0.00          | 0.00                      | 0.00                   |           


const vaultsResponse = await getConfig('concrete', `${CONCRETE_API_URL}/vault:tvl/all`);

const vaults = new Set(Object.values(vaultsResponse[currentChainId]).filter((vault: any) => vault.version === 1 && +vault.peak_tvl > 0).map((v1Vault: any) => v1Vault.address));
Copy link
Member

Choose a reason for hiding this comment

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

can keep peak_tvl > 10k to filter out low value pools?


const vaultsResponse = await getConfig('concrete', `${CONCRETE_API_URL}/vault:tvl/all`);

const vaults = new Set(Object.values(vaultsResponse[currentChainId]).filter((vault: any) => vault.version === 2 && +vault.peak_tvl > 0).map((v2Vault: any) => v2Vault.address));
Copy link
Member

Choose a reason for hiding this comment

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

same here

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.

since we have a single listing for concrete, can you merge it into single adapter here: https://defillama.com/protocol/concrete

@KPHEMRAJ KPHEMRAJ marked this pull request as draft December 18, 2025 14:35
@llamabutler
Copy link

The concrete-v1 adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete-v1

🦙 Running CONCRETE-V1 adapter 🦙
---------------------------------------------------
Start Date:	Sat, 20 Dec 2025 13:44:48 GMT
End Date:	Sun, 21 Dec 2025 13:44:48 GMT
---------------------------------------------------

------ ERROR ------
TypeError: Cannot convert undefined or null to object
    at Function.values (<anonymous>)
    at fetch (/home/runner/work/dimension-adapters/dimension-adapters/fees/concrete-v1/index.ts:30:35)
Cannot convert undefined or null to object

@llamabutler
Copy link

The concrete adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete

🦙 Running CONCRETE adapter 🦙
---------------------------------------------------
Start Date:	Sun, 21 Dec 2025 08:17:03 GMT
End Date:	Mon, 22 Dec 2025 08:17:03 GMT
---------------------------------------------------

error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---           | ---                       | ---                    | ---       
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 11/2/2025 
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 15/8/2025 
berachain | 478.00     | 503.00        | -25.00                    | 503.00                 | 22/4/2025 
katana    | 0.00       | 0.00          | 0.00                      | 0.00                   | 29/7/2025 
stable    | 0.00       | 0.00          | 0.00                      | 0.00                   | 8/12/2025 
Aggregate | 478.00     | 503.00        | -25.00                    | 503.00                 |           

@llamabutler
Copy link

The concrete adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees concrete

🦙 Running CONCRETE adapter 🦙
---------------------------------------------------
Start Date:	Sun, 21 Dec 2025 08:23:56 GMT
End Date:	Mon, 22 Dec 2025 08:23:56 GMT
---------------------------------------------------

error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
error fetching block [Error: Llama RPC error! method: getBlock 
- host: https://rpc.stable.xyz error: Cannot read properties of null (reading 'number')] {
  _underlyingError: '[object Object]',
  _isCustomError: true
}
chain     | Daily fees | Daily revenue | Daily supply side revenue | Daily protocol revenue | Start Time
---       | ---        | ---           | ---                       | ---                    | ---       
ethereum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 11/2/2025 
arbitrum  | 0.00       | 0.00          | 0.00                      | 0.00                   | 15/8/2025 
berachain | 477.00     | 502.00        | -25.00                    | 502.00                 | 22/4/2025 
katana    | 0.00       | 0.00          | 0.00                      | 0.00                   | 29/7/2025 
stable    | 0.00       | 0.00          | 0.00                      | 0.00                   | 8/12/2025 
Aggregate | 477.00     | 502.00        | -25.00                    | 502.00                 |           

@KPHEMRAJ KPHEMRAJ marked this pull request as ready for review December 22, 2025 10:56
@KPHEMRAJ KPHEMRAJ requested a review from noateden December 22, 2025 10:56
@noateden noateden merged commit 44fe1c6 into DefiLlama:master Dec 23, 2025
2 checks passed
RohanNero pushed a commit to RohanNero/dimension-adapters that referenced this pull request Mar 13, 2026
* track concrete fees

* smol fix

* use functions instead of evnnt logs to calculate performance and management fees

* fix start date

* fix calculations

* merge both versions

* remove redundant code

---------

Co-authored-by: Eden <noat.eth@gmail.com>
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.

Track Concrete Fees/Revenue

4 participants