Skip to content

An attempt at creating a blockchain based betting platform using smart contracts with solidity.

Notifications You must be signed in to change notification settings

prashanthglen/Bet-with-smart-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Bet-with-smart-contracts

An attempt at creating a blockchain based betting platform using smart contracts with solidity.

NOTE: The code is yet to be tested

I am still a beginner and am trying to learn blockchain technology. This is my first programming attempt with solidity.

The Voting code example provided here was used as a seed for this contract: https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2

The following is a solidity contract which creates a betting website by allowing the owner(Betting platform) to add candidates(on whom people bet on) and open the betting. Once betting is open, users get to place their bets on candidates of their choice. Once a candidate wins, the owner gets to enter the winner and then close the betting. The total value of bets against the winner is calculated, a part of it is kept by the owner as a fee, and the rest is divided among the winners.

Probable improvements

  • Add a function showing bets for vs against for each team.
  • Allow for changing odds.

I do not plan to actually deploy this on the Ethereum blockchain.

About

An attempt at creating a blockchain based betting platform using smart contracts with solidity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published