Terra - Failed Transactions
On March 18, Alpha Defi on twitter post this stat.
In this dashboard, we will use the transaction data to try and find out why this is the case.
Let us first look at the transaction data over the past year.
Over the past 365 days, Terra has seen a boom in price. While this is mostly speculation, organic growth can be seen in transaction volume. With increase in transaction volume, we can see that failed transactions have also been rising. This is obvious in the 7day moving average. This means, the percent of Failed transactions gotta remain constant and ranging. However, we are seeing an increase in failed transactions.
Let us see what kind of transactions are suffering failure, as we check which module is evoked.
Since there are a variety of modules, I have only selected the type with the most failed transactions on a given day.
- Before June, Oracle module was the type of transactions that had the most fails.
- However currently its the WASM module or the smart contract module on Terra that emits the most failed transactions.
There are can be two reason for failure, that can be easily identified from Blockchain data:
- Insufficient Gas
- Internal Contract call to cancel transaction.
Insufficient gas occurs when the transaction runs out of gas to execute. This is because, smartcontract calls on Terra simulate the gas require to execute before determining the amount of Gas units required. Since Gas is never refunded, this calculation is designed to be optimum, minimizing Gas sent. However, if the simulation underestimates the gas cost, this will lead to failure of transaction.
Internal Contract calls to cancel transaction occur when the contract emits an error. Since transactions on Terra are atomic, this means the entire transaction cancels and the state rolls back.
Let us first check the insufficient gas transactions.
- These type of transaction fails have dipped extremely over the past few months.
- During Jan there was a spike, other than that, sub 0.1% failure rate due to gas errors is normal
- This means, lack of gas is not a reason for increase in transaction failure.
The 2nd option is likely due to the rise of numerous smart contract bots trying to take advantage of arbitrage opportunities. For this, we will first find out the top 1000 wallets that have lost the most transactions. We will check if these are possible arbing wallets, by checking their failed transactions ratio and by calculating their transaction frequency.
From the plot above for these 100 wallets, we can see
- Most wallets seem to hover abov 50% failed transaction threshhold.
- This means, these are specifically arbing wallets
Let us check when where these wallets first created, dating their first transactions.
Majority of these wallets have popped up after September, which saw the explosion of new protocols into Terra, starting with the likes of Spectrum and Apollo. Newer tokens meant, more pools increasing possible arbitrage opportunities.
Checking the average daily transaction volume, alteast 25% of these wallets in consideration have 100+ transaction daily. This is akin to bot activity.
With most of the wallets popping around and after September, we can confirm to a certain extent, that Bots are the main reason for these increase in failed transactions.