Is Magic Dice Provably Fair?

in #utopian-io5 years ago (edited)

Repository

Introduction

I was curious how fair Magic Dice really is. They claim to be provably fair and have a script to check an individual bet. I wanted to check real-world results across thousands of bets.

Process

  • Choose Sample Set
  • Collect Data
  • Parse Data
  • Calculate Results

Choose Sample Set

While I could parse every type of bet, I chose to focus only on 50/50 bets (technically 49%). This makes data collection and parsing very simple and would give me a very good answer if Magic Dice is truly fair.

Collect Data

I wrote a script (see above gist) that goes through the entire account history for magicdice and creates a python generator that can be later iterated through.

Parse Data

Parsing data required two steps.

  • Find bets that are 50/50 bets.
  • Determine if the bet was a Win or a Loss.

The first part was easy, I just looked for Multiplier: 2.00 in a memo from @magicdice to another user. This would identify any bet successful memo that had even money.

The second part simply checks if You have won or You lost is in the memo. The result of this test is stored in either the win or loss variable.

Calculate Results

All that is left is to add up the Wins and Losses to find the total amount of bets, then divide this number by the number of wins. This will give me a win percentage for even money bets.

Results

The final result was 71913 Wins and 74906 Loses for a total of 146,819 bets using even odds. If we then divide the wins by the loses the result is 0.489807 or 48.98%. When you factor in the 2% house advantage, this is right on the money.

meta-chart.png

Conclusion

As far as I can see, Magic Dice's claim to be provable fair is in fact true. Over a very large sample of games (almost 150,000), the win rate is very close to the 49% Win Chance claimed for an even money bet. Magic Dice does provide another script to test individual bets but as stated above I wanted to see for myself based on actual bets.

Tools and Scripts

I used Python and @holger80's fantastic Beem library to conduct this analysis.

What I could have done better

This test only verifies a subset of the bets, the even money bets. I believe this covers a very large sample of the games played, but a more in-depth test would collect data for all bets and compare the results to the stated odds. I don't think this is necessary or productive but would provide a more comprehensive analysis.

Sort:  

Magic dice is awesome too, one of the cooler things happening on this blockchain

My first magic dice rolls. I want to continue the experiment, but my wallet was devastated. I think it can be a very short example, why any cool Martingale-like strategy will fail at one fine moment. I will play only card games now :D
magic_dice.png

That's great news. At least there's some great fact checking going on.

Posted using Partiko Android

Rip my poor Steem

Posted using Partiko Android

I like the idea of stacking SMTs while playing. Of course, not being completely tethered to the nonsense of steemitdotcom is a bonus too.

Posted using Partiko Android

The rolling dice is very similar to https://freebitco.in's one. I used to play that and I think they are probably fair.

Just because one is doesn’t mean they all are.

That's awesome - thanks for confirming! :D

Interesting information! But was there a selection among the winners and losers, what percentage remained in the plus?

Posted using Partiko Android

Hi @themarkymark!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 8.073 which ranks you at #27 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 212 contributions, your post is ranked at #12.

Evaluation of your UA score:
  • Your follower network is great!
  • The readers appreciate your great work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server

This post has been included in the latest edition of SOS Daily News - a digest of all you need to know about the State of Steem.



Thanks for the info. It would be interesting to see if they will stay that way. Maybe you should check them again after several months.

According to my past experience on Dice game platforms, they all claims their games are Provably Fair.

But in reality, suddenly a losing streak over 20 losses in a row will happen when your account performance is good, which over 25% earning.

Anyway, this is just my past experience. Maybe MagicDice is really Provably Fair up to today.

I share one of my posts related to MagicDice here for the reference.

Yeah, the streaks are concerning, I see 10+ and even 20 losing streaks far more often than I would ever expect with 50/50 odds. Easily 3-5+ 10+ streaks an hour. I've had multiple 20+ streaks.

I need to look at the algorithm closer and see how it works. I took a bird's eye view on the end results, but the streaks are really what makes/breaks it.

Does this mean you don't see a similar winning streaks as often as you see losing streaks?

If it's so, I doubt your observations.

Anyway, waiting for an update about an audit of the algo from you.

I see streaks on both sides, but streaks is what kills any strategy as it doesn't matter the direction.

If your betting 1 Steem, and you get a streak of 10 wins, you make 10 Steem. But when you get a streak of 10 loses, you lose 1500 Steem.

True. A loss of 1024 STEEM to be precise. But if one could always win, how will a casino run its business :)

Thanks for this, I have played a little and this is reassuring!

What is the chance to lose a bet 10 times in a row? And what is the chance that the same number will fall out of three bets twice? We tested in one day, 100% it will happen.

Hi
This is off topic, but I wanted to know if you know about the proposed Bittrex Steem- Dollar pairing post below and if the Witnesses are supporting it and which pairing you will support.
Thanks
@shortsegments