ICONbet DAOlottery — What DAO actually is and how it works

ICONbet Community P-Rep
10 min readJun 12, 2020

--

DAOlottery for ICONbet is now live and it is truly DAO and fully transparent and here’s everything you want and need to know about it:

What is the Difference Between a Raffle and a Lottery?

The fundamental difference between a raffle and a lottery is that a raffle always has a winner (i.e. all the purchased tickets are entered into a raffle draw) while a lottery may return a non-winning result (i.e. a combination of numbers that nobody has selected for their entry). While a raffle is a form of lottery, if there’s always a winner then it’s really a raffle and not an actual lottery. A small difference, but now you know the proper terminology.

What is DAOlottery?

DAOlottery is a lottery gambling game on the ICONbet platform. A lottery is a form of gambling that involves the drawing of numbers at random for a prize. In the DAOlottery you pick 3 unique numbers between 1 and 30, and 1 non-unique bonus number between 1 and 25. Players use ICX to purchase tickets.

Examples of Good Tickets:

3, 14, 30, 12

15, 2, 24, 24 — The bonus number can be the same as the 3 unique numbers

Bad Tickets That Won’t be Accepted:

5, 18, 5, 13 — Has two 5s in the three unique numbers

Leaving any numbers empty

Any ticket that doesn’t fit the parameters will be removed before your tickets are submitted (you will NOT pay for invalid tickets).

What are the payouts?

The Payout % only adds up to 80% where does the rest go?

70% goes to jackpot winner (if no winner rolls over to next day pot)

15% goes to house

  • 80% to TAP holders
  • 15% to DAOlottery Game Developers
  • 5% to Platform fee

10% goes to daily winners (if no winner in a group (3, 2+B, 2, 1+B, B), group % stays in pot)

5% goes to seed for next pot (If no jackpot winner, rolls into same pot)

What happens if multiple tickets have the same matching numbers?

The payout will be split evenly between all the tickets that have the same matching numbers per category.

Example: 2 tickets have the Jackpot (3 + Bonus) matching numbers. A 100,000 ticket Jackpot would pay out 70,000 ICX / 2 matching tickets = 35,000 to each matching ticket.

The drawing happened but I haven’t gotten my payout yet?

Since this lottery is DAO you will need to wait for players to buy tickets for the next jackpot in order to receive your payout. We use those purchase transactions to send out the payouts. We do not take any of the new money coming into the pot for the payouts.

Next Drawing In: XX:XX:XX

If the timer is at 00:00:00 the next ticket causes the drawing to occur and will be included in the drawing.

How do I Buy Tickets?

NOTE: Each Ticket Costs 5 ICX

Step 1:

Sign into ICONbet above with the Login button.

Step 2:

Enter the number of tickets you want to purchase

(Max numbers of tickets is 1,000 per transaction)

Step 3:

Select the type of tickets you want

Random Ticket(s)

or

Blank Ticket(s)

Step 4:

Enter or Modify your tickets according to the following rules:

  • First 3 numbers can be between 1 and 30, but CANNOT be the same numbers.
  • The final bonus number can be any number between 1 and 25. It can be the same as any of the first 3.
  • !!! TICKETS THAT DO NOT FOLLOW THE ABOVE FORMAT WILL NOT BE SUBMITTED !!!

Final Step:

You MUST press the Purchase Tickets button and wait for a transaction hash to appear. This is your receipt for your purchase and how to track it.

If you select Random Ticket(s) and don’t like any of the numbers you can modify them manually.

If you don’t like a specific ticket you can click on the X below the “Remove” column to delete a specific ticket.

If you don’t like ALL of your tickets or want to start over you can press the “Delete All Tickets” button and it will remove all your tickets and start the buying process over.

* Tickets/numbers are only valid for the day they are purchased. Each day is a fresh start with a cumulative Jackpot.

My Live Tickets

This is the page where you can see your tickets that you’ve purchased for the currently active day (the drawing hasn’t happened yet).

My Ticket History

This is the page where you will be able to see your last 5 days of WINNING history on DAOlottery. This will not show you all of the tickets you purchased for a specific day, only the WINNING tickets and how much you won. You can change the day using the “Day Showing:” drop-down.

Previous Drawings

This is the page where you will be able to see details about the last 5 DAOlottery drawings. You’ll be able to see the Jackpot for the day, the total payouts, and how many tickets were purchased in total for the day. You can change the day using the “Day Showing:” drop-down.

What is DAO?

DAO stands for decentralized autonomous organization. It is an entity that comprises people, smart contracts and the interfaces between them. What this means for DAOlottery is that all DAOlottery operations are driven by player transactions. The players control when a drawing happens after the start of a new day. The first player to buy a ticket in the new day causes the drawing to happen and the payouts to begin. That player’s tickets will be included in that drawing’s results. There is no 3rd party controller triggering any actions on the blockchain or hidden behind server code. The calculations of the tickets for the day and the winning distributions are also DAO as mentioned, and are piggybacked on each transaction processed by the DAOlottery Smart Contract until distributions are complete. Again this means that no single human or entity is controlling the winning ticket calculations nor the fund distributions. This is particularly why it has taken us so long to bring you DAOlottery because we had to make sure this process was foolproof and 100% validated working. On average it is expected that the DAOlottery jackpot will reach about 62,000 times the price of a single ticket by the time of payout, so we didn’t want any issues when it comes to players’ ICX.

How can you prove DAOlottery is 100% transparent?

Everything is stored on the blockchain including all tickets purchased, all the winning tickets, and the code for how everything works in the Smart Contract. Any interested individual is welcome to view and verify all transactions, calculations, and payouts via the link to the Smart Contract below. I will go through each method on the Read Contract tab so you can understand how you can see everything that is stored and happens on the blockchain.

https://tracker.icon.foundation/contract/cx1c06cf597921e343dfca2883f699265fbec4d578#readcontract

get_active_days -

This method takes a page number and a page length (up to 500 results per page) and returns the active day values in their unix timestamp. This is what you will use to get data per a day you are searching for.

get_batch_size -

This method returns the current batch size for payout distributions.

get_calc_done -

This shows whether the previous day’s calculations for winners have been completed.

get_dist_complete -

This shows whether the previous day’s winning payout distributions are complete.

get_draw_time -

This method returns the unix time in seconds of when the previous draw occurred.

get_game_on -

This method shows whether the game is active or not.

get_history -

This method takes a page number and a page length (up to 500 results per page) and returns a dictionary of the day ID and the number of tickets purchased for that day.

get_max_iter -

This method shows how many calculations the smart contract can make per transaction while doing winning ticket calculations. We limit this so as to keep our transactions fast and responsive during these calculations.

get_number_purchased -

This method takes a wallet address and a day ID and returns the number of tickets purchased for that wallet for the day.

get_payouts -

This method takes a day ID, page number, and page length (up to 500 per page) and returns a dictionary with the wallet address and the total payout in loop value (1 ICX = ¹¹⁸ loop). So example: _day = XXXXXX, _page = 0, _page_length = 100

>>dict: {“hxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA”:”173986736257310025848374",”hxBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB”:”174179977793642929997069",”hxCCCCCCCCCCCCCCCCCCCCCCC”:”174049314476762880611491"}

so hxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA won 173986736257310025848374 which is 173986736257310025848374 / 1000000000000000000 = 173,986.73… ICX

get_player_index -

This method returns the value of an internal variable used to track players’ addresses.

get_player_wins -

This method takes a wallet address, a day ID, a page number, and a page length (up to 500 per page) and returns a dictionary that contains the Win Type (3b = Jackpot, 3n = 3 Matching Numbers Only, 2b = 2 Matching Numbers and Bonus Match, 2n = 2 Matching Numbers Only, 1b = 1 Matching Number and Bonus Match, b = Bonus Match Only), ticket #, and the ticket numbers for that ticket in format XXYYZZBB where XX is the first number, YY is the second number, ZZ is the third number, and BB is the bonus number. Example:

From hxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA above. _address = hxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, _day = XXXXXX, _page = 0, _page_length = 500:

>>dict: {“3b”:”219111,13161114",”3n”:””,”2b”:””,”2n”:”218559,07131624;218342,13021624;218841,30161323;18441,13163022;18485,13201620;219138,07161319;218968,13171618;18833,14131617;18734,13161816;218238,20161310…..}

so the player got a 3b (Jackpot) ticket, ticket # 219111, and the ticket numbers were 13,16,11 and bonus number 14.

get_players -

This method takes a day ID, page number, and page length (up to 500 results per page) and returns a list of wallet addresses of all the players for the specified day ID.

get_pot -

This method takes a day ID and returns the total pot for the day in loop value (1 ICX = ¹¹⁸ loop). This isn’t the Jackpot amount, it’s the total pot for the day so Jackpot + the smaller wins + the seed for the next day. Example:

_day = XXXXXX

>>int: 992751289548650730338206

so 992751289548650730338206 / 1000000000000000000 = 992,751.2895… ICX

get_purchased -

This method takes a wallet address, a day ID, a page number, and a page length (up to 500 results per page) and returns a list of the tickets purchased with the ticket numbers. Example:

From hxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA above. _address = hxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, _day = XXXXXX, _page = 0, _page_length = 500:

>>list: [“18,08,19,21;06,08,18,25;26,24,14,02;25,22,13,17;28,21,01,22;08,19,12,17;08,28,29,02;14,30,11,25;07,13,08,06;11,02,13,21;07,14,22,12;20,10,13,24….}

Each ticket purchased is listed in format XX,YY,ZZ,BB where XX, YY, and ZZ are the 3 numbers and BB is the bonus number and each ticket is separated by a semi colon (;).

get_record_done -

This method returns the value of a variable which is set when all of the winning tickets are calculated.

get_score_owner -

This variable is the address of the score owner. It is used as part of the registration process for the ICONbet platform.

get_ticket_numbers -

This method takes the ticket # (from above) and the day ID and returns the ticket numbers in the format XXYYZZBB where XX is the first number, YY is the second number, ZZ is the third number, and BB is the bonus number.

get_ticket_price -

This method takes the day ID and returns the ticket price in loop (1 ICX = ¹¹⁸ loop). Example:

_day = XXXXXX

>>int: 5000000000000000000

So 5000000000000000000 / 1000000000000000000 = 5 ICX per ticket

get_ticket_type_counts -

This method takes a day ID and returns a dictionary with the ticket type (3b, 3n, 2b, 2n, 1b, b) and the number of tickets that won each category. Example:

_day = XXXXXX

>>dict: {“3b”:”5",”3n”:”53",”2b”:”174",”2n”:”4266",”1b”:”2491",”b”:”25425"}

get_ticket_values -

This method takes a day ID and returns a dictionary with the ticket type (3b, 3n, 2b, 2n, 1b, b) and the total amount of winnings for the category in loop (1 ICX = ¹¹⁸ loop). Example:

_day = XXXXXX

>>dict: {“3b”:”173731475671013877809186",”3n”:”1170697275411144729172",”2b”:”156684231305026946076",”2n”:”2044605303057689059",”1b”:”6488005116429836595",”b”:”122690333775193131"}

get_tickets -

This method takes a day ID, page number, and page length (up to 500 results per page) and returns a dictionary that contains the ticket number, the numbers of the ticket in format XXYYZZBB, and the wallet address of the player who bought the ticket. Example:

_day = XXXXXX

>>dict: {“0”:{“numbers”:”19120708",”player”:”hx852b1a043306aec288112c5d7898989e0bb283be”},”1":{“numbers”:”12273003",”player”:”hx852b1a043306aec288112c5d7898989e0bb283be”},”2":{“numbers”:”11152302",”player”:”hx852b1a043306aec288112c5d7898989e0bb283be”},…

get_treasury_score

This method returns the contract address of the ICONbet treasury. It is set when configuring the contract after deployment.

get_type_wins -

This method takes a ticket type (3b, 3n, 2b, 2n, 1b, b), a day ID, a page number, and page length (up to 500 results per page) and returns the ticket # that won in the specified ticket type category. Example:

_type = 3b, _day = XXXXXX, _page = 0, _page_length = 500

>>str: 219111;113462;112921;23697;10690

get_winning_ticket -

This method takes a day ID and returns the winning ticket numbers in the format XXYYZZBB where XX is the first number, YY is the second number, ZZ is the third number, and BB is the bonus number. Example:

_day = XXXXXX

>>str: 11131614

XX = 11, YY = 13, ZZ = 16, BB = 14

name -

This method returns the name of the contract which allows it to be more easily identified on the tracker.

Any of the methods above which take the day variable as a parameter will also accept a negative integer to reference back from the end of the day array such that -1 will specify the current day and -2 will specify the previous day, etc.

It’s a very large and complex Smart Contract which we are very proud of because everything is done and processed right there on the blockchain and not on our own servers. This is what makes DAOlottery 100% transparent and provably fair.

Closing Remarks

You have every right to question any game/developer about their claims and any that don’t have their source code (that actually processes the game) available on the smart contract because there’s no real way you can prove the game is fair. Even if the developers release “source code” that doesn’t mean it’s the actual source code running on their servers. A developer can send you source code and then make any changes they want before pushing it to their servers. This is why having games built on the ICON blockchain with all the code and processing on the Smart Contract is the only way to fully prove transparency. The code the smart contract is running is available for ANYONE to verify right from the contract itself. There’s absolutely no way a developer can adjust the smart contract code before pushing it live because the code you send for the smart contract is the code that is available to download. ICON did a very good job of making this so developers can prove their on-chain dapps are fair and working as advertised.

Use this knowledge to keep yourselves and others safe!

--

--

ICONbet Community P-Rep
ICONbet Community P-Rep

Written by ICONbet Community P-Rep

This is the Medium account for the ICONbet Community P-Rep node for the ICON network. We will be posting articles and monthly financial reports here.

No responses yet