Skip to content
Dune Analytics

@k06a / Curve sUSD Assets Proportions

Curve sUSD Assets Proportions

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

1SELECT
2    time,
3    SUM(dai) over (ORDER BY time) as dai,
4    SUM(usdc) over (ORDER BY time) as usdc,
5    SUM(usdt) over (ORDER BY time) as usdt,
6    SUM(susd) over (ORDER BY time) as susd
7FROM (
8    SELECT
9        DATE_TRUNC('day', evt_block_time) as time,
10        SUM(
11            (CASE WHEN contract_address = '\x6b175474e89094c44da98b954eedeac495271d0f' THEN value/1e18 ELSE 0 END) *
12            (CASE WHEN "to" = '\xA5407eAE9Ba41422680e2e00537571bcC53efBfD' THEN 1 ELSE -1 END)
13        ) as dai,
14        SUM(
15            (CASE WHEN contract_address = '\xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' THEN value/1e6 ELSE 0 END) *
16            (CASE WHEN "to" = '\xA5407eAE9Ba41422680e2e00537571bcC53efBfD' THEN 1 ELSE -1 END)
17        ) as usdc,
18        SUM(
19            (CASE WHEN contract_address = '\xdac17f958d2ee523a2206206994597c13d831ec7' THEN value/1e6 ELSE 0 END) *
20            (CASE WHEN "to" = '\xA5407eAE9Ba41422680e2e00537571bcC53efBfD' THEN 1 ELSE -1 END)
21        ) as usdt,
22        SUM(
23            (CASE WHEN contract_address IN ('\x57Ab1E02fEE23774580C119740129eAC7081e9D3', '\x57ab1ec28d129707052df4df418d58a2d46d5f51') THEN value/1e18 ELSE 0 END) *
24            (CASE WHEN "to" = '\xA5407eAE9Ba41422680e2e00537571bcC53efBfD' THEN 1 ELSE -1 END)
25        ) as susd...

SQL query results

Loading