Bitcoin Forum
November 09, 2024, 03:58:03 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Formula to calculate expected earnings  (Read 195 times)
Volcomstarr (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 02, 2018, 06:34:14 PM
 #1

Hi,

I'm trying to find a formula to calculate expected earnings when mining depending on my hashrate. I know the formula that is used for BTC but I'm mining altcoins (prevalently neoscrypt). Before you ask I don't want to use websites like Whattomine since I need to play with results on Excel. It shouldn't be so hard but I am having problems. I am playing with this formula I found on StackExchange:

Quote
Calculate your share of the network hash rate for that particular hash algorithm (your hash rate divided by the network hash rate), let that be HR.

Calculate the emission by unit of time (block reward times 86400 divided by block time in seconds), let that be E.

Calculate your expected average coins mined in a day (HR times E), let that be C. Note that variance will be high, unless you mine on a large pool, or have a large HR.

Calculate the price in the coin you want to convert to (C divided by exchange rate, or C times exchange rate, depending on whether it's expressed by altcoin per bitcoin, or bitcoin per altcoin, respectively).

If you want per second, or per MH, scale accordingly.

The problem is that the result of the formula is hugely different from reality. In this precise moment I am mining for testing purposes RAP with 2 of my rigs and I have the following values:

  • My Hashrate is 22 Mh/s
  • Network Hashrate is 264 Mh/s
  • 24 Hour Avg Block Time is 127 seconds

Let's insert my data in the formula:

HR = 22 MHs / 264 MHs = 0.08333
E = 86400 (1 day) / 127 TTF = 680.3149
C = 0.08333 * 680.3149 = 56.69

The formula says that I should gain 56.69 RAP per day but in reality I am getting between 120 and 150 RAP per day! What is wrong in my calculations?
icroatt
Jr. Member
*
Offline Offline

Activity: 63
Merit: 5


View Profile
May 02, 2018, 08:37:16 PM
 #2

This doesn't take into account certain variables. In order to calculate true profitability or coins earned per day, you would have to use integral calculus, which is what sites like whattomine calculate for you. A simply algebraic equation isn't going to calculate certain dynamics (changing difficulty, increase or decrease in network hash rate, etc.).

I would be happy to help you with some of the math if you want, but it really would be easier to use a website. What is your reasoning behind using excel?
Volcomstarr (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 02, 2018, 09:44:28 PM
 #3

I correct myself. I don't need to use it on Excel in a strict sense. I'm using Excel just to make calculations on the fly. In the end I'll need to add the formula in a software I developed to manage and monitor all my rigs remotely and automatically.

Right now I am already "pinging" services like Whattomine, Mastenodes.online etc. to perform automatic actions but Whattomine gives values for a very small amount of altcoins. I need to apply the same formula to all other coins so that I can use the auto-switch to mine masternodes depending on my priority list, the amount of nodes I want and of course the days needed.
icroatt
Jr. Member
*
Offline Offline

Activity: 63
Merit: 5


View Profile
May 03, 2018, 04:59:51 PM
 #4

Okay, I can certainly help with the formula. Would your program be able to pull data like the dynamic difficulty?
Volcomstarr (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 04, 2018, 08:17:07 PM
 #5

Thank you Smiley

Yes, I am already able to pull data live from explorers of all altcoins and store them for later use. I'm interested in altcoins that support masternodes and for all of them I already have difficulty, network hash, ttf / block time, block reward, last block (I don't think that it's necessary in the formula). I'll take as example still RAP.

At the time of writing this I know for sure that during the last 10 days I mined between 130 and 180 RAP per day. Min and max values are so different because the coin is small and hashrate fluctuates a lot. Anyway it shouldn't be a problem for now. Let me add all variables.

My hashrate = 22000000 (hash/s)
Network hashrate = 175377838 (hash/s)
My share = 22000000 / 175377838 = 0.1254434 (1.25%)

TTF/s = 128 (seconds)
Emissions = 86400 / 128 = 675

Block Reward: 2.976 RAP
Difficulty = 5.660038

The amount of RAP mined per day at 22000000 hash/s should be equal to ((My share * Emissions) * Block Reward) therefore ((0.1254434 * 675) * 2.976) = 251.99 RAP.
The result is 71% greater than reality Sad For sure I should add the difficulty in the formula but I don't know how.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!