elective-stereophonic
elective-stereophonic
CasinoTool : THE LOTTERY PROJECT singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.12.2

Pages: [1] 2 3 4  All

Author Topic: CasinoTool : THE LOTTERY PROJECT  (Read 11594 times)

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
CasinoTool : THE LOTTERY PROJECT
« on: December 27, 2014, 06:44:46 am »

We start with following lotteries, that we will use as Test Case, to validate our implementations and ideas. These test cases are devised to use a most simple environment. The ticket prices are set very low. Of these, CasinoTool will keep 4.77 percents; this income will be used mainly to sponsor devs that help us and the rest, if any, will go into the yearly dividends.

All these lotteries are kind of linked together because some of the weekly jackpots flies to the monthly lotteries, and some of the monthly jackpots go to the yearly lotteries.

    Short descriptionCode     Ticket prices         Full description
Yearly Lottery, single winner  Y1     1'050 NXThttps://nxtforum.org/index.php?topic=7143.msg143967#msg143967
Monthly Lottery, single winner  M1       105 NXThttps://nxtforum.org/index.php?topic=7143.msg144337#msg144337
Monthly Lottery, many winners  M2       105 NXT
Weekly Lottery, single winner  W1       105 NXThttps://nxtforum.org/index.php?topic=7143.msg145994#msg145994
Weekly Lottery, 5 winners  W2       105 NXT
Weekly Lottery, very wild, only for statisticians  W3       105 NXT

So if you want to support CasinoTool, you just start buying lottery tickets.

Myself, I will buy ticket Nr 1 of all lotteries. This is the first time that I buy lottery tickets and hope that I do not win; imagine after winning having to convince the nxters that the random methodology was correct !  ;D ;D ;D  (see the random note !)
« Last Edit: January 06, 2015, 09:38:45 am by SwissAlps »
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #1 on: December 27, 2014, 07:32:53 am »

The random question

We would like to use a simple random number that would be posted in the blockchain as a simple AM (arbitrary message) sent to the CasinoTool account NXT-FKSF-53F7-TQ2A-GJHU9, so that everybody can easily check the lotttery draw without having to compute it.

For more info about how the random number is extracted, see https://nxtforum.org/index.php?topic=7730.msg152374#msg152374
For all the lotteries, we use the first block after the end of the corresponding period; this means for the monthly lottery the first block of the next month. For the weekly lotteries, the first block of every Sunday.

Question : How do we know the winning TicketNr using this ?

Answer : x = total nr of tickets sold during the week (let's say it is 17)
             y = the random number (in the example 9 062 747)
             r = modulus operation, remainder of the division y / x   (r=13)
             Winning TicketNr = r + 1 (Winning TicketNr 14)
 
PS : Some people seem to have very good random values, I would really want to have more knowledge about how they did it at  http://news.bbc.co.uk/2/hi/africa/621895.stm
« Last Edit: March 30, 2015, 02:37:00 pm by SwissAlps »
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #2 on: December 28, 2014, 07:03:36 am »

Code Y1 Yearly Test Case Lottery started (Christmas lottery)
  • account alias  LotYear2015
  • account NXT-CDB6-V476-PRLC-CC9VJ
  • ticket price 1'050 NXT
  • deadline for buying tickets Dec 24 th. 2015 (important: always GMT)
  • ticket draw Dec 25th. 2015

We make this one very simple, only one winner, a single ticket wins the entire prize money.

If no winners for the Jackpot, it goes credited to the next lottery period.

To buy a ticket, nothing more easy, just send the exact amount 1'050 NXT to LotYear2015.

The computation of your TicketNr is straighforward, it is the attributed in the same sequence as the incoming ticket buying transactions in the lottery account. 

Buying a ticket after the deadline means you are buying for the next period, it means also that the ticket numbering starts afresh with TicketNr 1.

You cannot buy more than one ticket at a time in a single transaction, you have to make many transactions if you need more tickets.

You cannot resell or give away your tickets, it remains attached to the sending Nxt account (via the transaction Id).


CasinoTool welcome suggestions from all nxters on how to improve both these Test Case Lotteries.
« Last Edit: January 17, 2015, 07:22:55 am by SwissAlps »
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #3 on: December 29, 2014, 05:51:27 pm »

Code M1 Monthly Test Case Lottery
  • account alias  LotJan2015
  • account NXT-QP3U-8ZPR-E48D-FCVW2
  • ticket price 105 NXT
  • deadline for buying tickets, the last day of the month (important: always GMT)
  • ticket draw, for the moment the first Joker draw that occurs after the deadline

To buy a ticket, nothing more easy, just send the exact amount 105 NXT to LotJan2015.

If no winners for the Jackpot, it goes credited to the next lottery period.

The computation of your TicketNr is straighforward, it is the attributed in the same sequence as the incoming ticket buying transactions in the lottery account. 

Buying a ticket after the deadline means you are buying for the next period, it means also that the ticket numbering starts afresh with TicketNr 1.

You cannot buy more than one ticket at a time in a single transaction, you have to make many transactions if you need more tickets.

You cannot resell or give away your tickets, it remains attached to the sending Nxt account (via the transaction Id).


Monthly Test Case Lottery  January 2015

Already 9 tickets sold, prize money is now 900 NXT !

Still a very small lottery, but working fine. Thanks, all of you.
« Last Edit: January 17, 2015, 07:23:24 am by SwissAlps »
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

capodieci

  • Hero Member
  • *****
  • Karma: +256/-19
  • Offline Offline
  • Posts: 1360
  • BlockchainZoo.com
    • View Profile
    • ZooBC - Advancing Blockchain Technology
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #4 on: January 05, 2015, 06:11:22 am »

Ah, too bad I saw this tread only now, I would have bought the other tickets too.

Still I been to both account marketplace, but no tickets on sale there...



Logged
- Decentralised Business Network: DeBuNe -
Will be implemented on
ZooBC.com - Join the forum ZooBC.org - By Blockchain Zoo

capodieci

  • Hero Member
  • *****
  • Karma: +256/-19
  • Offline Offline
  • Posts: 1360
  • BlockchainZoo.com
    • View Profile
    • ZooBC - Advancing Blockchain Technology
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #5 on: January 05, 2015, 06:13:09 am »

To buy a ticket, nothing more easy, just send the exact amount 105 NXT to LotJan2015 or 1'050 NXT to LotYear2015. You can compute your ticket Nr by dividing the account balance by 1'000, after your transaction has been validated.

Oh, I see this now. Man, I need more coffee...
Logged
- Decentralised Business Network: DeBuNe -
Will be implemented on
ZooBC.com - Join the forum ZooBC.org - By Blockchain Zoo

capodieci

  • Hero Member
  • *****
  • Karma: +256/-19
  • Offline Offline
  • Posts: 1360
  • BlockchainZoo.com
    • View Profile
    • ZooBC - Advancing Blockchain Technology
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #6 on: January 05, 2015, 06:16:45 am »

Ok, sent. The balance/10 to calculate my number is the balance BEFORE or AFTER my deposit?



So my number is 85? or...

R
Logged
- Decentralised Business Network: DeBuNe -
Will be implemented on
ZooBC.com - Join the forum ZooBC.org - By Blockchain Zoo

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #7 on: January 05, 2015, 06:38:16 am »

Code W1 Weekly Test Case Lottery
  • account alias  LotteryW1
  • account NXT-AFG7-MPFY-7ATW-D96FQ
  • ticket price 105 NXT
  • deadline for buying tickets : every saturday (important: always GMT)
  • ticket draw every sunday

To buy a ticket, nothing more easy :

- just send the exact amount 105 NXT to LotteryW1 (account NXT-AFG7-MPFY-7ATW-D96FQ)

Your lottery TicketNr is attributed from 1 to N, using the same order as the list of incoming 105 NXT transactions in this lottery account, starting every sunday. Example: You are the first to buy a ticket on a Monday, and Sunday already 4 tickets were sold, then your TicketNr would be 5.

And now the goodies, we have a new feature now in these lotteries, the Jackpot.

And it doesn't cost one dime more.

NEW : JACKPOT 3'060 NXT

Each time you buy a ticket, you can also try to crack the jackpot. For W1, the jackpot is now 3'000 NXT.

For more info about this, the Jackpot Rules post https://nxtforum.org/index.php?topic=7143.msg145999#msg145999
« Last Edit: January 17, 2015, 07:25:11 am by SwissAlps »
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #8 on: January 05, 2015, 06:51:27 am »

Jackpot Rules
  • When you buy a lottery ticket, you can add in the message a 2 digits number from 00 to 99
  • The weekly draw nr is 7 digits large, it was for example 9072747, and our jackpot nr are the last two digits, so the jackpot would be split between all tickets who have 47 in their message
  • If no winners, the jackpot goes to the next week draw
  • Ten percent of the prize money is set aside for the following jackpot, this means the jackpot start to increase if no winners
  • Make sure that your message is NOT encrypted, the other players must have a way to see them
« Last Edit: March 03, 2015, 09:44:53 am by SwissAlps »
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #9 on: January 05, 2015, 06:59:30 am »

Do not want to disadvantage players that have already bought a ticket :

exceptionally, they can send a message to the lottery account,  with their chosen Nr, one only per bought ticket. Normally these messages have to be part of the buying transaction.
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

whatnxt

  • Hero Member
  • *****
  • Karma: +48/-8
  • Offline Offline
  • Posts: 502
    • View Profile
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #10 on: January 05, 2015, 11:01:34 am »

Do not want to disadvantage players that have already bought a ticket :

exceptionally, they can send a message to the lottery account,  with their chosen Nr, one only per bought ticket. Normally these messages have to be part of the buying transaction.
Are you referring to people who bought Monthly and yearly tickets?
Logged
NXT-UAPC-3T43-FFT6-HW5BZ

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #11 on: January 06, 2015, 09:23:37 am »

Do not want to disadvantage players that have already bought a ticket :

exceptionally, they can send a message to the lottery account,  with their chosen Nr, one only per bought ticket. Normally these messages have to be part of the buying transaction.
Are you referring to people who bought Monthly and yearly tickets?
Yes, exactly.
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #12 on: January 06, 2015, 09:36:24 am »

Ok, sent. The balance/10 to calculate my number is the balance BEFORE or AFTER my deposit?



So my number is 85? or...

R
TicketNr 8

I agree, seems too complicate. I update the conditions a bit to better explain this.

The TicketNr is simply the same as the order that you can see when you list the transactions of the lottery account.

The first transaction with 105 NXT gets TicketNr 1, the next, TicketNr 2, etc... 

After a draw has been done, we start afresh attributing the ticketNr from position 1, this means for example that for the weekly W1 lottery, if your are the first to buy a ticket on a Sunday (Saturday night is the last possible ticket buy for a specific week, the draw for W1 is always on Sundays), you will be attribute the TicketNr 1.
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

capodieci

  • Hero Member
  • *****
  • Karma: +256/-19
  • Offline Offline
  • Posts: 1360
  • BlockchainZoo.com
    • View Profile
    • ZooBC - Advancing Blockchain Technology
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #13 on: January 06, 2015, 09:41:29 am »

TicketNr 8


Oh, ok...

I agree, seems too complicate. I update the conditions a bit to better explain this.


Why you just don't sell the tickets as store products? And when delivering the goods you send the ticket#?

R
Logged
- Decentralised Business Network: DeBuNe -
Will be implemented on
ZooBC.com - Join the forum ZooBC.org - By Blockchain Zoo

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #14 on: January 06, 2015, 10:14:34 am »

TicketNr 8


Oh, ok...

I agree, seems too complicate. I update the conditions a bit to better explain this.


Why you just don't sell the tickets as store products? And when delivering the goods you send the ticket#?

R

Very good question.

CasinoTool principal objective is to create of few tools, open source, written in simple JavaScript, that would allow anyone that want to start a new gambling game to do it with the lowest possible investment of time and technical complexities; this is the NxtInside part of the project.

If we can incite a lot of third parties to start lotteries and other gambling games, pokers, roulette, that use NXT as underlying backbone, then we have fullfilled the important goal of thousands of new NXT users.

We try to increase the value of NXT; the real value of CasinoTool will be automaticall derived from this. Of course if we can also find ways to add a bit to this value, we will do it.

Example : The W1Lottery was started and implemented in less than ONE HOUR !

Nxt tools are already very great, just as they are (the AE is a big plus); we just need to show other people how to use them.
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #15 on: January 07, 2015, 08:56:32 am »

Hi everybody, here is the first tool provided by CasinoTool, whoa !

As I said somewhere else, I just started learning JavaScript, HTML and all these nice little things, so this little HTML page needs a little work to make it nicer, and  we will implement better looking versions.

To do this, we need devs, not high specialised guys, but obviously a bit more than my current state. Just PM me if you think you can help.

But the thing works, and shows well the difference between using your localhost or calling external peers (thanks, Jones work). 

To use it, copy it locally somewhere on your machine, and use your browser to call it (this message is for people that have even less knowledge than me !).

TOOL 1 : How to display the detailed transactions of all the TestCase Lottery accounts
Code: [Select]
<!DOCTYPE html>
<html>

<head>
<title>CasinoTool Show Lottery Transactions</title>
</head>
<body>

<h1>CasinoTool Show Lottery Transactions</h1>
<h2>Calling your own blockchain</h2>
<p>Use the following if you have started the Nxt client on your machine.</p>
<p></p>
<form method="post" action="http://localhost:7876/nxt?requestType=getAccountTransactions&account=NXT-CDB6-V476-PRLC-CC9VJ">
  <input type="submit" value="Code Y1 Yearly Testcase Lottery, account NXT-CDB6-V476-PRLC-CC9VJ"/>
</form>
<p></p>
<form method="post" action="http://localhost:7876/nxt?requestType=getAccountTransactions&account=NXT-QP3U-8ZPR-E48D-FCVW2">
  <input type="submit" value="Code M1 Monthly Testcase Lottery, account NXT-QP3U-8ZPR-E48D-FCVW2"/>
</form>
<p></p>
<form method="post" action="http://localhost:7876/nxt?requestType=getAccountTransactions&account=NXT-AFG7-MPFY-7ATW-D96FQ">
  <input type="submit" value="Code W1 Weekly TestCase Lottery, account NXT-AFG7-MPFY-7ATW-D96FQ"/>
</form>
<p></p>
<p></p>
<h2>Calling Jones blockchain</h2>
<p>Use the following if you want to call other blockchains from stable peers on the internet.</p>
<p>This is less secure because you don't know
if the blockchain info you are getting reflects the real state.</p>
<p></p>
<form method="post" action="http://jnxt.org:7876/nxt?requestType=getAccountTransactions&account=NXT-CDB6-V476-PRLC-CC9VJ">
  <input type="submit" value="Code Y1 Yearly Testcase Lottery, account NXT-CDB6-V476-PRLC-CC9VJ"/>
</form>
<p></p>
<form method="post" action="http://jnxt.org:7876/nxt?requestType=getAccountTransactions&account=NXT-QP3U-8ZPR-E48D-FCVW2">
  <input type="submit"  value="Code M1 Monthly Testcase Lottery, account NXT-QP3U-8ZPR-E48D-FCVW2"/>
</form>
<p></p>
<form method="post" action="http://jnxt.org:7876/nxt?requestType=getAccountTransactions&account=NXT-AFG7-MPFY-7ATW-D96FQ">
  <input type="submit"  value="Code W1 Weekly TestCase Lottery account NXT-AFG7-MPFY-7ATW-D96FQ"/>
</form>

</body>
</html>
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #16 on: January 08, 2015, 05:38:50 am »

For the moment, we will take the Joker from the portuguese state lottery, as seen at the following link http://www.alllotto.com.pt/  They draw it every sunday, I do not know exactly at what time. It's 7 digits. The next draw is Sunday Jan.11
CasinoTool : Weekly Testcase Lottery (code W1) Draw is on Sunday Jan.11

Question : How do we know the winning TicketNr using this ?

Answer : x = total nr of tickets sold during the week (let's say it is 17)
             y = the draw (last draw on Sunday 4th was 9 062 747)
             r = remainder of the division y / x   (r=13)
             Winning TicketNr = r + 1 (Winning TicketNr 14)
 
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #17 on: January 09, 2015, 05:30:19 am »

CasinoTool : Weekly Testcase Lottery (code W1)

Remember, the first NXT lottery draw will be next sunday, deadline to buy W1 tickets saturday night !

And may be you can crack the 3'000 NXT jackpot ! 

GOOD LUCK TO ALL
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #18 on: January 09, 2015, 06:52:44 am »

For the moment, you find here all the JackpotNr bets for the W1 lottery

Account  JackpotNr
NXT-X3LR-Y26X-EYF9-FEGH5   346
NXT-PYRJ-PZ6R-S6UV-9EGC8   invalid, has sent an encrypted message !   :( ???
NXT-SBSP-BPHH-E7BR-9USXU   007
NXT-XFAH-7N9C-6AS6-B3GLZ   379

We will later have a tool to tally and show them automatically. For the moment, it's done by hand.

If one of these numbers matches the last 3 digits of the future sunday draw, he gets the jackpot !  3'000 NXT !

I hope it will be 007, it's my fetish number... ;D
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...

SwissAlps

  • Hero Member
  • *****
  • Karma: +31/-16
  • Offline Offline
  • Posts: 519
    • View Profile
    • NxtTracker.com
Re: CasinoTool : THE LOTTERY PROJECT
« Reply #19 on: January 10, 2015, 06:20:04 am »

CasinoTool

Today is the last day if you want to be part of the first Nxt W1 Testcase Weekly Lottery.

You should really try it. Why ?  First, because it's fun; second, because it could very well be the case that sometimes in the future, if we decide to launch an IPO, you would see a block of shares with special conditions dedicated to the first n accounts that were using the TestCase Lotteries !!!  :) 

Draw tomorrow Sunday, around midday (don't know the exact the time), see http://www.alllotto.com.pt/

TicketNr    AccountJackpotNr
1NXT-XFAH-7N9C-6AS6-B3GLZ    379
2NXT-SBSP-BPHH-E7BR-9USXU    007
3NXT-PYRJ-PZ6R-S6UV-9EGC8    invalid, has sent an encrypted message !
4NXT-X3LR-Y26X-EYF9-FEGH5    346
Logged
CryptoNanoPay project
Note that the "Barter Point" test has just started...
Pages: [1] 2 3 4  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly