Skip to content
Dune Analytics

@amcassetti / renBCH Snapshot

renBCH Weekly ChangerenBCH Snapshot


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


SQL query

1WITH renSUP AS (SELECT week, SUM(transfer) over (order by week) as renbtc_supply, transfer
2            FROM ( SELECT date_trunc('week', evt_block_time) as week,
3            sum(value/1e8) as transfer
4            FROM erc20."ERC20_evt_Transfer"
5            WHERE contract_address = '\x459086f2376525bdceba5bdda135e4e9d3fef5bf' -- renBTC token contract address
6            AND "from" = '\x0000000000000000000000000000000000000000'
7            GROUP BY 1
8        UNION
9            SELECT
10            date_trunc('week', evt_block_time) as week,
11            sum(-value/1e8) as transfer
12            FROM erc20."ERC20_evt_Transfer"
13            WHERE contract_address = '\x459086f2376525bdceba5bdda135e4e9d3fef5bf' -- renBTC token contract address
14            AND "to" = '\x0000000000000000000000000000000000000000'
15            GROUP BY 1) as net), 
16   TTL AS (SELECT renSUP.week AS week,
17            renSUP.renbtc_supply AS renbtc_supply,
18            renSUP.transfer AS transfer
19            FROM renSUP)
20SELECT TTL.week,
21        (TTL.renbtc_supply) as btc_on_ethereum,
22        (TTL.renbtc_supply) * pb.price AS USD_value_of_btc_on_ethereum,
23        TTL.transfer AS transfer,
24        ABS(TTL.transfer) * pb.price AS transfer_value

Result visualizations

renBCH USD ValuerenBCH Snapshot