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

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

leerees

Member
Feb 15, 2018
51
2
8
44
I'm having real trouble understanding this.

Lets say you are mining sumo coin and it goes up 50% for 1 hour, difficulty then increases and in that hour you get less sumo coins but more "money", after that hour the price goes back to normal.

Unless you sold your sumo coins in that hour surely you have actually acquired LESS sumo coins and are in fact down.

To re-iterate, unless you physically sell your coins you haven't actually crystallized any profit. When you sell your coins the amount to get paid is based on the price of them at the point of sale.

With that in mind surely the goal of mining is to mine the coins with the lowest difficulty so you can get more coins in less time.

Am I missing something here?
 

ServeTheSam

Member
Dec 10, 2017
38
14
8
I'm having real trouble understanding this.

Lets say you are mining sumo coin and it goes up 50% for 1 hour, difficulty then increases and in that hour you get less sumo coins but more "money", after that hour the price goes back to normal.

Unless you sold your sumo coins in that hour surely you have actually acquired LESS sumo coins and are in fact down.

To re-iterate, unless you physically sell your coins you haven't actually crystallized any profit. When you sell your coins the amount to get paid is based on the price of them at the point of sale.

With that in mind surely the goal of mining is to mine the coins with the lowest difficulty so you can get more coins in less time.

Am I missing something here?
The goal of this project is to automatically switch to, and ultimately predict, the most profitable coin at any given time. Difficulty can vary significantly per every block whereas price fluctuations are not directly related to any specific difficulty at any given time (although the case can be made that higher difficulty tends to benefit the perceived viability/strength of a particular coin, this is not necessarily relevant here).

The goal is always to get more coins in the most efficient manner possible. Looking at your example another way, if sumo were the most profitable at time X, and the market value declined at time Y while difficulty remained unchanged, it may no longer be the most profitable - irrespective of difficulty - and in that event we would switch to another coin.

Hope this helps.
 
  • Like
Reactions: leerees

leerees

Member
Feb 15, 2018
51
2
8
44
The goal of this project is to automatically switch to, and ultimately predict, the most profitable coin at any given time. Difficulty can vary significantly per every block whereas price fluctuations are not directly related to any specific difficulty at any given time (although the case can be made that higher difficulty tends to benefit the perceived viability/strength of a particular coin, this is not necessarily relevant here).

The goal is always to get more coins in the most efficient manner possible. Looking at your example another way, if sumo were the most profitable at time X, and the market value declined at time Y while difficulty remained unchanged, it may no longer be the most profitable - irrespective of difficulty - and in that event we would switch to another coin.

Hope this helps.
But do you not see that the coin is only more profitable if you sell it at that exact point in time

for example: monero is at $1. The price goes upto $1.50 as does difficulty so we switch to that to mine, we mine for an hour but after an hour the price goes back to $1. Unless we actually sold it we've actually accumulated less coins that are now worth less money.

What I'm looking for is something that does not include a dollar price in the equation.
 

ServeTheSam

Member
Dec 10, 2017
38
14
8
But do you not see that the coin is only more profitable if you sell it at that exact point in time

for example: monero is at $1. The price goes upto $1.50 as does difficulty so we switch to that to mine, we mine for an hour but after an hour the price goes back to $1. Unless we actually sold it we've actually accumulated less coins that are now worth less money.

What I'm looking for is something that does not include a dollar price in the equation.
The point at which anyone chooses to sell any coin is arbitrary and isn’t, at least in my opinion, a relevant measure here. Even if we had 100% consensus of everyone on the pool to sell immediately upon confirmation on the chain, we still would be price takers. A whale could jump in and take down the price of any coin. The trustee of the Mt.Gox debacle could decide to drop another $1 billion USD of bitcoin at market all at once and crush all the alt-coins in the process.

While your Monero example is accurate given the inputs you used, the two most important things to keep in mind here are 1) relativity and 2) efficiency.

Think about your example and hold price constant. Now for simplicity let’s add just one more coin into the mix, AEON. Let’s say both are at $1.00 USD but difficulty fluctuates. Monero diff is 2x Aeon in the mornings. Aeon diff is 2x Monero in the evenings. And you could even say that both Aeon and Monero difficulties are equal on Thursday’s.

The price of both coins stays at $1.00 USD all week long. So we mine these for exactly one week three different ways:

1. Monero all week.
2. Aeon all week.
3. Dynamic switching based upon the relative profitability of both coins.

Equipment and power costs notwithstanding, the cost of mining Monero is the opportunity cost of not mining Aeon, and vice versa.

Option 3 the most profitable on a relative basis and, thereby, the most efficient. If you were to sell all the coins mined after one week, you would notice that the true profit for options 1 and 2 are actually the same, while option 3 yields 86% more profit after 7 days. Actually, it also turns out that if you sold at any point in time within this given fantasy week, option 3 also guarantees that your true profit would also be the greatest (technically, at least equal to (during the first 12 hours only tho)).

If you are interested in some of the theory behind this, you might try googling “efficient frontier” and see if you find any of that worthwhile.
 
  • Like
Reactions: leerees

garetjax

Member
Nov 26, 2017
80
19
8
57
Great questions and answers.

Initially I just wanted to replicate what autoswitching programs like awesomeminer etc do - pulling best coins at the moment and mine them. However you have a great point - I am not selling them right away.

I could add an option for switching based on difficulty but still how do you determine what is best?

If its number of coins/day if you include something like Electroneum that will always be mined then regardless of difficulty.

For example:

Sumo: difficulty right now is 5,873,137,920, with my 8k hashrate I would mine 3.68 coins a day
Electroneum: difficulty right now 18,748,566,358, with my 8k hashrate I would mine 183.69 coins a day

I suppose you could track average difficulty per coin over a time period, looking for spikes/dips to change. So you would be tracking difficulty rates of change based on a coins average difficulty.
 

garetjax

Member
Nov 26, 2017
80
19
8
57
Been running it on vega rig for a few weeks. In the middle of setting up Linux rig. Will update soon.
 

onsit

Member
Jan 5, 2018
98
26
18
33
New version of xmrig-proxy will live reload on config file changes. Save you some headache with having to manage service state.
 

funkywizard

mmm.... bandwidth.
Jan 15, 2017
848
402
63
USA
ioflood.com
Legend:

CN = cryptonight "classic". Minable on ASIC and available on nicehash.

CNv7 = cryptonight "varient 1" aka Cryptonight V7. Created by monero for monero fork v7. No asic known. Available on nicehash.

SUMO = aka "Cryptonight Heavy". Compared to cryptonight, runs about 1/2 the speed on xeons, 3/4 the speed on vega gpus. No asic known. Not available on nicehash.

CN-light = originally used by Aeon. Probably not used anymore. 3.5x the speed of CN on xeon, 2x the speed of CN on vega gpu. works with asic. no nicehash.

CN-L7 -- new version of CN-light. Planned to be used by aeon. Used by turtle. No known asic. No nicehash.

Some coin info:

XMR -- CNv7

IPBC: variation on CN-light -- no nicehash

XHV: SUMO

GRFT: CNv7

DERO: CN

MSR: CN

ETN: CN

Aeon -- CN-light

Turtle -- CNL7

Sumo: SUMO (go figure)

XTL -- CNv7 (varient?) -- no nicehash
 
Last edited:

aij

Active Member
May 7, 2017
101
43
28
Legend:

CN-light = originally used by Aeon. Probably not used anymore. 3.5x the speed of CN on xeon, 2x the speed of CN on vega gpu. works with asic. no nicehash.

[...]

Aeon -- CNL7
Aeon is still on the original CN-light, isn't it? AFAICT, the last release was 0.9.14.0, from 2017-10-07.

The rebased version is supposed to eventually support the new algo, but I don't think a fork height has even been decided on yet.
 

funkywizard

mmm.... bandwidth.
Jan 15, 2017
848
402
63
USA
ioflood.com
Aeon is still on the original CN-light, isn't it? AFAICT, the last release was 0.9.14.0, from 2017-10-07.

The rebased version is supposed to eventually support the new algo, but I don't think a fork height has even been decided on yet.
My mistake. Turtle seems to be using the new one already. Aeon not yet.
 

funkywizard

mmm.... bandwidth.
Jan 15, 2017
848
402
63
USA
ioflood.com
Also, Stellite appears to be using some kind of tweaked cryptonight as well. Not quite sure what protocol, but doesn't work with nicehash. Actually, stellite is lucky to work in general.