Auto Adjust Pos Ticket Script

Discussion in 'Solo Mining' started by toad, Mar 5, 2016.

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

    toad New Member

    Feb 9, 2016
    40
    14
    Male
    Hello,

    I've been PoS mining since launch on a Raspberry Pi backed up by a UPS and everything seems to works very well, except... That it pisses me off to daily check the ticket price over dcrstats.com and adjust my wallet command accordingly.

    Right now, it is set to: ./dcrwallet -u ''username'' -P ''password'' --walletpass ''password'' --enablestakemining --balancetomaintain=1 --ticketmaxprice=7

    Because the average price is 6.68DCR ATM. You get the point.

    What wound be very nice is script that checks dcrstats.com for the next ticket price adjustment and set your ticketmaxprice at the average, automatically.

    I'am quite good in C/C++ but the web interaction isn't my cup of tea. Any help would be appreciated!
     
  2. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    You are making this way to hard. Just set your max ticket price to whatever price you are comfortable buying stakes for and leave it be. If 7 is your number fine. If 12 is your number fine. As long as the stake ticket price is below your --ticketmaxprice you will buy stakes. Simple. Why change it so much?

    Now if you can figure out how to adjust the --settxfee to what the current average is I am all ears. That would be much more useful.
     
  3. toad

    toad New Member

    Feb 9, 2016
    40
    14
    Male
    I don't really agree. If I have 1000DCR is my PoS wallet and I set my max at 12 and it goes up at 11.9 (while the average is 7), it would purchase about 84 tickets at that price. If we follow the average and at the next correction it goes down at 6.5, for the same 1000DCR I would get about 153 tickets.

    Maybe it's me that don't understand something? I've been mostly in BTC, LTC and ETH so far. That's PoS thing is new to me.
     
  4. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    If you dont want to buy tickets at 11.9 then dont set your maxticketprice to 12. If you want to buy tickets at 7 or less then set it to 7.001. You will only buy tickets at or below your max ticket price. Why change it if you are not willing to buy tickets at 7.1DCR? If you set it to 7 but you are willing to buy at 7.3 then set it to 7.301.
    Why do I say adjust the settxfee over this? Because if your settxfee is .02 and average settxfee is .075 with a max of .1 you may never buy a ticket even if you set maxticketprice to 7 and stake tickets are 2.75DCR. Your sstx purchase will be put at the end of line every block.
     
    michael sørensen likes this.
  5. toad

    toad New Member

    Feb 9, 2016
    40
    14
    Male
    I understand your point of the tx fees, it makes sence. But what makes even more sence to me is the idea of maximazing an automated process to have even more rewards out of it. I'll definitely consider the tx fee in my script.
     
  6. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    My only point was the stake ticket price only changes every 12 hours. The settxfee can and does change at any moment. If you want to keep buying stakes you need to watch the txfee more closely than the ticket price. Then like any astute auctioneer you set your price and dont deviate from it. if you are only going to buy tickets at or below 6DCR with .05 txfee you can set it and that is what it will do. The ticket price will not change for 12 hours. You will not buy tickets at anything over 6DCR. But you can skim even more little profits by buying stakes at .005 txfee when the pool is empty.

    On a side note automating all this will end up being a battlefield of volatility and lost liquidity. It will eventually end up costing more to do transfers. Just look at what HFTs did to the equity market.
     
  7. gravityz3r0

    gravityz3r0 New Member

    Feb 28, 2016
    83
    13
    Hmm, i'm not buying any new tickets now (for the past 12 hours) no matter how high i set the maxtixprice to, is it because of the txfee? dcrstats said that the avg txfee is 0.05 which is what i have at the moment by default setting.

    my spendable balance is about 21DCR. Why is it not buying?
     
  8. toad

    toad New Member

    Feb 9, 2016
    40
    14
    Male
    Maybe your wallet is locked?
     
  9. gravityz3r0

    gravityz3r0 New Member

    Feb 28, 2016
    83
    13
    No, i made sure that my wallet is unlocked everytime it's launched, it was buying ticket fine yesterday. Even voting has no issue. I only realize it stopped buying a few hours ago when my spendable balance keep increasing instead of being spent right away.
     
  10. michael sørensen

    Translator (Dansk)

    Jan 1, 2016
    130
    62
    Male
    I had --balancetomaintain set to "0", at first. - It worked until I updated to version 0.0.5 of the binaries.
    - After I updated, it stopped buying tickets, until i set it to "1".

    So you could always check if that's what's going on for you.
     

Share This Page