Skip to content
Dune Analytics

@milkyklim / Collateral Vault | COL

LockedCollateral Vault | COL

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 dates as (
2    select distinct *
3    from (
4        select date_trunc('day', call_block_time) as time
5        from unit_protocol."Vault_call_depositCol"   
6        union all
7        select date_trunc('day', call_block_time) as time
8        from unit_protocol."Vault_call_withdrawCol"
9    ) d
10),
11t_deposit as (
12    select date_trunc('day', call_block_time) as time,
13           sum(amount) as amount
14    from unit_protocol."Vault_call_depositCol" s
15    group by date_trunc('day', call_block_time)
16           
17),
18deposit as (
19    select d.time,
20           coalesce(amount, 0) as amount
21    from dates d
22    left join t_deposit t on
23        d.time = t.time
24),
25t_withdraw as (...

Result visualizations

Locked (Daily)Collateral Vault | COL

Loading