My questions are:
- is that dumb (because of how drastic the values fluctuate)?
- if not, can anyone help me learn the backend math to calculate the profitability analysis?
I'd like to smooth that over time in Grafana. The API returns all the information (minus the input variables like estimated hash, power utilization, and power cost).
Any help with the algorithm?
It's pretty simple. The expected number of hashes over a period of time is average hashrate multiplied by time. You divide that by 65536 and you have the expected number of baseline shares. You then multiply by the price of a share (i.e., the PPS rate) and you get expected rewards in LTC. The formula for the PPS rate is in the FAQ on the website.
As for energy costs, it's even simpler, as energy is power (in kW) multiplied by time (in hours).