Building Coin/pool switching software for Cryptonight Coins - what coins/pools would you pick?

Discussion in 'Cryptocurrency Mining and Markets' started by garetjax, Feb 21, 2018.

  1. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Tinkering with a script for my Vega rig. Looking to use CryptUnit - Hi. What are you mining today? or whattomine to determine best performing coin. I manually look at profitability when I can and figured I should really automate it. Looking to make it work with XMR-STAK and JJ's monitor script used in the guide Marsh posted in his Vega Performance post. Could make it work with anything really this is just a simple starting point.

    In addition might just spin up a website to graph/log historical performance - ie best current profit/ current difficulty ratings in whattomine for example which I believe is updated every 3 mins. I need to download it anyway so that it might be nice to graph and share. Would really want that to look at how often to switch coins etc.


    Do people have any recommendations for the following or other coins to add as well? I am listing what I use and am open to recommendations.

    Aeon - STH pool
    Monero - MineXMR
    Sumocoin - sumopool.sonofatechcom
    Dinastycoin
    Electroneum
    Niceshash - Cryptonight
    Karbo
    Bytecoin
    DigitalNote
    Turtlecoin

    Others?

    Thanks
     
    #1
    Marsh likes this.
  2. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    10,967
    Likes Received:
    3,922
    Just as a thought (if you wanted to) using the xmrig-proxy docker image you can essentially use that to do the pool swapping. All you really need is the logic to find most profitable someone wants to mine (e.g. someone may only want ETN/ XMR for example.) And then trigger the appropriate Docker image launch and you can switch in about a second.

    That was the purpose of the docker image (https://forums.servethehome.com/index.php?threads/sth-xmrig-proxy-for-docker.18767/ ) and why it is setup the way that it is to download config files. That is also much easier than doing it at the miner level, especially once you have more than one rig.
     
    #2
    iamtelephone likes this.
  3. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Patrick would love to use docket but Vegas are windows only for now.
     
    #3
  4. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    10,967
    Likes Received:
    3,922
    You can use a Windows miner. You then connect to the host or VM running docker and the proxies.

    Think of it Miner to proxy to pool(s) instead of miner to pool directly.
     
    #4
  5. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Thanks Patrick. I only have 1 linux miner - my Deep Learning box but I can try the proxy on that. Just started collecting some data. Kinda interesting seeing how often profit spikes - only about 25 datapoints per coin in this one. This is plotting current revenue in btc from whattomine

    coins.png
     
    #5
  6. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    10,967
    Likes Received:
    3,922
    If you want a Linux VM to run the proxy, I can see if we can get one setup.
     
    #6
  7. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Patrick,

    Thanks so much but I think I'm good - I'll set it up on my deep learning box. I also have a nuc sitting around doing nothing at the moment that could also be used. I'm using the STH aeon and zcash docker images on the deep learning box right now.
     
    #7
  8. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Digging more into the data - whattomine often has lagging data. I'm updating from them every 3 minutes and most of the time at least one of their 8 cryptonight coins has stale ie old data. The timestamp in the first column is from whattomine - I am just converting it in the 2nd column.

    In the 2nd graph I smoothed out the times by setting them all to the time I pulled the data ie 11:39, 11:41 etc. What is really interesting is if you look at the best performing over these 2 hours Karbo, it has 40%+ swings in earnings (in btc) which is huge.

    coins-timestaps.png coins2.png
     
    #8
    Last edited: Feb 23, 2018
  9. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Ok some pretty cool data over 24+ hours. This is again whattomine data

    1st notice how flat these are - also note nicehash return is flat but pretty decent at around .006 btc.

    coins_flat_24h_v2.png

    Then lets look at the movers - electroneum, karbo, sumokoin. I also left in Nicehash. Notice the 30% above .009 btc swings above Nicehash with Karbo and Sumo you would be missing if you just did nicehash.

    coins_movers_24h.png

    Lastly lets add in dinasty coin that went nuclear in this 24 hours - earning 10x of the others from 4pm- 9pm in the .02 - .05+ range.

    coins_nuclear_24h.png
     
    #9
  10. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    Dynastycoin seems to be broken for a few days now.

    Electroneum has been down for deposits and withdrawls on cryptopia for several days, but is now trading on tradeogre (at roughly 5% lower prices than cryptopia and less liquidity)

    Slightly off topic -- Lux has been a good option for nvidia mining, but their wallet had a mandatory update the other day and cryptopia has not updated yet, so the block count can't advance until they fix it.

    Sumocoin is a great option for "coin hopping" as the profitability spikes for roughly 30 minutes every couple hours.

    Selling on nicehash probably doesn't make much sense, as it would be unusual for bids there to be above the underlying value of what's being mined. You could put it in rotation if you wanted to take advantage of price spikes on "crap coins" that you weren't interested in mining yourself. So maybe test it out but I wouldn't get my hopes up too much.

    Miningrigrental might be an option for selling (thanks to Patrick for letting me know about it). Set a rental price above what you expect to earn, and MRR should redirect your hash power to your backup pool of choice whenever your rig is not being rented. Haven't tried it out personally yet but may be an option.

    Intense and XLC sometimes have profit spikes, but are not very liquid. At least worth looking at, however.
     
    #10
  11. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    If you restart the docker container, does it redownload a new copy of the config file? That would be nice, to avoid needing to delete and recreate the container each time.
     
    #11
  12. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    Ideally you want to grab the difficulty data straight from the blockchain. However, it would be easiee to use the API of the pools you are connecting to. Caveat -- the pool displayed difficulty lags by one block.

    For price, you want to pick an exchange you actually plan to sell on, and look at the best bid price. This is what you can actually sell for. The last trade price and the bid price can vary quite a bit at times.
     
    #12
    Patrick likes this.
  13. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Thanks for all the advice Funkywizard. Basically the purpose of this initially was that I would look at Aeon or Monero etc at several times a day and just use the "Estimate my Profits" based on my hashrate and change my miners accordingly manually . However it would fluctuate a lot so why not try and automate it so I can set it and forget it.

    I'll probably whip up a POC - proof of concept and then refine as I go. Bid prices in btc would be good - just want to switch for the pops and avoid the drops. I would have to do the full calcs taking in changing difficulty/net hashrates etc as well.

    Whattomine is easy for a POC because it already pulls from multiple exchanges.

    If POC works then I'll make it work with Patrick's proxy/docker setup which would be the final goal.
     
    #13
  14. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    10,967
    Likes Received:
    3,922
    Yes.

    The tradeoff is that if you have a dirt slow http server that has a TTFB of 1s, that will slow your restart greatly.

    @funkywizard I have been using MRR on a few boxes (up to 5 now across 3 algorithms.) I may put up a 6th today.

    Here is the bit that is interesting, If you do not want to hold a small 51% able coin (e.g. what happened to Turtle), MRR essentially gives you better than XMR payouts in BTC, LTC, ETH or DASH. I still have not had anyone pay in Dash but have taken the other three.

    When they are not used, I can direct hashing power elsewhere. For the GPU side especially this is awesome since people will mine the newest XYZ coin and you tend to earn higher than other larger coins that are out there.

    The negative with this approach is that you are essentially taking lower volatility coins. It takes a lot more for LTC to double than some small coin. The plus side is that your payout has many exchange options. While Turtle may be hard to convert, BTC, LTC, and ETH can go directly to Coinbase.

    Still experimenting, but if you want better than mainstream GPU mining profits and payout directly in a larger coin, this works well. MRR also has a lower fee than NH which is nice and the payments for miners have been a bit higher.

    If anyone wants to try MRR here is my referral link.
     
    #14
  15. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    For Aeon, Monero, Electroneum, data out of date a half hour, or off by a few percent, is no big deal. These are relatively stable minute-to-minute.

    For Sumokoin, Intense, Dynastycoin, etc, you want the best data up to the minute. Sumo can be 50% more profitable for 30 minutes, and 50% less profitable for 2 hours. One block can be difficulty 3.5 billion, the next 4.5 billion, and the next 6 billion or more. Being behind the curve by even one block leaves money on the table. As well, the bid/ask spread can be huge. If the last trade price shows 0.000315 but the best bid is currently 0.000265, that can make a big difference in which coin I want to mine.

    So that's a bit of a special case, that may or may not apply to you.

    As well, if you trade on exchange A, but the whattomine price heavily weights the price on exchange B, then the whattomine price is not terribly helpful to you. Better to pull down price data from the exchange you plan to use.

    POC + refine + iterate makes total sense. I suggest making the price and difficulty gathering function as modular as possible. Make it easy to change those bits out later, and improve them as necessary.
     
    #15
  16. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    TTFB is something to watch out for, good point. For me I doubt I'll have an issue with it. Biggest things there, in order:

    -- proper working dns server / properly configured dns for domain / properly configured dns client on xmrig-proxy server
    -- end-to-end network path without packet loss (connection from xmrig proxy to dns server, and to http server), and with acceptable latency
    -- web server that's not overloaded

    If you're new to operating web infrastructure, or have to use shared infrastructure, these can be issues. On the other hand, if your proxy, dns server, and web server are all on the same dedicated vps or dedicated server, and appropriately configured, should be no issue at all.

    Regarding MRR, makes sense to me. I really need to give MRR a try. Sitting on coins I can't sell because of exchange problems pretty much sucks.
     
    #16
  17. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    Also should mention, if the http server ip address is not expected to change, you can put the ip in the url instead of a domain. Then dns resolution times will not be an issue.

    Alternately, use a domain, but, put the ip mapping into /etc/hosts -- then no dns lookup will be needed, and you can update the target IP without recreating the docker container.

    A proper dns setup is the most flexible and maintainable solution, but if you care about every millisecond, using a hard coded IP or /etc/hosts entry will eliminate dns lookup latency altogether.
     
    #17
  18. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Hoping to test the alpha version tomorrow. Actually started testing tonight but hit a bug I need to fix and its scotchy scotch time.
     
    #18
  19. funkywizard

    funkywizard mmm.... bandwidth.

    Joined:
    Jan 15, 2017
    Messages:
    507
    Likes Received:
    215
    Might want to take electroneum out of rotation until they fix their chain fork issues.

    That said, the difficulty is way down on the "old chain" (chain using the older daemon that's actually working), so if you like your odds on that becoming the official chain, and in ETN maintaining value after this debacle, profitability is pretty high on it right now.
     
    #19
  20. garetjax

    garetjax Member

    Joined:
    Nov 26, 2017
    Messages:
    79
    Likes Received:
    19
    Alpha is running - I'm just using 4 coins right now - sumo, xmr, etn, karbo for the test. I am building another nvidia rig that will be on linux for testing with Patrick's proxy and docker images. Basically you just add the coins/wallets you want to mine, and the script will go down the list of most profitable coins looking for a match of coins you mine and then switch to that coin.

    Also want to look doing more than just cryptonight on linux/nvidia ie switch miners (launch appropriate docker miner image) as well when not doing a cryptonight coin when something like zec etc is more profitable at the moment.

    Need to look at proper formulas and using exchange api's to get data directly - and for more coin types.
     
    #20
    leebo_28 likes this.
Similar Threads: Building Coin/pool
Forum Title Date
Cryptocurrency Mining and Markets Building the next-generation STH Aeon Docker Image Jan 9, 2018

Share This Page