What If You Could Win More Money Through The Lottery?

Current lottery system

The lottery is centralised, like most things in our world. Everything goes through one company.

Photo by Erik Mclean on Unsplash

Decentralised lottery system

How do we make the current system decentralised? By adding the fancy word blockchain to it. Okay, it isn’t that easy but it does have to do with blockchain, the king of making centralised stuff decentralised.

Photo by Scott Graham on Unsplash

My semi-decentralised lottery system

I built my own semi-decentralised smart contract lottery. It’s semi because there’s still one person who decides when the lottery starts and ends. I haven’t deployed it to the real blockchain yet and probably never will. But if you want to see the code for it, you can check it out on my GitHub repository below.

Here’s how it works.

TL;DR

  1. Owner starts it
  2. Players enter by depositing $50 into the lottery smart contract
  3. Owner ends it
  4. A random player gets chosen and all the funds are deposited into their account immediately

Full explanation

First, the owner of this smart contract will have to start the lottery. Then the players can enter it.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Felix Tikkanen

Felix Tikkanen

44 Followers

A 17-year-old teenager trying to become the best version possible. I write about blockchain/crypto and self-improvement.