Open Eneen opened 6 years ago
Hey @Eneen thank you so much for looking into this. As you've probably already found out, information regarding how to calculate profitability is quite scarce.
So the formula you're suggesting to use is the one I had in there originally. The main issue with using the formula that the pool uses is the fact that it's based on network hashrate, not difficulty.
This is a problem because currently, I don't think there's a simple method of querying the explorer for historical network hashrate. I was however, able to find an endpoint that provides the last eight hours of difficulty.
Equihash coins use secondary hash to hash equihash solution that makes it more difficult. Standard formula: (userHash/(difficulty2^13))blockReward360024 requires additional 0.8 multiplier to get accurate number of coins that you earn.
Here is part of code for secondary formula using network hashrate (this one gives almost same results): https://github.com/z-classic/z-nomp/blob/master/website/static/miner_stats.js#L151 However as you can see network hashrate is multiplied by 1.2 giving accurate earnings.