The Perfect Lottery — Ethereum contracts enable trust and maximum payout
I am a long term bitcoin enthusiast and let me make upfront very clear that I still believe very much in Bitcoin as a store of value. Lately however I am getting more and more intrigued by Ethereum as certain things are just easier to do. I will use this page to maintain a list of Ethereum use cases but let me start with one.
Lotteries. This is for me the most obvious one. Lotteries have a typical trust and 3rd party charges problem. First all lotteries do not pay out the full amount of money that has been collected to the participants. Why? Because someone organizing the lottery needs to be rewarded for this effort. Secondly you must trust the person or the organisation that holds the funds not to run away before the lottery ends. Both issues are solved with a digital contract that lives on the Ethereum blockchain. The contract can pay out 100% of the money that has been collected (minus some gas charges to conduct the transactions but these are minimal). Therefore your chance of winning will always be higher than with a traditional lottery. Also your funds are save during the lottery since they are being held by the contract and not a 3rd party person.
Let me illustrate with an example. Below is a simple contract on the ethereum blockchain. It works like a simple draw. There are 10 tickets. You can buy tickets by sending ether to the contract. For example if you send 0.3 ether you will receive 3 tickets. Once all tickets are sold out the contract will select a random ticket and will pay the pot (minus some gas charges) to the winning ticket.
Here is the contract:
You can scan it and send ether to it directly. You can see the amount of ether (or tickets sold) on etherscan:
As you can see currently one ticket (of 0.1 ether) has been sold. When the contract has sold all 10 tickets it will select a random ticket as the winner. Simple.
However lets think for a moment of the implications of this. Lotteries have just become extremely simple to organize. We have just created a lottery where the only thing that people need is the contract address (in the form of a QR code to make it even easier). There is no website, no organisation to administer the lottery, no app, no complex payment system, no payment gateway, nothing. Just a QR code to send the funds to. There is no trust required. The lottery cant cheat you out of your funds if it gets very popular. It will always run the contract forever as it is supposed to do. Finally it provides the highest payout as it doesn't need to make any profit from the lottery.
This is truly transformational gentlemen.