User Rating: 4 / 5

Star Active Star Active Star Active Star Active Star Inactive
 
monero-ocean.jpg

MoneroOcean is not just another Monero mine. The key difference of this mine against others is that you do not really mine Monero, you are mining other altcoins, then the mine sells them and sends to you payment in Monero. This opens the possibility to many things; things that are out of the scope of this article, but trust me, it is a really cool mine.

Because of the altcoin approach, it is impossible to know how much monero a single worker has contributed. Think of a situation where you have multiple machines and you are wondering, in terms of money to know which one is the most profitable one. The mine gives you the accepted shares per worker, and the amount of monero of that given found has contributed to your balance, and of course what altcoin was mined. However, there is no way to do a direct correlation between those earnings and what a worker has contributed to it.

Happily for us, I found a very close approximation. Keep reading.

Step 1: Get the Balance with a Time Frame

MoneroOcean has this API to get the current balance. You will have to query twice to get the value you need.

https://api.moneroocean.stream/miner/42a6vYS49dFUfy1Fjr9bEme8REMmYEaxGTmYPGdZSs4HMGB5yJSirWyWvCn2dxUbRgBAjHqSk82o3icWXnFFg8z41TFQEf9/stats

{"hash":1.8170286051432292,"hash2":17.381666666666668,"identifier":"global","lastHash":1642525354,"totalHashes":1681808.9723796663,"validShares":3375,"invalidShares":982,"amtPaid":0,"amtDue":11786787,"txnCount":0}

Where the important keys here are:

  • amtPaid: the total XMR that you have withdrawn, and
  • amtDue: the total XMR you have earned in the mine and you haven't withdrawn yet,
  • validShares: shares accepted from the mine.

The total earnings are the sum of these two values. BalanceT = amtPaidT + amtDueT. Therefore the Balance within a time frame is given by the difference of BalanceT0 and BalanceT1. The same applies to ValidShares.

The time frame is totally optional, this works with total numbers as well.

Step 2: Get the Active Workers List

MoneroOcean will allow you to get active workers.

https://api.moneroocean.stream/miner/42a6vYS49dFUfy1Fjr9bEme8REMmYEaxGTmYPGdZSs4HMGB5yJSirWyWvCn2dxUbRgBAjHqSk82o3icWXnFFg8z41TFQEf9/chart/hashrate/allWorkers

{"global":[{"ts":1642525898074,"hs":0.8954738362630208,"hs2":8.575},{"ts":1642525812519,"hs":0.8954738362630208,"hs2":8.575},{"ts":1642525728783,"hs":0.8954738362630208,"hs2":8.575},{"ts":1642525600166,"hs":1.8170286051432292,"hs2":17.381666666666668},{"ts":1642441524047,"hs":2.784743245442708,"hs2":22.668333333333333},{"ts":1642441291512,"hs":1.51078857421875,"hs2":11.733333333333333}],"help-me-to-fix-my-dog-leg.4":[{"ts":1642525898074,"hs":0.8954738362630208,"hs2":8.575},{"ts":1642525812519,"hs":0.8954738362630208,"hs2":8.575},{"ts":1642525728783,"hs":0.8954738362630208,"hs2":8.575},{"ts":1642465609901,"hs":17.555726318359376,"hs2":54.718333333333334},{"ts":1642465520793,"hs":7.2902925618489585,"hs2":22.893333333333334},{"ts":1642465415039,"hs":3.184342041015625,"hs2":10}]}

If you read carefully, you will find the active worker index.

Step 3: Get the Accepted Shares by Worker

MoneroOcean allows you to get the accepted shares. If you are using a time frame, you will have to query this twice.

https://api.moneroocean.stream/miner/42a6vYS49dFUfy1Fjr9bEme8REMmYEaxGTmYPGdZSs4HMGB5yJSirWyWvCn2dxUbRgBAjHqSk82o3icWXnFFg8z41TFQEf9/stats/help-me-to-fix-my-dog-leg.4

{"lts":1642525354,"identifer":"help-me-to-fix-my-dog-leg.4","hash":0.8954738362630208,"hash2":8.575,"totalHash":1074491.1460352696,"validShares":2053,"invalidShares":247}

Where the important keys are:

  • validShares: share accepted by the mine

MoneroWorkerN = BalanceT * ValidSharesWorkerN / ValidSharesT

Notes about Implications

This approximation is far to be exact. Two workers mining at the same time won't be working the same algorithm nor the same currency. Each currency has different difficulty levels, therefor shares are produced at different times. Also, each currency needs different numbers of shares to complete a block and each currency has different levels of rewards; not to mention the price versus the XMR.

However, if you think in the long run two different workers mining at the same time with identical hardware characteristics, it is very likely they will be mining the same currency. Also, workers with a more powerful CPU will get more shares which will favour its XMR balance. This is the approach of this article.

Good luck!

blog comments powered by Disqus

About

Read about IT, Migration, Business, Money, Marketing and other subjects.

Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.