Ever wondered how to calculate the net present value of mining? If you've learned discounted cash flow analysis, it's not that difficult as long as you're willing to assume a constant, deterministic rate of block-finding, which is a good assumption when averaged out over long periods.
But in this post, I want to show how to do it the "right way", using continuous time Bellman equations with jump processes. The reason for doing this isn't necessarily to get a significantly different answer than the constant block-finding assumption would net us. Rather, it's to have the right tools for downstream strategic analysis in more complex scenarios, such as the game theory of selfish mining.
Continuous time Bellman equations with jump processesContinuous time Bellman equations with jump processes
Let be the current state. The state could represent your hash rate as a miner, or some other state of the world that affects your returns (i.e. the price of energy). Specific events can happen over time that change the state. These events are described by a Poisson process with rate , meaning the events occur at a rate of per unit time. When the event arrives, the state changes from to .
Let represent the net present value of being in state . And let be your discount rate.[1] Finally, let represent the flow of utility that you get while in state . Under this setup, we can write an equation that relates the present value while in state to the present value while in state :
This equation is known as a continuous time Bellman equation. Intuitively, it says that the flow of asset value () is equal to the flow rate of utility () plus the probability rate that the asset jumps in value ().
Applied to bitcoin miningApplied to bitcoin mining
We'll ignore variable energy costs for now, and we'll denominate all value in units of bitcoin. If you're a miner with hashrate , then the rate at which you find blocks is , where is a measure of "effective difficulty".[2] While mining, you pay a continuous flow of cost equal to (hash-rate times per-hash cost). is the bitcoin-denominated cost of producing one hash. When you do find a block, you get an instant reward of .
Let be the value function of mining with hashrate , and let be the value function of just having found a block. We can write:
Moreover, we can write because finding a block simply pays out an instantaneous reward of , after which you simply continue mining. Substituting this into the above equation, we get:
Which gets us:
This equation says that the present value of mining is proportional to your hash rate () multiplied by the average block reward per hash () minus the average cost per hash (). If the block reward per hash is smaller than the energy cost per hash, mining isn't worth it at all. If the block reward per hash is greater than the energy cost per hash, then increasing your hash rate simply amplifies the present value of mining. Note that if your discount rate decreases (you grow more patient), the present value of mining increases (since mining gets you a delayed reward for a present cost).
Numerical exampleNumerical example
Let's say you're a big miner. Suppose = 600,000 EH (exahashes) and your hash rate is = 200 EH/s (exahashes per second). Your discount rate is = 5% per year. The block reward is = 3.125 BTC. (These numbers roughly correspond to Bitcoin's current status and Antpool's total hash rate).
- What is your rate of finding blocks, ?
Answer: - What energy cost per exahash (measured in sats per EH) would cause you to break even on mining?
Answer:
We need to find . = 3.125 BTC = 312,500,000 sats. = 600,000 EH. Thus, = 521 sats per EH. - Suppose your energy cost is 500 sats per EH (fairly typical under current conditions, including capex). Calculate the present value of your mining operation (ignoring difficulty adjustments and variable energy costs, etc).
Answer:
ConclusionConclusion
The presentation here was simplified, but knowing how to write down the continuous time Bellman equation for a dynamic programming problem with jump processes will help us analyze more complex scenarios later, such as when a selfish miner should strategically hide a private chain vs. publish it. It also lets us calculate present value in more realistic settings, such as with variable energy costs, difficulty adjustments, and changes in hash rate due to machine failures or improved efficiency.
You can think of the discount rate as how much you discount the future relative to the present. A higher means you value present returns highly relative to future returns. A lower means you don't value the present as highly as you would when was greater. You can think of as the rate of return you could make on investments. If is high, it means you can make a pretty good rate of return by investing capital now, so you have higher demand for capital now, and are thus less patient about the future. If is low, you can't make as good returns, so your demand for capital now is lower, and you are more patient. ↩
I introduced the concept of "effective difficulty" here. Roughly speaking, it measures the average number of hashes required to find a block. ↩
I was not expecting to see a Bellman equation today. Took me right back to studying for prelims
Hopefully you could follow the math?
I remember learning discrete time Bellman equations in my phd classes, but not continuous time ones. I think I had to look those up later, despite a lot of important applications, like bitcoin mining.
We did both discrete and continuous Bellmans in my program.
I think you explained it well but I also have studied these as though my life depended on it.
This guy maths.
Interesting approach. Most mining NPV analyses just assume constant block-finding and call it a day. Using Bellman equations feels like overkill for the basic case — as the author admits, the answer isn't that different — but the real payoff is downstream: selfish mining game theory, variable energy costs, difficulty adjustments. That's where the simple model breaks down and you actually need this framework.
The numerical example is eye-opening too. A 4% margin (521 vs 500 sats/EH) turning into ~$2B present value shows how much scale amplifies thin edges in mining.