Introducing A Fully Automated Provable Fair Steem Lotto Bot And A 24 Hour Testing Phase With 0.5 SBD Hourly Guaranteed Prizes

in #bot7 years ago (edited)


Introduction

My main account is @juliank and I am also the developer behind @photocontests. I realised that one of the current issues with SBD is that there are not a lot of services where you can use them for on Steem(it) except for buying upvotes. My idea is to encourage more people to spend SBD in the Steem economy rather than cashing out of the ecosystem. To achieve this I will be building several applications, starting with this lotto.

Lotto

A fun way to spend some SBD is by buying some tickets and maybe winning a grand prize. After the initial testing phase there will be 3 different categories each with different guaranteed prizes and ticket price. Depending on how everything goes there is room for a monthly mega lotto.

FrequencyTicket PriceGuaranteed Prize PoolMin. tickets
hourly0.01 SBD0.10 SBD5
daily0.10 SBD1.0 SBD5
weekly1.0 SBD10 SBD5
monthly10 SBD100 SBD5

For the initial payout sturcture there will be 2 big prizes, first gets 25% and second gets 10%. After that 5% of people will 4x their ticket price, 10% will 2x their ticket price and 20% will get back their money. This adds up to about a 35% win chance. There is 5% fee which will also be used for promotion.

Payout structure

#% of Prize Pool
132%
113%
5%20%
10%20%
20%10%

Provable fair

The most important thing about a lotto is that it is fair. For this reason I have decided to make this lotto provable fair. This means that users will be able to verify the outcome. When you buy a ticket you get an automated response with your ticket numbers, the current prize pool, a server hash and the transaction id of the block from your transaction.

Screenshot 2017-12-07 04.47.33.png

The server hash is obtained by hashing the server seed, which is a secret used to perform the calculations. The sha256 hash of the server seed is unique and can be used to verify after the drawing that I did not change the server seed. As the server seed is revealed after the drawing.

Also used in the calculation is the transaction id of the last person who bought a ticket. This is a random string which I cannot influence. This prevents me from calculating in advance which ticket will win and buying the ticket with a separate bot.

To calculate which tickets will win the server hash, transaction id, a colon and a roll number(starting from 0) are string together. This string is hashed with a hmac-sha512() function that gives a 128 character hex string. From this string the first 5 characters are taken and converted to a decimal number. This number will be between 0 and 1048575. If this number corresponds to a ticket number there is a winner, if not the roll number will increase by 1. This process repeats itself until all winners are decided. Each ticket can only win once.

A post is generated which reveals the server seed and all other relevant information to perform the calculations yourself. I will be releasing the code so you can do this yourself.

Screenshot 2017-12-07 04.59.35.png

How to buy tickets

Buying tickets is rather simple, just send a multitude of the ticket price and the lotto in which you would like to participate. You will get an automated response confirming your order. If something goes wrong, the transaction will be reversed.

Screenshot 2017-12-07 05.01.08.png

Testing Phase

Before fully releasing this application I want to do a test run first. For the next 24 hours only the category 'hourly' is running and ticket prices are just 0.001 SBD. The guaranteed prize pool every hour is set at 0.50 SBD and there needs to be a minimum of 5 tickets sold. This means if you buy just 5 tickets and nobody else does, you can win 95% of 0.50 SBD. The guaranteed prize pool only come into effect when the prize pool from ticket sales is lower.

It takes about 1 minute to get a response

The bot is up and running now, be the first to enjoy some sweet SBD


Sort:  

Interesting idea. I think the first prize should be a big bigger. Something like 35-40 %.

Thanks, I obviously pulled the payout distribution out of thin air. I do think that for a lotto a well spread payout is nice. Obviously this can always be changed depending on what people prefer

Cool. I will consider to take part when I have some SBD :)

It works... :)

Reveal spoiler

lottery-capture.PNG

Yes! I still had the guaranteed payout set at 1.00 SBD instead of 0.5 though ;p I did do a lot of testing, but always in real world cases something will happen for what I did not think of

Heh, yes, that's the reality of programming ;)

Hello, I need 1 sbd, do you change me for 1 steem?

Good to see this i hope it will work.

Feel free to try it out ;)

De automatische bevestiging werkt perfect. (minder dan 10sec.)

Dat is vrij snel! Duurt gemiddeld een minuut

Ik was gewoon benieuwd, en toen ik ging kijken stond de klok op 8seconden (!!). Ik dacht wel dat je dergelijke feedback welkom zou zijn.
Maar het is altijd beter te zeggen het duurt 1 minuut, zo ben je zeker dat er niemand in paniek geraakt na 30 seconden. Mensen hebben geen geduld meer...

tweede deelname (test) slechts 20 seconden
test.JPG

The genius has revealed another interesting addition to Steemit. This is awesome @juliank👏👏👏 i like the idea. It would be a lot of fun🖒😉

Update: i just join to the test. Hehehe sent 0.001sbd

I saw it, thank you for participating. Unfortunately you did not win :(

Yeah i got the reaponse of @fairlotto. Its seems working fine as per your description. No worries about winning as long as were having fun. Lol😄 ill bet again soon. Keep it up!

I'm in! This is a great idea. Great stuff @juliank

Thanks, I see you are winning some moneyz ;)

@juliank thank you so much for doing this! With your photocontests and this, you are performing quite the service for this community and I commend you for your efforts. Signed up myself and is working! I look forward to your future applications!

Hey @bitfiend, thanks :D I hope for this to grow in the biggest lotto on Steem. With insane monthly prize pools

You're on a roll :) I love the ideas you're implementing right now. Will try the lotto!

Thanks! A bit little bit of gambling can be fun and this is also easy to automate

I'm by no means a gambler, but in the context of all automation that's going on on steemit I'm happy to try it.
Have you made this code and the code for the photo contest bot public? I'd love to see it and learn from it.

I am not gambler either, but I do like the yearly new years eve lottery. For the code, I will be releasing the photocontest bot, its kinda a mess atm as I had not done programming in some time so I want to clean it up first. This bot I will keep private

first time going to do this...
hope ot will work

Ive been taking part ; i think in 3 so far - however i may or may not have found something that could result in a problem - i may want to do a test, and provide you with my results but just in case i will not be posting the problem here, only because people may want to take advantage of the issue and i dont want to have that happen .
So perhaps you can msg me on steem chat - and ill make sure you know what the issue is .

@juliank i have msged you back - sorry it took me a while, i was helping my grandmother with her tree this year

welcome from another newbie ;)

Hello fairlotto, welcome to Steemit! :-)

GREAT to SEE you! I guess, welcome aboard the Steemit Train! You are already a great blessing to us all by being on this platform with us.All for one and one for all! Namaste :)

Hello, I need 1 sbd, do you change me for 1 steem?

Sure! Send me 1 steem please.

welcome to steemit

Congratulations @fairlotto, this post is the second most rewarded post (based on pending payouts) in the last 12 hours written by a Newbie account holder (accounts that hold between 0.01 and 0.1 Mega Vests). The total number of posts by newbie account holders during this period was 2232 and the total pending payments to posts in this category was $730.67. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Sounds like a great idea, let me get my head around Steemit first, as I only joined yesterday so still learning the ropes!

i transfered 0.010 sbd to you with hourly in the comment.

@juliank stupid me i transfered it to you !! lol instead of the lottery. Do not worry i try again :-)

nice idea: I received mine as well, thanks.

sounds interesting on the first sight. will have a full read tomorrow.

Your post has been resteemed to my 2500 followers

Upvote this comment if you like this service

Too bad that barely none of them are actually active enough to upvote.

Congratulations @fairlotto!
Your post was mentioned in the hit parade in the following category:

  • Comments - Ranked 4 with 39 comments

I'll play how do I get a ticket?

Did you actually read the post?

Sorry I get how to purchase, thought it was in testing phase.
Should of asked is it live yet?
Is there a website that shows winners or how many people in the lottery?

How fun and what a great idea to start!

he enviado, espero tener suerte!

Briljant gast! Alleen oppassen dat @cheetah je posts niet gaat flaggen...

Goeie! Vooralsnog gebeurt dat niet en er vinden aardig wat posts plaats, mocht het zo ver komen neem ik wel contact op met de beheerder

Still working?

Do you work new?

Great Idea. I think @juliank has most innovative ideas to join games and steemit community.

Keep it up.

I dont have any of these

Good job this fairlotto . I'm playing now . 0.01 1 ticket hourly.

Thank you to @juliank
You are doing very good works.
@photocontests is also the best and I try fairloto.I hope it will also be good.

I send him 0.01 SBD with hourly memo but I received only 0.001 SBD from @fairlotto

Did you ever get a refund or payout? @cryptostyle?

No.
I just want to grow my account first with help of nice guys which are on steemit.

Very nice post and great idea.. @fairlotto

Hi @fairlotto @juliank
This is my first time here, I'm new. I would like to play. I have a few questions though.

  • What time zone and time are the drawings? Would like to know once a pick, I could enter again immediately. How can I predict when to enter again for hourly, daily, weekly, etc.

  • Can I enter them all? Can I enter hourly and also weekly?

  • Where would you recommend I could watch what's happening via blockchain?

already tranfer to @fairlotto 0.05, and awaiting the result

Still active? Must I buy at least 5 tickets?

hey is this bot open source?