name | ticket |
---|---|
@generalandrews | D47CE1C01C5D419D99D6FC825ED8E12BD80C758AE3C1DC33B40A2EBF20C1272D |
@novacadian | 1D79EED756B58D590A94B1FFC96A0AADA9F3CEBC3A2ABE1BBD7809318E94ECBF |
@solarwarrior | 421BEDB91AA12F8E921E42F2184153DC14B4AFB344717BE80D0AE71DFFFB8BC4 |
@edicted | 77B265CDE9EC2D017D94184F626C395E0FE3B860C0C1C4B5DFE6C438A0929AAC |
Bitcoin Block 545215
approaches and, using that information, I must pick a provably fair winner from this list of four names. It was obvious to me that the significant digits should be the ones on the right side instead of the left. After all, the leading characters on a POW block are all zeros.
Let me give an example. Here is Bitcoin's most recent block:
Clearly, @novacadian should win this block because both his ticket and this block end with an 'F'. Unfortunately, this is not a very fair way to pick a winner.
What would happen if the block ended with '0'? Would @novacadian still win? 'F' is closer to '0' than '4' is, but are we allowing that kind of around-the-world- action? Clearly we should because if not, having an 'F' or '0' ticket would have a poor chance of winning.
What if the last digit of a block was 'E'? There are 'F' and 'D' tickets, so that's a tie. We'd have to check the next digit, which is a 'B', @novacadian wins again.
If my lottery became popular using this flawed system, someone could easily come along and game it into the ground. Let's say my lottery had a hundred people in it. If none of the tickets ended with '7' someone could create that ticket and have a 1/16 chance of winning a lottery with 100 people in it. One could make a lot of money in the long run making bets like this. In the case of a dollar lottery, you'd win $84 every 16 attempts on average. How can we avoid this?
Even The Odds
First of all, this system is boring. A ticket only has a 1/16 chance of picking the first number correctly.
Consecutive # | chance |
---|---|
1 | 1/16 |
2 | 1/256 |
3 | 1/4096 |
This doesn't leave much room for positive feedback loops and them feel-good feels. You're going to be disappointed the vast majority of the time. Your chance of picking 5 hex numbers in a row correctly is one in a million (1,048,576). However, I feel like I've come up with a somewhat elegant solution to these problems.
I'm going to reduce the hex down to binary. This will give players a 1/2 chance of guessing correctly for each bit.
Hex | Binary |
---|---|
0 | 0 0 0 0 |
1 | 0 0 0 1 |
2 | 0 0 1 0 |
3 | 0 0 1 1 |
4 | 0 1 0 0 |
5 | 0 1 0 1 |
6 | 0 1 1 0 |
7 | 0 1 1 1 |
8 | 1 0 0 0 |
9 | 1 0 0 1 |
A | 1 0 1 0 |
B | 1 0 1 1 |
C | 1 1 0 0 |
D | 1 1 0 1 |
E | 1 1 1 0 |
F | 1 1 1 1 |
After that I'm going to implement a point system. For every bit you get correct you get a point. Whoever has the most points wins the lottery. On top of this mechanic, I will give bonus points to tickets that guessed consecutive bits in a row. Think of this as a kind of combo-move. The third bit guessed correctly will count as 2 points instead of one. The fourth bit will count as 3, and the fifth will count as 4 (and so on).
Therefore, getting 8 bits correct in a row (a chance of 1/256) will give you way more points (1+1+2+3+4+5+6+7=29) than getting four in a row twice (1+1+2+3+1+1+2+3=14)
This system will make the whole experience much less boring and more fair.
Examples
Say the block ended with '8'. This is 1 0 0 0 in binary. @generalandrews' ticket ends in 'D' 1 1 0 1. This would give him two points for getting the first and third bits correctly.
name | ticket | points |
---|---|---|
@generalandrews | 1 1 0 1 | 2 |
@novacadian | 1 1 1 1 | 1 |
@solarwarrior | 0 1 0 0 | 2 |
@edicted | 1 1 0 0 | 3 |
If someone had picked '9' or '0' they would have gotten an extra combo point (4 points total) for getting three bits in a row. Anyone who picked '8' (the correct number) would have been awarded 7 points total.
It get's a little more complicated once you start looking farther down the line. How many hex values should be evaluated for point rewards? At first I was thinking 5 because getting all of them right is about a one in a million chance (191 points). However, I believe the more significant digits get used the more fair the game becomes, so perhaps it would be smarter to use a lot more.
Jackpot Drop
Normally people who play the lottery want an infinitesimal chance of winning millions of dollars. Most lottery players aren't looking at how obscenely bad the odds are stacked against them. Even if they win, they get forced to payout half their winnings to taxes. Barf.
Still, it's obvious to me that if this lottery is going to get any traction it needs to have a bigger prize pool than just people commenting "#ticket" on a random thread.
My idea for jackpots is simple: rake some money off the top and add it to a jackpot fund. When something extremely unlikely happens that ticket holder wins the jackpot. For example, the One-In-A-Million Jackpot would be anyone who guesses the first five hex values wins. The chances of this happening are one in 16^5.
These jackpots also have the opportunity to be decentralized. If I could find people that I trusted to payout the jackpot we could pool all of our jackpots together into one large fund. Each of us would remain in control of the jackpot funds we have generated, but we would agree to give those funds to the winner across multiple decentralized lotteries.
Trust
A big jackpot requires a lot of trust. This is an honor system lottery, so any host who just decides to steal (not pay out) the jackpot is actually allowed to do that. Granted, that account would never be trusted in the community likely ever again, but at the same time there need to be legal protections in place in case a legitimate theft occurs. Buyer beware. Regardless, nothing is as risky as actually buying a real lottery ticket at the liquor store. Every time someone does that half of their money is automatically forfeit. We can undercut that loss by a huge margin even with bad actors.
Power-ups and grace period
There is a determined grace period for losers of the lottery to pay the winner without losing reputation. There is also a grace period for hosts of a jackpot to pay out the winners. Even if the hosts aren't charging anything to run their lotteries, I still think there could be a big incentive to host jackpots. If the jackpot payout grace period is set to a long enough time (1 or more weeks) this would allow hosts to power up the funds and increase voting power while waiting for the winner to be selected. Many hosts probably wouldn't want a couple thousand Steem/SBD just sitting in their account unused.
Conclusion
Ah well I've been distracted. There are only 5 more blocks to go so I better post this. For my first lottery I'll calculate points based on the last 2 sig figs. In the event of a tie I'll use the first system as a tie-breaker.
When it really comes down to it, something like this lottery will never go viral unless it has the flash and glitz of a casino slot machine. People love positive feedback loops, interaction, and a chance at big money. That's what I aim to provide.
Return from Choosing a Lotto Winner to edicted's Web3 Blog