I am focused on understanding Proof of Work (PoW) vs Proof of Stake (PoS).
One idea I liked is that we can see the mining of a block as a lottery of probability P, where I buy a ticket of cost C using my hardware and electricity, to obtain a reward R.
Since R should be simple to obtain (the value in ETH of the reward times value of ether in fiat), I want to set up figures for P and C.
What is the simplest way to reach these figures? Starting of course with Hash Rate and Total Difficulty. What are the most popular techniques to arrive to those values?
target
which is2 ** 256 / D
and you produce a hash which lives in the interval[0, 2 ** 256]
, and is supposed to start from anonce
, which are randomly uniformed distributed. Yourp
at any moment of finding ahash
lesser than thetarget
is1 / D
, that is your favorable cases against all the cases. It follows that as Difficulty increases, your odds decrease.D
is a different beast: Given that we defined thatp = 1 / D
, we can say thatP(B > 1) = 1 - P(B = 0) = 1 - (1 - p)^H
. WithH
being the amount of hashes we are able to produce at a certain amount of time.