Flow: When Do Transactions Fail?
Q2. Do times of high transaction volume lead to more transaction failures? Create a visualization that shows the relationship between transaction volume and success rate of transactions since May 9th. Are there any noticeable patterns to when transactions are more likely to fail? Were there specific events that seem to cause transaction failures?
Introduction
What is Flow?
Flow is a fast, decentralized, and developer-friendly blockchain, designed as the foundation for a new generation of games, apps, and the digital assets that power them. Flow is the only layer-one blockchain originally created by a team that has consistently delivered great consumer blockchain experiences: CryptoKitties, Dapper Wallet, NBA Top Shot.
In this dashboard we are going to dive deep into the Failed Transactions on Flow and why they happen.
Methodology
⏰ Timeframe: Since start May 9th in 2022.
📒 Tables and Schemas: We use Flow_CORE schema and Transactions table for the data.
Figures:
- All Count vs Fail Count vs Success Count Daily
- Fail Rate vs. Success Rate Daily
- All Count vs Fail Count vs Success Count Hourly
- Fail Rate vs. Success Rate Hourly
- Transactions count vs success rate
- Failed Transactions by Hour of day
- Fail Rate by Gas Limit vs Transaction count
- Failed transactions by event type
- Failed Transactions by Error code
- Some of the Error Messages
- Bots and their identification time
- Bots fails share of all fails
Chart Info[Daily]:
- Blue Line: Total Number of Transactions Daily
- Green Bar: Number of Successful Transactions
- Red Bar: Number of Fail Transactions
Insights:
- The daily number of transactions averages at about 500k daily with a high of 831k on May 27th and a low of 171k on May 19th
- The High number of Transactions on May 13th caused Many Failed Transactions
- Since May 25th the Number of Failed Transactions has been increasing as the Number of Total transactions are increased too.
Insights:
- Since May 9th the Successful transactions have always been more than Failed transactions that is until May 26th when it started getting reversed and Failed Transactions have been more than Successful ones.
- This Could mean that The current status of the network is a bit unstable as more transactions are failing rather than succeeding.
Insights:
- The hourly number of transactions averages at about 20k daily with a high of 105k on May 16th and a low of 3k on May 19th
- Recently The Number of failed Transactions have increased significantly
Insights:
- The Network almost experienced a 50% Fail rate on May 13th.
- Since May 25th the number of Failed Transactions is growing rapidly.
Chart Info[Hourly]:
- Blue Bar [Right scale]: Total Number of Transactions Daily
- Green Line [Left scale]: Transactions success rate
Success Rate = ( Number of Successful Transactions / Number of all Transactions ) * 100
Insights:
- The biggest spike in transactions count was on May 16th BUT it didn't produce high number of fails
- Starting May 24th there appears to have started an event that causes the network to become unstable and cause a lot of failed transactions. ever since that day the network has been producing more and more failed transactions.
- Overall there doesn't seem to be much relation between the number of transactions and failed transactions count. since on many occasions, a High number of transactions have not produced a high number of fails
Chart info[By Hour-Of-Day]:
The chart above shows the number of failed Transactions by the hour of the day.
Insights:
This seems to vary in a range of 80k to 110k With the highest average being in the afternoon.
Overall there doesn't seem to be a spike in the number of failed transactions based on the hour of the day.
Chart info[By Gas-Limit]:
- X-Axis: Gas limit used in transactions
- Red Bar [Left Scale]: Fail Rate of Transactions that used that gas limit
- Blue Line [Right Scale]: Number of Transactions that used that gas limit
Insights:
- 100 Gas limit has the highest number of transactions and less than 5% fail rate
- 2000-3000 Have a pretty high Fail rate but very few transactions so we will ignore them.
- 9999 Has about a 35% fail rate and a high enough number of transactions that become concerning. It appears that most failed transactions have 9999 as their Gas Limit.
Chart info:
We used the events table instead of transactions for this chart to show what event type each failed transaction is using and what their share is.
Insights:
it appears that it's only 3 types:
- TokenDeposited
- FeesDeducted
- TokensWithdrawn
What's more interesting is that they all have the exact same number of failed transactions.
I checked further into this issue and it appears that all failed transactions produce these 3 events!
Chart info:
Each transaction that fails has an error code in their JSON info which presents which error code they have.
In this chart, we show the share of each error code in all failed transactions.
Insights:
It appears that Error Code 1101 Has the most number of Fails by a large margin.
Some Example Message for this Error Code is :
As you can see They are using multiple messages for the same error code so it's not really the most reliable source for our conclusions
VII) Analyzing bots' behavior in the flow network
As we know, bots are an undeniable part of every network. especially in cryptocurrency networks.
One thing we can do is identify these bots and terminate them. or analyze their behavior and prevent future incidents.
For this purpose, we define bots as :
Bots: Every address that has sent more than 30 transactions in less than 1 minute ever since start of 2022 is considered a bot
Chart Info:
Above we have The address of the proposers and the first timestamp of when they were Identified as a bot.
In total, we identified 14 bots.
Chart Info[Hourly]:
- Red Bars: Percent of failed Transactions that belong to bots
- Blue Bars: Percent of failed Transactions that belong to non-bots
Insights:
- It is pretty clear that bots are responsible for the majority of failed transactions, especially in the past few days and hours.
- In the past few days, 14 addresses are responsible for more than 98% of all failed transactions!
- It appears that the bots' failed transactions is not slowing down from the chart.
Conclusion and summary
- High Volume of transactions is not related to the number of failed transactions in that time period
- Rate of failed transactions has increased in the past few days
- Most Failed Transactions have a Gas-Limit of 9999.
- Each failed transaction produces the same 3 event types.
- Error Code 1101 is the most common Error in Failed Transactions.
- In the past few days 14 bots are responsible for more than 98% of all failed transactions.