Hey sorry I was trying to post when the forum went down and then I got distracted. HEre's what I had written:
======================================================================\
No worries,
Honestly you are worth the coins for setting it up. Why haven't 'reservations' updated with ticket purchases? Or am I looking at the wrong thing?
This part is different for sure.
Reservations are the number of people that have submitted prize addresses (and received reservation addresses) to the drawing.
Each reservation address will have tickets calculated for it, according to the deposits sent to that address, at drawing time.
Here's a breakdown:
When a user submits a payment address on the front page, a reservation address is created, and paired with that payment address in the database.
- That reservation address can accept payments until the drawing. In fact, you can send payments to that reservation address from any other payment address, all of the tickets created at drawing time will be counted towards the same payout address that was originally used to generate the reservation.
There are a couple of potential uses for this. First of all if you can get their reservation address (or just create one using their account) you can buy tickets for friends or other people - you can pass out your own reservation address in hopes that others will buy you tickets.
An individual (let's say a coin foundation or dev) could create a reservation and then ask supporters to buy tickets in hopes of receiving the jackpot.
Who knows what people will come up with.
Does that part make sense?
So the number of reservations on the page tells you how many players (payout addresses) are trying for the pot.
It doesn't tell you about the number of tickets that each reservation has.
Also, back with the donations. The donations are not associated with a reservation or any tickets. The size of the prize pool is disconnected from the number of reservations or the number of tickets.
So, when the drawing comes, the reservation addresses are scanned for deposits. Only the reservation addresses not donation addresses.
The deposits that have made at least one confirmation into the reservation accounts are divided by the ticket price into a number of tickets for that particular reservation.
When all reservations have had their deposits counted, the drawing for 5 winners is performed against the list of tickets in the order of 1st, 2nd etc..
After the tickets have been drawn, the script checks the specific account for this drawing in the wallet.
This balance should contain all deposits to correct reservation addresses (ticket sales). It should also contain any donations that were received for this drawing. It may contain other seed funds from us - and there may be odds and ends, I have people sending fractional coins in their deposits. These fractional coins do not result in an additional ticket (floor not round) but they do get divided in and distributed amongst the winners.
So now we have our winners and our total revenues for this drawing.
Balance * .9 = prize fund.
Balance * .09 = "The Rake"
The remaining .01 sits around in the general wallet balance until it's either large enough for us to split manually, or eaten by TX fees. I think there has to be a hedge before we write a sendmany with 5 outs and 3k inputs or something crazy.
So, without some manual wallet prowling and a bit of math, I don't even know how many tickets are actually being sold once I have given out a donation address or things vary from 1/1 with prize pool and reservations.
I can simulate the drawing logic until it produces a ticket count, but so far I've considered doing this realtime to be a little resource intensive.
You never know how many tickets are sold in a gov'mint lotto anyways, heh.
Sorry for the long ramble. I'm trying to get this all sorted and clarified so that I can write some good copy for the site and it helps me to explain it a few times.
===================================================================
Why haven't 'reservations' updated with ticket purchases? Or am I looking at the wrong thing?
"Reservations" is the amount of
people who have entered. So right now there are 7 people who have entered tickets into the lotto.
I don't think it displays anywhere the amount of individual tickets have been purchased, but you can assume there's at least 4769.
FTR: Before I entered the prize was 14.something, I assume there was maybe 15 tickets. Then I added 50 and it looks like r3wt threw in 5000. That's 5065 I know of.
Edit: Almost forgot, you can see the exact amount of tickets after the draw is over on the history page. The first round had 15 tickets:
http://lotto.coinworld.us/test/history.phpYeah you've got it basically right, the breakdown above should clarify a little. It looks like someone may have tossed in some odd amounts just to see what happens.
Thee amount shown in the prize banner is (deposits + donations (5005 NAN I know of) * .9)