Ethereum Insights with Elasticsearch and Kibana

Storing the Ethereum blockchain on Elasticsearch

Doody Parizada
Kin Blog
3 min readJan 29, 2018

--

Here at Kin Foundation, we’re developing tools for application so developers can easily interact with the blockchain based Kin ecosystem. Kin is a token currently implemented on the ERC20 standard on Ethereum blockchain.

Part of the abilities we’re trying to develop are tools to quickly and easily analyze the blockchain and get insights into the transactions. There are many blockchain explorers out there letting you look deeper into blocks, transactions and addresses, but we wanted to get an overview of the entire network.

Nitzan and I started fleshing out the idea. We used Kibana and Elasticsearch in the past and liked the flexibility they provide for running queries and the ease of creating visualizations and dashboards. We chose typescript to write the code that moves transactions from the blockchain to the datastore.

We wrote a node.js application (code available on github) that polls an Ethereum node and pushes entire blocks of transactions as they are created into Elasticsearch. For a quick setup of Kibana and Elasticsearch, we used a docker image that has both of them pre installed and ready to run.

To parse token transactions in addition to native ether transactions we used the open source web3-api-helper package to parse the input field of the transactions. We resolved contract addresses to their token name using myetherwallet’s tokens list.

What we ended up with was an entry for each transaction in its native currency’s value, to and from.

Even though this was a pet project, we were able to find and fix a few issues on web3.js.

Time to Analyze

All the images below are taken from Kibana and the data is a snapshot from January 13th 2018 (UTC).

transactions taken from block 4900043 to 4903155

Here are some questions we asked and graphs we produced to answer them:

What is the rate of mined transactions and blocks?

10 minute intervals on a log scale of block and transaction rates

What are the most transacted tokens?

a cloud view of the top transacted tokens

How much token value is transferred?

top transacted tokens by the total value transferred

Who spends the most ether?

a pie chart showing the addresses that transferred the most amount of ether

What portion of transactions are token based?

bar chart of number of transactions of Ether vs all other tokens*
in percentage view, it’s clear to see that tokens* are around 15% of total transactions

What is the gas limit price over time?

line chart shows 50, 75, 97 percentiles and a moving average of gas limit price

As Kibana dashboards are dynamic, we can click on the cloud of top tokens and select KIN to filter all other graphs and show only KIN transactions.

Block and transaction rates and gas price for KIN transactions

We’re sure there are many more interesting questions that this dataset can answer, can you think of some?

*tokens that we were able to parse according to our snapshot off myetherwallet’s supported tokens list.

--

--