In the Shelley era, the number of transactions per second (TPS) processed are less than the maximum possible for Cardano, according to the protocol configuration, in its current version Ouroboros Praos.
Today, the demand on the network is less than the amount of transactions (tx) that Cardano can support.
The peak demand for the blockchain in the Shelley era, was in epoch 266, with a total of 21,404 blocks, validating 317,020 transactions, thus averaging 15 tx per block.
Being that a block is forged every 20 seconds, it gives an average of 0.74 TPS, i.e. less than 1 transaction per second.
In the last 10 epochs, this detail was recorded in the general ledger:
Own elaboration matrix: source Epochs | Cardano Explorer
However, if we go deeper into the analysis, we will see that there are blocks with a greater number of verified transactions, which exceed the average per epoch of the activity shown in the table.
For example, I cite these 3 blocks, from epoch 272, which exceed 30 tx, each one:
- Block 5872353, Epoch 272, slot 417236 with 32 tx,
- Block 5872047, Epoch 272, slot 411226 with 37 tx, and
- Block 5872338, Epoch 272, slot 416903 with 38 tx.
So, in these cases, the processing is between 1.6 and 1.9 TPS.
Simple transactions, with low amount of UTxO, usually have a weight between 0.03 and 0.10Kb. The weight increases with increasing UTxO, or also with added metadata, or with NFT.
In the UTxO model a transaction has inputs and outputs, where inputs to a wallet are unspent outputs from previous transactions. As soon as an output from one wallet is used as an input to another in a transaction, it is spent and can never be used again.
I will give random examples, from ledger records, of different types of transactions with their weight, and you will see how the weight increases:
- 0.03Kb, simple tx
- 0,07Kb, simple tx
- 0,04Kb, simpl etx
- 0,14Kb, with many UTxOs
- 0,15Kb, with many UTxOs
- 0,64Kb, with NFT
- 1,32Kb, with NFT
The protocol has maximum parameters per block, it admits up to 65,536 bytes per block, or 64 Kb (1024 bytes = Kb), that is to say that no more tx can be validated than this total weight in each one. Each tx cannot weigh more than 16,384 (16 Kb). The header of each block has a maximum of 1,100 bytes (1.07 Kb).
Block parameter information:
If we take only the simple operations, the least heavy, with a size of 0.03 Kb, a maximum possible of 2,133 tx in a block would be validated, (2,133 tx x 0.03 Kb = 64Kb) due to the maximum limitation of 64 Kb per block, according to the parameter in the protocol.
Thus, empirically, from the data collected on the network, it can be calculated that in the Shelley era, dividing the 2,133 tx in a block by its 20 seconds, results in a maximum validation of 106 transactions per second.
To confirm my analysis, looking for information, of which there is not much available with explicit calculations, I found an official IOHK video from September 2020, from the Technical Head of Architecture Duncan Coutts, and Neil Davies, in which they explain the processing speed (from the 13 minutes in the video), they show the following chart, where the maximum limit is 43.7 TPS (refined):
Then, coinciding with my analysis, a response from Pal Dorogi (user @_ilap), on the Cardano Forum, on March 17 this year, which I transcribe:
Currently, Cardano can handle max ~270 average-sized txes per 64KB block, meaning 15txs per second, which can be scaled up to ~270 tps, but that’s very unrealistic. I would say 60 tps for average sized txes are realistic even 120. But, only assuming average sized txes (no smart contracts, not metadata, no huge token bundles etc.).
The processing speed of any blockchain has a conditioning factor, the block size, and in Cardano it is 64 Kb every 20 seconds, when a new slot leader is chosen to forge a new block. If we compare it to Bitcoin, which validates 1Mb (block size), every 10 minutes on average, Cardano has twice the processing capacity, with almost 2 Mb (1,920 Kb), every 10 minutes, (64 Kb every 20 seconds x 3 x 10).
With the Alonzo hard fork, Goguen will be operational to program smart contracts, which will imply higher tx demand, and higher average weight for each operation, so it will be necessary to increase the validation capacity, that is, to increase the transactions per second, in order for Cardano to be competitive in the DeFi ecosystem.
Hydra will be the expected solution.