Ticket Price Calculation

Discussion in 'Tickets' started by dave, Mar 1, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. dave

    dave New Member

    Jan 11, 2016
    27
    10
    How is the ticket price calculated? I can't seem to find that info anywhere.
     
  2. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
  3. sw1

    sw1 Jr. Member

    Dec 31, 2015
    90
    39
    Male
    Sydney, Australia
    you mean payout or actual price?

    Payout is a % of block.

    price is based on difficulty formula calcNextRequiredStakeDifficulty

    see details here:
    https://dcrstats.com/
     
  4. dave

    dave New Member

    Jan 11, 2016
    27
    10
    no, i mean actual price. I saw the code, I was hoping that it was written somewhere in english/math terms so i don't have to try to figure it out from there.
     
  5. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    It looks at the last 144 windows of 20 blocks, and calculates the price based on if the ticketpool is higher or lower than the target (~40k) over that range. Then the price is adjusted to try to keep the ticketpool at the target. The ticketpool is restrained to go -5 or +15 / block, so the formula checks what trajectory it's been on, and adjusts the difficulty using the geometric mean. Reading the code is the only precise definition at the moment I'm afraid, if you want to convert into a maths formula then I'm sure people would appreciate it.

    As a rule of thumb, you just look at direction of poolsize, and know the difficulty will adjust to counter the movement. Poolsize increasing means difficulty goes up, poolsize decreasing means difficulty goes down.
     
  6. Dyrk

    Dyrk Sr. Member
    Developer

    Jan 7, 2016
    518
    376
    Male
    Wonderland
    I tried already to port difficulty.go to JS, but I didn't succeed, because I stucked in some go-stuff which I don't understand. I need some time to learn go, then I'll make second attempt.
    At the end I want get a JS lib which can predict next price using data from public API. All necessary data already collecting to dcrstats DB, so it's only a question how to handle it in JS for web.
     
  7. root

    root Member

    Feb 3, 2016
    381
    76
    if you do not mind a RPC call, I believe it would be easy to prepare using available golang codebase.
     
  8. 418Sec

    418Sec Member
    Advocate (Twitter)

    Jan 3, 2016
    122
    65
    Male
    I think its the number of tickets being bought in the last round before it readjusts are value of a ticket.
    Also it takes into account how many tickets are there , more than 40960.
     
  9. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    If this is factual it would seem like this could skew results as people are cramming in tickets before the next change?
     
  10. 418Sec

    418Sec Member
    Advocate (Twitter)

    Jan 3, 2016
    122
    65
    Male
    That's what I have noticed.
    See atm, not many people are buying tickets, https://mainnet.decred.org/blocks <--- Fresh stakes per block is around 0-2
    and
    at the moment TICKET PRICE:9.61 DCR
    So I predict the price will fall at least to 6 DCR after two hours when the price is recalculated.

    Let's wait and see. :p
     
  11. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    But the PoS pool is above 40960. So it should increase regardless of how many ticket people are buying?!? It should go up more, possibly above 10?
     
  12. 418Sec

    418Sec Member
    Advocate (Twitter)

    Jan 3, 2016
    122
    65
    Male
    Even I had thought so,
    but last time it was at around 7.65 the pos pool was around 41500+ , but no one was buying tickets anymore.
    and the next adjustment resulted in the price becoming 6.33 and then 4.22 .
    So I feel how tickets are bought in the last round is factored into, determining the next adjusted price.

    Lets wait and see the next price, 7 more blocks left ~33 mins.
     
  13. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    #13 drunkenmugsy, Mar 2, 2016
    Last edited: Mar 2, 2016
    So it went down .3. We were both wrong. Still not sure exactly how this works I guess. Other than the pool was only slightly above 40960 so it only went down a little bit as there was not very heavy stake purchase pressure?
     
  14. 418Sec

    418Sec Member
    Advocate (Twitter)

    Jan 3, 2016
    122
    65
    Male
    Its gonna fall..
    I think it counts the number of tickets becoming mature in a round.. :3
    I will wait another round and see.
     
  15. .m.

    .m. New Member

    Jan 23, 2016
    55
    10
    wow, ticket price is falling to 17 :)
     
  16. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    I predict it will be close to 20. Let's see!
     
  17. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    Someone doesn't want the price to go below 20!

    In other news, the devs premine is very close to being equal to the total locked in DCR.
     
  18. root

    root Member

    Feb 3, 2016
    381
    76
    I have a feeling @davecgh 's prediction was not just a plain guess ;) I pray every day for us poor stakers to have cheap tickets again. We shall start a thread to invoke gods and daemons of cryptocurrencies.
     
  19. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    Cheap tickets means you need to increase your fee to get them though, which means you won't make any more profit, really.
     
    Johnshpon3 likes this.
  20. root

    root Member

    Feb 3, 2016
    381
    76
    Well, it really depends ;)
    How much would you say the minimum ticketfees were for ticket price below 18 a week ago ?
     

Share This Page