DEV Community

Cover image for Data Analysis with Blockchain Data
Elias Elikem Ifeanyi Dzobo
Elias Elikem Ifeanyi Dzobo

Posted on

Data Analysis with Blockchain Data

Introduction

Doing onchain analysis has been quite popping up, especially in the DeFi space. We’ve seen tons of threads on how to make money by following “smart money” meaning basically copying the trades of whales and venture capitalists, the folks with the big money.

A huge aspect of the blockchain is its transparency meaning that every trade anyone takes is visible to the general public, at least on public blockchains that is, meaning that if you can find the wallets of the whales who “magically”😵👀 know when to buy and sell and copy their trades you can make money

The first step is to find a token that has had a massive increase in value in the last 7 days and CoinGecko provides us with that information. We can then find the date the token started pumping and get all the transactions before the date on the blockchain explorer. Find the token, get the token chain, get the token address and we’ve got work to do!

We found RocketX Exchange, ticket symbol RVF which went from $0.05 on April 4th to $0.15 currently, around a 200% increase in a week with token address 0xdc8af07a7861bedd104b8093ae3e9376fc8596d2

Data Collection

By searching the token address on the blockchain explorer we can find all the transactions of that token to ever occur. Etherscan makes it easy to filter transactions to take place of the buy and sell transactions and then you can download the resultant data as a CSV file. You can even filter out the data range before downloading.

Data Preprocessing

Load the data into a data frame using pandas and do some data preprocessing. Change the date time column to a date time object allowing us to choose rows between a specific timeframe.

Drop columns that add little value to the insights we are trying to get, in this case, the Timestamp in Unix and block number of the transaction.

For the token RVF we notice that April 5th was when the token started gaining momentum so we want to find buy transactions in huge volume before that date.

We can create a new dataframe for all the buy transactions using the pandas: data[data[‘action’] == ‘Buy’] and further look for only transactions over a specific amount, in this case, I chose buy orders over 1 ETH.

Results

After filtering out 36 valid buy transactions over 1eth, I discovered that there were 3 particular wallet addresses with over $100,000 in their portfolio that bought a huge amount of RVF tokens in the weeks leading up to April 4th. One wallet which had been dcaing into RVF that week sold a portion of their holding netting a profit of over $4500.

PS: Disclaimer

This is not an endorsement of the token RVF, just a way of applying data analytics to onchain data and drawing conclusions and results based on the data and insights shown.

Top comments (0)