In recent years, blockchain technology has
brought revolution in several domains. It is a
backlinked, decentralized and
distributed-database of encrypted transactions.
It allows a peer-to-peer network being created
for users where transactions can be proceeded
between them directly without an intermediary.
The transactions can be any movement of money,
goods, secure data or assignment of a government
ID number. Therefore, it has the potential to
change the way we transact, interact with
government and verify the authenticity of goods
that ranging from land to vegetables.
Smart contracts is a self-operating computer
program that executes automatically when
specific conditions are met. It is running on
Ethereum, which is an open-source & public
blockchain based distributed computing platform
for building decentralized applications.
In this project, I have developed a guess number
blockchain game which is a smart contact. It
automates many blockchain tasks and it can be
run on Ethereum. The game logic is shown as
below image. At first, a creator deploys the
guess number smart contract on the Ethereum.
Then, the creator creates a new game with
deposit for jackpot, set the start time and
duration of the game. When the start time is
reached, player can buy ticket during the
specified duration. Player have to select four
unique numbers for each ticket. After exceeding
the specified duration, player cannot buy ticket
and the creator can execute the end game
process. The end game process will generate the
win numbers, find the winners, distribute prizes
for the winner and reward commission for
creator.
Prize |
Prize Allocation |
Rule |
1st Prize |
50% of jackpot / winning units |
Pick all the 4 win numbers |
2nd Prize |
20% of jackpot / winning units |
Pick 3 win numbers |
3rd Prize |
10% of jackpot / winning units |
Pick 2 win numbers |
Creator Commission |
20% of jackpot |
Reward to creator when the game end
|