Join the discussion in DAOBet Telegram groups:

Join our social media to keep up to date with all the announcements: Twitter, Facebook and LinkedIn.

Gambling reaches the largest volume of daily transactions on the blockchain after the exchanges, and show positive growth dynamics. That is why we are so dedicated to designing a unique solution to enhance the boost. Building a Gambling 3.0 solution, we must ensure that improvements and new features do not come at a cost of lower speed or security. Moreover, that the next-generation platform we are developing for casino operators and players performs better in many aspects compared to classical iGaming solutions.

In this article, we will explain which factors, or, more specifically, which faults of other blockchains, influenced our decision to develop our own solution. This leads to issues of blockchain finality(1) and a random number generation mechanism.

Why switch to the new blockchain?

The Distributed Applications (DApps) ecosystem is growing rapidly, especially with regards to gambling and gaming applications. Although there are a number of Blockchain platforms (such as Ethereum, EOS.io and TRON) that support smart-contracts execution via Turing-complete virtual machines, they still lack some important properties specifically needed for a gambling application:

Low latency

Fast finality

On-chain random number generation

We will discuss those properties in detail in the next chapters, but to briefly explain the major points, here is a quick comparison table:

In order to operate a scalable decentralized gambling application platform, an underlying blockchain should have the following properties:

Be based on the successful, mature blockchain project codebase

Virtual machine environment for on-chain smart contracts execution

Faster deterministic finality in good network conditions

finality in good network conditions Secure distributed RNG(2), built-into the blockchain

Custom governance rules, optimized for gambling applications

Latency and throughput

Latency is the time it takes for a transaction to reach the initial network confirmation. This usually corresponds with a single block production time and can be as high as 10 minutes for PoW (Proof-of-Work) systems such as Bitcoin, and as low as 1 second for PoS-based (Proof-of-Stake) systems (e.g. EOS.io).

Throughput is the number of transactions per second that a blockchain can proceed on and generally depends on block production time and block size combined.

These two metrics are very important for gambling and gaming applications because higher system latency leads to poor user experience.

Finality

Finality is the guarantee that past transactions will never be changed or reversed. Finality can be deterministic or probabilistic. However, many modern blockchains offer only probabilistic transaction finality - transactions that aren’t finalized instantly, or quickly enough, and upon confirmation, eventually become irreversible.

Theoretically, as far as PoW blockchains like Ethereum and Bitcoin are concerned, finality is at risk of never being reached, as more than one chain of blocks can exist simultaneously (forks). In other words, Bitcoin and Ethereum provide only probabilistic finality. This means that even after a number of confirmations, there is still (a mostly theoretical) possibility that a block can be discarded in favor of a longer chain.

Finality is a serious property for the iGaming business, as waiting for the transaction to be completed by the network for an hour or even 6 minutes (average times for finality of BTC and ETH chains respectively) is unacceptable in comparison to centralized classical gambling platforms, which offer higher transaction speeds. The whole finality issue makes decentralized gambling uncompetitive in comparison with online gambling. Different workarounds that do not require finality are not an option either, as there is a risk that a player can revert lost rounds and always win due to a security vulnerability.

On the other hand, some modern PoS blockchains provide deterministic finality by sequentially confirming blocks among the majority of verifier nodes. This usually requires some time due to the synchronous nature of the consensus algorithm being used. In the case of EOS.io, this will roughly take up to 180 seconds.

DAOBet Blockchain to provide the Deterministic Finality

To improve the finality properties, provided by EOS.io, we’ve chosen a straightforward approach from the POLKADOT project, called GRANDPA (GHOST-based Recursive Ancestor Deriving Prefix Agreement). This consensus algorithm provides faster finality at the cost of network messaging overhead and leverages the fact that finalization may be applied to multiple blocks at once. In order to make this algorithm work with EOS.io existing block producing scheme, we’ve enhanced it, with the resulting protocol now called RANDPA(3). If the network provides a necessary speed of cooperation between nodes, RANDPA can mark every block as final within 2-3 seconds. We will explore this more in upcoming articles.

Virtual Machine

In order to implement provably fair gaming logic within the decentralized system, the underlying blockchain should be able to execute not only ordinary transactions but also additional functions in the context of those transactions, traditionally called “smart contracts”. This ability is provided by a special module, incorporated into the blockchain node, called Virtual Machine, or VM. Ethereum (and some other blockchains) have their own VM implementation, specifically designed for this particular use. Others (e.g. EOS.io) deliberately decided to use WebAssembly - state of the art VM implementation, designed by a number of high-profile internet companies as a standard for safe and fast client-side code execution inside the browsers. WebAssembly is stable, mature and proven to be potentially much faster, than custom-built VMs. WebAssembly is broadly used by major browsers: Google Chrome, Mozilla Firefox, Safari, Microsoft Edge. It is also used by EOS.io, and Ethereum is planning to switch to WebAssembly for its VM implementation.

Built-in Random Number Generation

A lot of gambling applications depend on the random number generation. In centralized systems these applications are traditionally using either pseudo-random number generator (in best case scenario) seeded by some physical Entropia or certified hardware RNG devices. There is no system for players to see the actual random number selection process or check its fairness through some automated process.

On the other hand, decentralized gambling applications that are based on the blockchain should provide a transparent, provably fair randomness source for players and casinos. Unlike a centralized system, creating a truly unpredictable and non-manipulatable RNG on the blockchain may be a big technological challenge.

Existing RNG solutions and their weaknesses

Currently, gaming Apps are leveraging several ways to produce a random value:

Block hash. At first sight, this approach seems legitimate, because the hash is calculated on the transaction data of a block, which is collectively generated by network participants. However, the block content is potentially manipulatable by miners, so it cannot be relied upon for games with potentially large rewards. Oracles. In this case, using external sources of randomness inside the blockchain has the same drawbacks as with centralized systems. Commit-Reveal. This protocol is based on a simple 2-step scheme, where during the first (“Commit”) step participants submit a hash of some randomly chosen secret number, and during the “Reveal” step they disclose the actual number. The resulting random value is calculated based on the combination of all secret numbers, submitted during the previous steps. The main disadvantage of this protocol is that the last participant to reveal the secret will be able to know the resulting random value beforehand and this participant can refuse to reveal the secret value leading the protocol to termination without producing any outcome.

Game Channels: state channels with built-in PRNG

State channels, the well-known solution for blockchain scalability issues, are effectively simulating peer-to-peer communication session between parties, bypassing the blockchain, but preserving the necessary cryptographical proof of all the changes, happening inside the channel. This is generally done to quickly transfer assets between two parties and maintain balance changes on both sides. The Signidice Protocol, developed by DAOBet is supplementing this solution by built-in random number generation protocol, based on RSA cryptography. You can get more details in the whitepaper.

RNG based on BLS cryptography

There are some situations where the game outcome must be determined outside of the game session itself (for instance, in the case of jackpot payouts). This is why DAOBet committed itself to develop blockchain with a built-in random beacon, based on BLS, which gives game developers an independent source of provably fair randomness.

The BLS is a pairing-based signature scheme that offers a sufficient level of security. It has a strong academic backing and is based on research from Stanford University.

Within the BLS signature scheme block producers sign the same message and generate an aggregate signature that is a deterministic random number. This approach is fundamentally different from “Commit-Reveal” protocol, discussed above, because of the nature of the generated signature allows it to be created by only a portion of participants (so-called threshold cryptography). This effectively eliminates the possibility of one participant to sabotage the process of random number generation because it will require a number (up to a threshold) participants to do so.

Conclusion

We are building DAOBet Blockchain to ensure the solution of the most demanding challenges in the Gambling 3.0 industry. As discussed above, a successful blockchain for decentralized gambling applications should be based on a mature and stable codebase. That is why we decided to build it on top of one of the most successful open-source DApp platforms - EOS.io. By making this choice we get great transaction throughput and latency out of the box, WebAssembly based virtual machine and operational blockchain. We will present more about the solutions in the following articles. We will focus on random number generators, tokenomics(4), validation and more.

Glossary

Finality is a property of irreversibility of a transaction on the Blockchain. VRNG is the Verifiable Random Number Generator. It is a pseudo-random function that provides publicly verifiable proofs of its outputs' correctness. RANDPA is the Recursive Ancestor Deriving Prefix Agreement, consensus algorithm, derived from GRANDPA and adapted for EOS.io-like blockchains. Tokenomics is a self-funding mechanism for projects within the crypto economy.

Join the discussion in DAOBet Telegram groups:

Join our social media to keep up to date with all the announcements: Twitter, Facebook and LinkedIn.