Hey there, my fellow crypto enthusiast! Are you looking to take your trading game to the next level and gain a deeper understanding of the market trends and behavior? If so, then onchain analytics is the perfect tool for you.
Onchain analytics is like a crystal ball into the world of cryptocurrency, providing invaluable insights into user behavior and market trends. By studying the activity taking place on a blockchain, you can gain a deeper understanding of market dynamics and make more informed trading decisions.
It's all about digging deep into the data and finding out what's really going on. You see, the blockchain is like a big old public ledger which records every single transaction that goes down in the crypto world. And onchain analysis is all about studying that data to figure out who's doing what, when, and where.
Why does this matter? Well, for one thing, onchain analysis can help you spot trends and patterns in the crypto market. Maybe you notice that a certain wallet keeps buying up massive amounts of Bitcoin every time the price dips. That could be a sign that someone with deep pockets is bullish on BTC and is trying to accumulate as much as possible. Or maybe you observe a sudden surge in activity on a certain coin's blockchain. That could be a sign that something big is about to go down, like a major partnership or product launch.
But beyond the practical benefits, there's something truly thrilling about diving into the world of onchain analytics. You'll be exploring the underbelly of the cryptocurrency market, uncovering hidden patterns and trends that most people don't even know exist. This is much like being a detective, piecing together clues and unraveling mysteries to gain a deeper understanding of the market.
So, there you have it—onchain analysis in a nutshell. If you're into crypto, you need to know about this stuff. Now let me break the benefits of on-chain analytics down for you using the example of the most obvious indicators on Bitcoin. If you are familiar with the device of any blockchain at a top-level, you will be able to understand how to build the simplest on-chain indicators.
To construct an indicator, you need to explore the entire blockchain, starting from the genesis block, and analyze all transactions within each block in chronological order. This is the basic mechanics of on-chain analytics. It is important to analyze blocks and transactions sequentially. If you do so simultaneously or break the chronological order, it might turn out that a certain wallet spends coins without having a sufficient balance.
First up, we've got transaction volume. This indicator shows the total number of transactions taking place on the Bitcoin blockchain. When the transaction volume is high, it's a good sign that the Bitcoin ecosystem is active and healthy. You wouldn’t want to be investing in a dead coin, would you?
To calculate the transaction volume, you need to iterate through each block in the blockchain, examine each transaction inside the block, and extract the transaction value, which is the amount of bitcoins sent (or spent).
Next, we've got exchange inflows and outflows. This metric measures the amount of Bitcoin moving into and out of exchanges. High inflows might indicate that traders are getting ready to sell their BTC, while high outflows might suggest that traders are buying up BTC and hodling it.
Any transaction is someone's purchase and someone's sale.
In our analysis, we are particularly interested in the behavior of the largest wallets, those holding more than 10k bitcoins. Those wallets are called Whales. The term "whale" is often used to describe individuals holding a large amount of cryptocurrency, relative to the total supply of that particular asset. Hence whales have the power to influence the market with their buying or selling activity. We want to explore a whale's behavior. To accomplish this, we need to:
Determine the balances of all wallets in each block;
Select only those wallets with balances greater than 10k bitcoins;
Record a purchase if one of these wallets acquires additional bitcoins, or a sale if they dispose of any;
Sum up the inflows and outflows of all large wallets within each block to get a comprehensive view of the overall trends.
Now, let's talk about active addresses. This is where things get interesting. Active addresses measure the number of unique addresses that are actively sending or receiving Bitcoin. When the number of active addresses is high, it means that there's a strong user base and healthy adoption of Bitcoin. And that is exactly what you want to see if you're bullish on BTC.
Determining the number of new wallets in the system is a straightforward process. Simply iterate through all blocks and transactions, but this time focus on identifying wallets that are appearing for the first time. Increment a counter by +1 for every new wallet you encounter. If you come across a wallet that you've seen before, just skip it and move on to the next one.
Last but not least, there are UTXOs. UTXO stands for unspent transaction output. Basically, it's the total number of Bitcoin that hasn't been spent yet. By analyzing UTXOs, you can get insights into the amount of liquidity available and the behavior of Bitcoin hodlers. And that is valuable intel for any savvy crypto investor.
UTXOs are bitcoins that remain in a wallet after a transaction has been made. In essence, these are the transaction leftovers. To better understand UTXOs, consider this example: Alice has 5 bitcoins in her wallet and wants to send 1 bitcoin to Bob. To make the transaction, Alice tells Bob to take all 5 bitcoins, keep 1 for himself, and return the remaining 4 to her wallet. This may seem odd compared to traditional currency, where you typically only spend what you need, but in Bitcoin, the leftover coins become UTXOs. We can track UTXOs by examining the balances of wallets that have made transactions.
To build these indicators for the entire blockchain, we need to automate the process of extracting data from the blockchain and performing the necessary calculations.
Fetching data from blockchains such as Bitcoin or Ethereum can be a challenging task, especially if you're new to onchain analysis. Here are some of the difficulties you may encounter along the way:
Blockchain size: Both Bitcoin and Ethereum are constantly growing, which means that the size of the blockchain data is constantly increasing. This can make it challenging to store and analyze large amounts of data.
Lack of standardization: While there are many tools and resources available for fetching data from blockchain, there is no standardization across these tools. This can make it challenging to compare data across different platforms and sources.
Technical expertise: Fetching data from blockchain requires a certain level of technical expertise, especially if you're planning to build your own tools or applications. This can be a barrier to entry for those who are new to onchain analysis.
There are many tools and resources available that can help you fetch and analyze data from the Bitcoin and Ethereum blockchains. These include blockchain explorers, onchain analytics platforms, APIs, and even open-source libraries and tools that you can use to build your own applications.
If you're new to onchain analysis, I recommend starting with a user-friendly blockchain explorer or onchain analytics platform, such as Blockchair, Etherscan, or Coinmetrics. These platforms provide access to a wealth of blockchain data in a structured and organized format, making it easy for you to start exploring and analyzing the data.
In the next sections, I will break down one of the easiest ways to perform onchain analysis at home and teach you to build those 4 indicators listed above using Python.