Prompt

Visualize transaction fees on Polygon since July 1, 2022.

Compare these to fees on Ethereum over the same time period.

  • Are they correlated?
  • Do they diverge significantly at any points?
  • Provide analysis as to why you think this might be.

Introduction

To begin the analysis, it is first important to review the background on Ethereum and Polygon. Ethereum is a proof-of-work Layer 1 blockchain which facilitates transactions through a decentralized network of over 120,000 miners. Polygon POS chain is a scaling solution to the Ethereum ecosystem which uses proof-of-stake consensus through a network of 100 validators.

Since Polygon is intrinsicly tied to the Ethereum ecosystem, it is reasonable to assume the network activity is correlated. However, it's worth exploring the degree of correlation and which factors are most and least signifigant.

The primary data that will be analyzed for the two network is as follows:




Transaction Volume

To begin, let's first start by examining the number of transactions per hour after July 1st 2022 for Polygon POS chain and Ethereum respectively.

In the plots above, there are three key takeaways.

1) Prior to July 7th, the number of transactions appear follow a similar trend.

2) There are a couple of major divergences where the number of transactions on Polygon drop dramatically. Specifically, July 6th 04:00 and 07:00 volume drops by over 50% in one hour.


Now, to gain a more quantitative perspective on the correlation volume linear regression can be applied to fit a line between the two data sets. A positive slope indicates positive correlation, negative slope indicates negative correlation, and a horizontal line indicates no correlation.

The figure above plots the number of transactions per hour for each network against each other. Since the slope of the line of best fit is near zero, it is reasonable to conclude that the hourly transaction volume during the provided time range is not correlated. Additionally, the Pearson Correlation Coefficient between the two data sets is -0.0093 further supporting the conclusion.

Reasons for this behavior can be any of the following:




Transaction Failures

Out of curiousity, I also wanted to explore the relationship between failed transactions. Specifically, which network experiences higher failure rates.

To start, the plot below is generated to better visualize the percentage of failed transactions per hour.

From the visual above, it can be observed that Polygon has more frequent and higher periods of failed transactions as compared to Ethereum. Polygon averaged 5.2% failures, compared to Ethereums 4.0%




Transaction Fees

First, let's compare the common times when network fees occur. The following transaction data represents the total transaction fees (denominated in USD) per hour.

From the above heatmap, the most noticable difference is that Ethereum has more concetrated transaction volume around 14:00 and 20:00 compared to Polygon. Besides the one outlier on July 1st at 00:00, the peak transaction fees on Polygon occur during a similar timeframe.

Now we'll inspect the data from a time series perspective.

From the plot above there are several observations:

  1. Ethereum transaction fees hint at a cyclical pattern possibly following daily seasonality trends, while the pattern is less pronounced for Polygon
  2. When transaction fees spike on Polygon, fees are generally high on Ethereum as well
  3. Ethereum generates on average 100x more fees compared to Polygon, however, the average profit per validator/miner is 10x more on Polygon vs Ethereum. Note, this does not account for tips given to miners. A more detailed analysis is needed to cover such cases.

The graphical analysis above is helpful but doesn't provide any concrete conclusions on whether the transaction fees are correlated, it is critical to gain statistical evidence to reach such a conculsion. Therefore, we'll apply similar methodology as the transaction fee analysis.

Notice, that as compared to the transaction volume regression line, there is some positive correlation. The Pearson correlation coefficient is 0.26 which shows that weak correlation between transaction fees in the provided timeframe.

User Analysis

Now that we've explored the relationship between transactions on Ethereum and Polygon, it is important to also consider who is executing the transactions.

The following analysis will be divided as follows:

New vs Existing Users

A new user is defined as an address who submits their first transaction within an hour. Any subsequent transactions within the same hour are ignored to prevent double counting. Existing users are users who have submitted more than one transaction.

The number of active users per day and new users can be viewed below.

From the results above, we see that Polygon sees more users per day on a percentage basis compared to Ethereum. Both networks have around 20,000 active addresses per hour.

User Groups

Users are placed into the following groups for analysis.


There are some interesting findings in the visuals above. First, it's obvious that wallets conducting more than 50 transactions per day (51+ GROUP, colored pink) contribute to 80% of fees generated per day, while only accounting for ~2% of the daily active users.

Another insight is majority of the users only send 1 or 2 transactions per day, however, they account for ~2.5% of transaction fees.

It seems likely that majority of the network fees come from bots bidding against one another for block space thus paying for most of the network fees.

The Ethereum data looks much more homogenous compared to Polygon. Around 80% of users conduct only 1 or 2 transactions per day which accounts for ~20% of network fees.

That being said, bots / whales still pay their fair share. In fact the user group with most transactions (51+) is less than 0.3% of active addresses but accounts for ~25% of network fees.

Conclusions

References