Battle speedups! ⚔️ 🔥 🚀

Asbjorn Enge
ChainBorn
Published in
2 min readJun 4, 2023

Battles on ChainBorn are now a lot faster!!

A quite annoying thing with blockchain / web3 games, is that you typically have to wait for transactions to be verified before actions are reflected in the user interface.

Many games move to L2 for this reason. And we are indeed planning to move to a Tezos rollup at some point. We are however not quite there yet, and we wanted to see what improvements we could do now.

In the first version of ChainBorn everything happened on-chain. When you took a turn, you did a on-chain transaction and we used a randomizer scheme to generate a “random” number (for the damage) on-chain. This scheme was quite complicated and it was possible to front-run transactions and thereby beat the system.

In the next version we moved randomization to the server. Users now signed a transaction to prove they wanted to take their turn and sent this to our servers. The “damage” was then generated off-chain and the turn committed to chain by our servers. This fixed the damage randomization problem, but battles were still painfully slow since each transaction had to be verified on-chain and indexed before being reflected in the user interface.

In the current version, just released a few days ago, we are taking this one step further. Now we are handling all the turns back and forth off-chain, and only committing the result on-chain. Since the randomization was already happening off-chain we do not see this as a huge leap in terms of trust (you already have to trust we do the randomization correctly) but it speeds up battle dramatically and creates a whole new battle experience!

😬 ⚔️ 🔥 🚀

We are very excited about this release and hope you will be too!

Let us know what you think on Discord ❤️
https://discord.gg/mC3cKsAFws

Enjoy!

--

--