Development of a blockchain protocol for the betting industry

New AXIOMA project: PROOF OF TOSS — blockchain-protocol for betting industry.

Our CTO, Eugene Pavlenko, explained the project architecture and technical solutions in his interview for The Merkle.

Could you briefly explain the PROOF OF TOSS software architecture and what principles it’s built on?While thinking over the software architecture, we concentrated on two main points: storing of information in smart contracts and fast data retrieval. In final implementation, there are three main components: smart contracts, website, and Elasticsearch which is used for indexing data and allows fast searching by different criteria.

In fact, there is no backend in the system, and this is an important feature. Thanks to that, the frontend interacts with smart contracts directly, without intermediary of server.

How and what for do you use smart contracts?

Events and wagers in the system are created with the help of smart contracts. Also, smart contracts are used for storing events, bets for every wager, collaterals, judging and event deposits.

In fact, all business logic is allocated inside the smart contracts. The website is just an interface, which calls smart contracts and outputs data. Thanks to that and blockchain technology, the system gains features important for betting, such as decentralization, transparency, possibility for instant payouts, challenge resolutions.

In the project, you use RSK smart contract platform. It seems that this is something new. What is this platform and why have you chosen it?

RSK smart contract platform is a sidechain of Bitcoin, it scales to 100 transactions per second, and declared to be increased to 2000 transaction per second. The Ethereum virtual machine is embedded inside RSK, which allows the execution of smart contracts written on Solidity.

RSK MainNet is now in closed testing; there are no projects on production now. So PROOF OF TOSS will be among the early adopters of this technology. Today, Bitcoin’s blockchain is the most stable and safe, and this is one of the main advantages of RSK. Another one is the utilization of unique scaling technology, which allows exceeding Ethereum performance.

Among the platform functionality, there is a selection of the event for judging. How is it implemented?

For this purpose, we have developed an on-chain random number generator which is resistant to fraud and miners’ manipulations. It chooses a random event for a judge. There can be an infinite amount of events in the pool, but even in such case, our algorithm can pick a random event that fits a particular judge for a fixed gas amount.

One more potential problem is that miners can manipulate with block time and other data. To be protected from such manipulations, the solution for random number generator has to be nontrivial. Miners see the result of the transaction in the new block, if they are not satisfied with it, they can skip sending the block and keep selecting a better result. That’s why the random number generator should be implemented in a way when a miner is able to see the block only after sending it.

It’s known that betting and gambling attract fraud. How will the PROOF OF TOSS system be protected from it?

We’ve developed a system of deposits which makes fraudulent activity risky and unprofitable. If a user, for example, tries to create an event, bet on it and then judge it, vote for the unfair result and get the prize, it would be extremely unprofitable: for any of these actions a user has to make a deposit which is in a sense insurance from fraud.

We’ve also invented protection from miners’ manipulations with precise time. Voting and all the event conditions are connected with real-time: 10 minutes before the start of the event all bets should be made. But the time on the blockchain may vary from the real time, and it may create a bug when one is able to keep making bets after the event has started. Our algorithm will protect from this possibility.

The interview: https://themerkle.com/proof-of-toss-architecture/
Project website PROOF OF TOSS: https://toss.pro/

Further reading
Back to All Articles