Lucky Number 7

One of the most popular attractions in Decentraland today are the casinos. These estates receive a large amount of the total player traffic in game, and are often the locations of popular events. These events often have cash or crypto giveaways, NFTs are traded and introduced, and live performances – the draw is often the games. These casino games – roulette, blackjack, slots and backgammon – allow users to play with “Free Play” or with crypto to win real money. What’s more, these games operate without a central counterparty adding to the decentralized experience of a game like Decentraland roulette. 

But are these games fair? Theres’ been an increased number of users expressing concern that the games may not have odds that are reflective of being fair: 

“Are casinos and slot machines in the decentraland virtual world regulated ? I am curious about this because it can pose problems later done the road if it is not the case. The creators should talk about this. Many US casinos are regulated and even some online ones too. The SEC and CFTC” – u/mojindu464

Reddit

We at Decentralandalytics thought this concern to be a bit odd – surely if you had concerns about the odds being set up fairly, you could just look at the blockchain to understand the code being run and see for yourself. We decided to try and answer this question, starting with Roulette, and provide an answer to the question of fairness once and for all.  

How to Find the Data 

Once we embarked down the path of looking for the Roulette game data, we realized why it may not be so easy for your average user to validate the games by themselves. The first step to observing results is accessing a Polygon Node. 

Polygon (formerly the Matic Network) is its own blockchain that settles periodically back to the Ethereum blockchain – think of it like a sort of second-layer network to avoid the pesky problem of huge gas fees when committing large amounts of data to a blockchain. Polygon is not so easy to set up;  the instructions on the website assume a high level of technical competency (advice to Polygon devs: learn Docker).  

Decentral Games architecture

As we are impatient folks, we wanted quick access to a Polygon node. The original Matic website led us to QuikNode, a private service that provides access beyond the data caps that exist on publicly available Matic/Polygon block explorers. QuikNode offers a 7-day free trial to a Polygon/Matic Node which was more than sufficient for us to pull all of the data off the blockchain that we needed to perform the “audit” – every single roulette game that’s ever been played in Decentraland.  

Polygon calls over time used to prepare this dataset
Polygon calls by type used to create this dataset

This work forced us to learn how the Polygon/Matic blockchain worked. It seems to be very similar to Ethereum: blocks occur every 2-5 seconds and gas appears to be comparatively inexpensive. The miner model does not rely on proof of work but a hybrid of validators and stakers. It’s a bit hard to understand how large the validation network is and therefore how secure the network is. Our exploration taught us that every block was “mined” by the same address of 0s as DG is minted and distributed when games are played.

In order to track down all of Roulette data, we had to trace back all of the previous contract deployments to assemble the total history. As the roulette contract uses an OpenZeppelin proxy update contract and simply supports functions and doesn’t store token history, the way it gets updated is to deploy the contract on a new address and forwards all requests from previous addresses to the new one. So finding the whole history of the game required chasing down each of these contracts. 

Given our experience with Polygon, we will likely be deploying our own Polygon node for the community. This will allow us to more quickly conduct future audits on similar gaming contracts, as well as provide staking services for interested users. Stay tuned for updates. 

The Results

There were a total of 389,851 total paid games of roulette played in Decentraland. The time frame of this analysis was November 3rd, 2020 to May 3rd, 2021 – exactly 180 days at the time of publishing this audit.

Results of our analysis

Our findings show that the game is fair. We observed the total number of games per outcome/winning number and the mean number of games won (out of the 389,851) per outcome was 10,537, or 2.7%. This is quite close to the expected value of 2.7027% (1/37 representing the 36 numbers and 0 as 00 is not present in Decentraland roulette). This coincides with Decentral Games’ official statement about the odds:

            “The wheel has 37 total outcomes, 0 through 36 featuring only a single zero. For each type of bet, the corresponding payout is based on its respective odds: A player may place any combinations of these bets to hedge their odds as they wish. The house edge is 1/37 or 2.70% on all bets minus the blockchain gas fees paid by the house.”

Decentral Games website
Observed winning games per roulette number for all observed games
Standard Deviation of winning games (st dev = .027%)

The standard deviation of game numbers was 106 – no game result/number had more than three standard deviations from the mean – lucky number 7 had the most number of wins with10,843 wins or 306 wins more than expected. The standard deviation of the win probability was .027%, with lucky number 7 winning 2.781% of all games – a not-quite 3-sigma result (three standard deviations from the 2.7% mean) which is still close to the expected 2.7%. We would expect this deviation to close as additional games are played and a larger set can be used to observe results.

So our 2.7% mean observation agrees with the above expected value and the stated objectives of the team. This means that betting in Decentraland – at least for Roulette hosted by Decentral Games – is fair. While we won’t comment about the security of the funds and the reliability of the network, if all the code is functioning as designed then your odds of winning (at roulette, at the time of writing this blog) are what you would expect.

The Players

A total of 1,161 unique players have bet using real money in Decentraland. The biggest player – by far –  was user streamcrypto who has played a total of 137,421 or more than 35% of the total 389,851 games. If this is accurate and this user is not just one of the devs of Decentraland or DCGames doing testing, this would imply 763 games per day or 31 games per hour. To add to the mystery, this user was the 731st user to sign up for Decentraland – 13 days before the game even publicly launched.

It’s hard to tell which currencies players used to bet as everything is converted to DG prior to being submitted to the Polygon blockchain. We believe games where users are using FREE Play may be using a Polygon test net, but we have not confirmed this hypothesis yet. This analysis is based on game result events and not transactions to the roulette contract relating to the placeBets() method. There is significant additional information available in this method including the currency (DAI, Mana, DG, ETH, Atari) used to place the bet, wearables bonus, and bet amounts. Our free QuikNode trial did not allow us to perform this heavy of a query but we do plan on pursuing this data in the future once we have our own Polygon node.

Follow us for more event reporting, property analytics, and gaming audits here at Decentralandalytics.com!

Notes:

Please do not misconstrue this blog post as gambling advice or encouragement. Should you need help with a gambling addiction please reach out to the National Gambling Help Hotline

NFTs shown in cover photo: Hashmasks #16197, Hashmasks #16198. Sign up for Openseas to check them out!