Skip to content
Dune Analytics

@MatteoLeibowitz / Balancer: LP Per Asset

Balancer: Liquidity Provided Per LP Per Asset [Source: The Block]Balancer: LP Per Asset

Loading
 

About queries and results

Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.

We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.

Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.

SQL query results

Loading
 

SQL query

1WITH LPs AS 
2(
3SELECT
4caller as LP,
5t.symbol as token,
6t.decimals,
7sum("tokenAmountIn") as amount
8FROM balancer."BPool_evt_LOG_JOIN" b
9LEFT JOIN erc20."tokens" t ON b."tokenIn" = t.contract_address
10GROUP BY 1,2,3
11UNION 
12SELECT
13caller as LP,
14t.symbol as token,
15t.decimals,
16sum(-"tokenAmountOut") as amount
17FROM balancer."BPool_evt_LOG_EXIT" b
18LEFT JOIN erc20."tokens" t ON b."tokenOut" = t.contract_address
19GROUP BY 1,2,3
20),
21
22prices as 
23(
24SELECT
25symbol,...