Skip to content
Dune Analytics

@slash125 / staked WriteETH in rhegic2 contract

staked WriteETH in rhegic2 contract


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

2   WITH mint as (
3  SELECT DISTINCT(evt_tx_hash), evt_block_time as "date", value/10e17 as value from erc20."ERC20_evt_Transfer" p
4 WHERE contract_address = '\x878f15ffc8b894a1ba7647c7176e4c01f74e140b'
5 AND = '\x8fcaef0dbf40d36e5397ae1979c9075bf34c180e'
6  ORDER by evt_block_time ASC),
8  withdraw as (
9  SELECT DISTINCT(evt_tx_hash), evt_block_time as "date", -value/10e17 as value from erc20."ERC20_evt_Transfer" p
10 WHERE contract_address = '\x878f15ffc8b894a1ba7647c7176e4c01f74e140b'
11 AND p.from = '\x8fcaef0dbf40d36e5397ae1979c9075bf34c180e'
12  ORDER by evt_block_time ASC),
14  merge as (
15  SELECT * from mint
16  UNION 
17  SELECT * from withdraw
18  ORDER by "date" ASC)
20--  SELECT 
21 --  a."date",
22    --      a.value,
23   --       sum(b.value) AS cumul
24--   FROM merge AS a
25--   INNER JOIN merge AS b ON (a."date" >= b."date")...