NEAR Performance
This dashboard analyses the performance of the NEAR blockchain, and compares the metrics to other Layer 1 blockchains.
Introduction
NEAR is a blockchain that has been built from the ground up to be high-performant, incredibly secure, and infinitely scalable all while supporting sustainability. This dashboard analyses the speed and performance of the NEAR blockchain, and compares the metrics to other Layer 1 blockchains.
The bounty question asks for transactions per minute (TPM) and transactions failure rate. To provide more insight, this dashboard also includes block finalisation time (i.e. the time needed for a new block to be permanently addded to the chain).
Definition of performance metrics and their calculation
Average transactions per minute (TPM) – the average number of transactions in 1 minute
The average TPM is calculated as follows:
- Count the number of transactions in each block_timestamp minute from the
flipside_prod_db.mdao_near.transactions
schema. This includes both successful and failed transactions. - Calculate the average TPM as required (i.e. daily or overall)
Average successful transactions per minute (TPM) – the average number of successful transactions in 1 minute
The average successful TPM is calculated as follows:
- Count the number of successful (i.e.
substr(tx_receipt[0]:"outcome":"status",3,7) = 'Success'
) transactions in each block_timestamp minute from theflipside_prod_db.mdao_near.transactions
schema. - Calculate the average successful TPM as required (i.e. daily or overall).
Average transaction failure rate – the number of failed transactions divided by the number of transactions
The average transaction failure rate is calculated as follows:
- The transaction “success rate“ is calculated as the number of successful transactions divided by the total number of transactions sourced from the
flipside_prod_db.mdao_near.transactions
schema. - The failure rate is calculated as
1 - success rate
.
Average block finalisation time - the average time (in seconds) for a block to be created
The average block finalisation time is calculated as follows:
- Calculate the time difference between block creations in the
flipside_prod_db.mdao_near.blocks
schema. - Calculate the average block finalisation time as required (i.e. daily or overall).
Metrics for other L1 blockchains
The calculation is the same but data is sourced from the equivalent schemas as follows:
- Ethereum -
ethereum.core.fact_transactions
,ethereum.core.fact_blocks
- Avalanche -
avalanche.core.fact_transactions
,avalanche.core.fact_blocks
- Binance Chain -
bsc.core.fact_transactions
,bsc.core.fact_blocks
NEAR performance overview
- Between 1 September 2021 (earliest available data) and 18 July 2022 (date of analysis), NEAR had an average 337 transactions per minute (TPM). The average successful TPM was 292, and the average transaction failure rate was 13.3%. Blocks on NEAR are finalised and added to the chain every 1.184 seconds on average.
- TPM is unexpectedly low, most likely due to the fact that NEAR is not being used that much i.e. low usage. TPM is therefore not a reliable performance metric as it’s affected by usage and is not fully indicative of blockchain performance. The block finalisation time is relatively fast, indicative of a high-performant blockchain.
Comparison to other L1s’ performance
To put NEAR’s performance into perspective, we compare the metrics above to the same metrics of other Layer 1 blockchains over the same time period (where data is available). The other Layer 1 blockchains included are Ethereum, Avalanche, and BSC. Ethereum is the grandaddy of Layer 1 blockchains, and is included as a reference benchmark. Avalanche and BSC have made similar performance claims as NEAR. Solana has not been included due to timeout error in querying the data.
Findings:
- Ethereum had the highest TPM, other than the occasional TPM spikes on NEAR and Binance Chain. This is likely because Ethereum had more usage/transactions than the other chains.
- More interestingly from a performance perspective, Ethereum had a consistently low transaction failure rate, indicating that performance is stable even with high usage. NEAR, Avalanche, and Binance Chain’s failure rate fluctuates wildly over time, indicating performance issue when transactions/demands are high;
- However, Ethereum had the highest block finalisation time, while NEAR had the lowest block finalisation time; transactions take much longer to finalise on Ethereum than on NEAR.
Conclusion
- Transactions per minute (TPM) and transaction failure rate do not provide the whole picture in terms of blockchain performance. Ethereum, for example, had the highest TPM and lowest failure rate compared to NEAR and other L1 blockchains but it had the highest block finalisation time (i.e. takes the longest to finalise and add a block to the chain).
- NEAR’s TPM is lower than Ethereum, most likely because it had less usage compared to Ethereum. Its low TPM is not indicative of performance issue.
- NEAR’s wildly fluctuating transaction failure rate is indicative of performance issue. If failure rate spikes when transactions/demand are high, NEAR may not be as “highly-performant” as advertised.
- NEAR’s low block finalisation time was the lowest among the other L1 blockchains, indicating consensus is reached speedily among validators. However, NEAR’s block finalisation time had been trending upwards in tandem with increased transactions, suggesting that a higher number of transactions may slow down consensus.
NEAR performance daily trend
TPM, transaction success rate, and block finalisation time fluctuates over time with usage and other factors. Looking at the overall average metrics provides only a high-level trend analysis. The following analysis considers the daily average metrics to spot patterns and emerging trends.
Findings:
- TPM was on an upward trend until May 2022 when it started to decreased and plateaued. This is likely because of decreased usage/transactions on NEAR due to Crypto Winter, rather than an indication of blockchain speed/performance degradation.
- There is indication that blockchain performance suffers during periods of high volatility/usage; transaction failure rate spiked to c. 55% on May 10 at the onset of crypto market volatility.
- Block finalisation time had increased (i.e. slower block finalisation) in tandem with transactions per minute, indicating that NEAR’s block finalisation time may suffer with increased demand/transactions.