Lottery use case for smart contracts

Lottery use case for smart contracts


Welcome everyone. My name is Philippe and
this is Berry. This is my good friend Berry and today we’re going to be
talking about a recent post that happened on the Cardano forum and this
was by username bobert. His name is Robert and basically he did a jellybean smart contract in Plutus and the Plutus playground so I copied and
compiled this code and once again I’m not a software engineer. I’m not an
engineer, but I was able to copy and paste the code into Plutus and I was
able to run the program and I thought this was very interesting because people
are always talking about use cases and Robert went ahead and did like a simple
use case for smart contracts within Plutus and the reason why I wanted to
focus on this was because I thought it was very interesting in terms of lottery
so this whole jellybeans contract. The premise of the contract is you have
a jar full of jellybeans and people can guess the number of jelly beans within
that jar and you can set a prize as the the arbiter of that particular contract
that if someone guesses the correct number of jellybeans they win a certain
percentage of a pool of ADA so say you have one main person and the jellybeans
reward is 100 ADA whoever guessed the number of jelly beans in that jar would get that 100 ADA and when you look at lottery markets today and you
when you look at certain game structures for certain incentives for marketing and
you know guess this and you win this or certain lottery incentives it’s very
interesting to see that this could be all automated by smart contracts and
these things could happen on a minute scale so say something reaches a
threshold funds could be distributed immediately and this idea that lotteries
could continuously happen over and over and over again without a central person
in control just maybe some random number generator just regenerating the lottery
over and over again is very cool I think and I think that it has some sort of
utility in future. I don’t know what your thoughts
about lottery systems are or gambling. so my thoughts are that they’re needed
for one because I remember back when I first started like browsing the internet
as a child. The only things I was on internet for was you know children games
or you when I got a little bit older you know games through Yahoo you know like
pool, chess. That’s what I knew the Internet to be. There was a few
other applications like you know email all those others cool things like but other than that it was like you know Minesweeper and all
that stuff so I think that games video games like you know gambling you know
Texas Hold’em stuff like that those are needed because for one that is
what’s going to get people to start experimenting with everyday
use cases for the platform so like if you have a platform like Cardano sitting there. In order for someone to create a use case like how Wi-Fi that
like the internet use case you know and Wi-Fi is implemented today that’s going to take too much time games, video games is something quick, something
user-friendly, and something everyone is like not everyone, but majority of people
are into and can just grasp their minds around and actually begin to use the
ecosystem and begin to use ADA and Cardano so that’s rule number
one. You know you can have a nice car company, but if
you don’t get people to use your vehicles, there is really no point it’s
obsolete right so you can have the best cryptocurrency project out
there, but we want people to use it you know we need transactions to be sent back
and forth because the more transactions that are happening within the blockchain
the you know the quicker and larger the rewards are during staking so we need
these things to occur. I don’t know about you, but I want my staking
you know my delegation to accumulate. I always want my ADA to accumulate so not looking we have to look at this from not a single individual standpoint it’s really more of a pool standpoint so as an
investor and part of the Cardano community yeah
I would like for games and stuff to be on there like I think that’s probably like how it has to start to be honest yes I don’t see any other
like right now like yeah you can say like yeah you need to implement you know
ADA or cryptocurrency into the blockchain into self-driving cars and
you know airplanes and all the stuff like that could be a use
case way down the future, but as far as right now I think it has to start
from the gaming and you know gambling okay. That’s fair enough. Right after this video I’m going to do a demo of
that smart contract within the Plutus playground so I’m just gonna show you
how easy it is and some of my thoughts about it but thank you Berry for this
video and until the next video welcome everyone so I just wanted to do
a quick jellybean guessing game smart contract so this is Robert and he goes
by the name of bobert on the Cardano forum so you can go ahead and click
his github and we’re just going to copy and paste the code so we’re gonna click
on step 8 and copy and paste the code from line three and I am NOT a software
engineer but I just want to show you how easy it is to to compile code on
the Plutus playground so we’re going to delete this real quick and we’re going
to just press ENTER and compile this game from these wallets you can go ahead
and play with the different features lock numbers, guess numbers, you can pay
the public keys, watch the smart contract address and you can really mess around
to see what’s going on and you just input and output ADA and basically the
purpose of the game is to set the smart contract as the the main person who is
saying the number of jellybeans in that jar and then other wallets could guess
and ADA can be transferred from wallet to wallet based on who is guessing the
correct number and you can use time features and pretty other cool things so
check it out thank you again for this smart contract Robert I appreciate it go
and check him out on the forum and yes until the next video
all right

8 thoughts on “Lottery use case for smart contracts”

  1. Thanks for the videos guys. I'm a sub of both channels. How will I be able to stake my ada? Is it automatic? I have a daedalus Wallet will that make staking automatic? Can you guys make a video on how to stake? Thanks in advance!

  2. Haha! Damn, during my 5 hour drive home over the holidays I thought a lottery would be a great (and simple) use case for dapps. Glad to see I was thinking right, and that someone built it! Great excuse for me to test this code out and try out the playground.

Leave a Reply

Your email address will not be published. Required fields are marked *