When LiteBringer starts on Mainnet the number of transactions will drastically increase. But can the Litecoin network withstand the pressure?
When using technology for something it was not intended for, you have to make sure that it fits the needs. Especially, when it is a public good it is a duty not to damage anything others are using, too. So, one of the first things we evaluated when planning our game was if the blockchain can handle the load of our game transactions.
How many transactions a blockchain can handle within a specific time is determined by the block size. On the Litecoin network, every 2.5 minutes a block is created. Until 2017 Litecoin had a block limit of 1MB. Segregated Witness (SegWit), a tool originally created for the Bitcoin network to deal with DoS attacks, increased this massively. Starting with block 1.201.536 all the later ones can now store data of up to 4MB.
A single transaction can take up to 80 bytes and some of LiteBringer’s game transactions may fill this space.
The biggest transaction in LiteBringer is the disassemble item operation and that is only because we try to fit as many items into it as possible. Using a separate transaction for every single item would also be possible but we want to save our players incurring some transaction fees by combining them into one big transaction. By the way, this is the very reason why you can only disassemble 36 items at a time. The other major operation is the sell-out. With the trade offer, we have to encode the signature and make it public.
In other words, about 50.000 of these operations would fit into a single block. Up to now, there are only on average 50 transactions per block. It would need about 49.950 players constantly destroying items or creating sell offers every 2.5 minutes to use the block size to its limit.
Anyway, most transactions are much smaller! For example, a ‘send on quest’ operation can take up to 50 bytes. In order for it to take that much you would have to change all of your equipped gear, upgrade your skills and evolve the character to reach those 50 bytes! If nothing is changed and the character is just sent on a quest the operation only takes up 12 bytes of the available space.
This is only 1/8 of the maximum size of a transaction! Consequently, it would take 400.000 players sending a character on a quest within a single block to use the space to its limit. If you include the fact that nearly all missions take 2 or more blocks to complete, the potential number of players would multiply and easily reach several million active users per day.
Long story short: There is a theoretical limit of transactions the Litecoin blockchain can handle, but LiteBringer would need more than 100 times as many players as the whole blockchain gaming community combined!