Hey everyone,
Here's an equation I developed that tells you how long it will take to find a block.
((100/((userHashrate/difficulty)*100))/144);
Explanation:
userHashrate/difficulty: chance the user finds a block
(userHashrate/difficulty)*100: converts the chance to a percentage (100>percentage>0)
100/((userHashrate/difficulty)*100): ...I forget what this does :/
((100/((userHashrate/difficulty)*100))/144): 144 blocks are found per day on average, this calculates how many days it'll take to find a block
Here's a working jsfiddle with the equation:
http://jsfiddle.net/a6a3ca0f/6/. Click 'Run' in the top left to restart it.
The only possibly incorrect parts that I can think of are:
a) I forget why I divide it all by 100 in 100/((userHashrate/difficulty)*100). I'm pretty confident that it's correct to do so, but I can't remember what it does. I figured it out! It's how often you'll find a block (e.g. you will find one block every xx blocks mined).
b) Right now I divide the user's hashrate by the difficulty, not by the entire hashrate. Does this make it incorrect?
I'd appreciate feedback on these two problems and the equation in general.
Thanks,
busterroni