Axel Cortes Cubero
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    2
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Smooth reward vs tipset lottery Suppose the amount of total block reward given at some block height, $n$, is $M_n$. A given miner, $i$ at time $n$ has a QAP of $p_n^i$, and the total QAP of the network is $P_n$. The expected reward for miner $i$ is then assumed to be $$Expected\,\,reward\,\,at\,\,time\,\,n=M_n\frac{p_n^i}{P_n}.$$ We define **Smooth reward** as a reward structure where the reward for each miner, $i$, at time $n$, is given **exactly** by the above formula, with no variance. The reward structure currently implemented in Filecoin is not smooth reward, but instead it is based on a **tipset lottery** at every block. This mechanism is defined as follow. Suppose $M_n$ total reward is given out at time $n$. at each time $n$, this reward is divided equally amongst $w_n$ miners, where, $$w_n\sim Poisson[E],$$ where $E=5$ has been fixed. Once $w_n$ is drawn, this is the number of winners that are drawn by a lottery, where for each lottery draw, the chance of miner $i$ to win is $p_n^i/P_n$. Note that it is possible that the same miner will be selected more than once, in which case they will receive an increasing fraction of the reward. The expectation is that if blocks are frequent enough, and miners play this tipset lottery for a sufficiently long time, then their expected reward over time will be equivalent to the smooth reward. This however brings some questions: * How long do miners actually have to wait to see any reward? This lack of smoothness will increase as the network grows. * Can this force the creation of miner pools? at some point if the reward does not come frequently enough, it may be too large a risk for small miners, so they may choose to team up in a large miner pool, and distribute their collective reward smoothly. This has the risk of increasing centralization. * What is the actual distribution of expected reward for a given miner, and under what circumstances does it approximate smooth reward? ## Deriving the tipset lottery reward distribution Our goal in this section is to derive the probability distribution $$f(\mathcal{M}^i(n,N),\{M_n,\dots,M_{n+N}\},\{p_n^i,\dots,p_{n+N}^i\},\{P_n,\dots,P_{n+N}\},E),$$ where $\mathcal{M}^i(n,N)$ is the cumulative reward earned by miner $i$ in the period from time $n$ to $n+N$, $\{M_n,\dots,M_{n+N}\}$ is the set of total rewards given out at each time in the same interval, $\{p_n^i,\dots,p_{n+N}^i\}$ and $\{P_n,\dots,P_{n+N}\}$ are the $i$-th miner's QAP, and total network QAP, respectively, at each time in the same interval. Our expectation that smooth reward is approximated after long times can then be expressed as $$\lim_{N\to\infty}\frac{1}{N}f(\mathcal{M}^i(n,N),\{M_n,\dots,M_{n+N}\},\{p_n^i,\dots,p_{n+N}^i\},\{P_n,\dots,P_{n+N}\},E)=\sum_{n^\prime=n}^{n+N} M_{n^\prime}\frac{p_{n^\prime}^i}{P_{n^\prime}}.$$ We start by computing the distribution $$f_1(v_n^i,p_n^i,P_n,E),$$ where $v_i$ is the number of lottery wins at time $n$ for miner $i$ (which can be more than one, and up to $w_n$. This can be computed as the compound probability, first that there are $w_n$ winners (drawn from a Poisson distribution with parameter $E$), and then that $v_n^i$ of those winning positions are given to miner $i$. This can be modeled as a Binomial distribution, where the probability of wining each of these positions is $p_n^i/P_n$. We can therefore conclude, $$f_1(v_n^i,p_n^i,P_n,E)=\sum_{w_n=0}^\infty f_{\rm Binomial}\left(v_n^i,w_n,\frac{p_n^i}{P_n}\right)f_{\rm Poisson}(w_n,E)=\sum_{w_n=0}^\infty \frac{E^{w_n}e^{-E}}{v_n^i!(w_n-v_n^i)!}\left(\frac{p_n^i}{P_n }\right)^{v_n^i}\left(1-\frac{p_n^i}{P_n}\right)^{w_n-v_n^i}.$$ We now evaluate the probability of miner $i$ earning a reward $m_n^i$ at time $n$, $$f_2(m_n^i,M_n,p_n^i,P_n,E)=\sum_{w_n=0}^\infty\sum_{v_n^i=0}^{w_n}\delta\left(m_n^i-M_n\frac{v_n^i}{w_n}\right) f_{\rm Binomial}\left(v_n^i,w_n,\frac{p_n^i}{P_n}\right)f_{\rm Poisson}(w_n,E)$$ $$=\sum_{w_n=0}^\infty\sum_{v_n^i=0}^{w_n}\delta\left(m_n^i-M_n\frac{v_n^i}{w_n}\right)\frac{E^{w_n}e^{-E}}{v_n^i!(w_n-v_n^i)!}\left(\frac{p_n^i}{P_n }\right)^{v_n^i}\left(1-\frac{p_n^i}{P_n}\right)^{w_n-v_n^i}$$ Notice that this distribution consists of a sum of sharp Dirac delta function peaks at all the possible values of reward, which are given by rational fractions of $M_n$. We are now ready to compute the probability distribution for expected cumulative reward for a period $N$, $$f(\mathcal{M}^i(n,N),\{M_n,\dots,M_{n+N}\},\{p_n^i,\dots,p_{n+N}^i\},\{P_n,\dots,P_{n+N}\},E)$$ $$=\sum_{w_n=0}^\infty\dots \sum_{w_{n+N}}^\infty\sum_{v_n^i=0}^{w_n}\dots\sum_{v_{n+N}=0}^{w_{n+N}}\delta\left(\mathcal{M}^i(n,N)-\sum_{m=0}^{N}M_{n+m}\frac{v_{n+m}^i}{w_{n+m}}\right)$$ $$\times\prod_{m=0}^N\frac{E^{w_{n+m}}e^{-E}}{v_{n+m}^i!(w_{n+m}-v_{n+m}^i)!}\left(\frac{p_{n+m}^i}{P_{n+m} }\right)^{v_{n+m}^i}\left(1-\frac{p_{n+m}^i}{P_{n+m}}\right)^{w_{n+m}-v_{n+m}^i}$$ ## Expected reward Having the probability distribution, we can now compute the expected reward as $$\langle\mathcal{M}^i(n,N)\rangle=\int_0^\infty \,\mathcal{M}\,f(\mathcal{M},\{M_n,\dots,M_{n+N}\},\{p_n^i,\dots,p_{n+N}^i\},\{P_n,\dots,P_{n+N}\},E)d\mathcal{M}$$ $$=\sum_{w_n=0}^\infty\dots \sum_{w_{n+N}}^\infty\sum_{v_n^i=0}^{w_n}\dots\sum_{v_{n+N}=0}^{w_{n+N}}\left(\sum_{m=0}^{N}M_{n+m}\frac{v_{n+m}^i}{w_{n+m}}\right)$$ $$\times\prod_{m=0}^N\frac{E^{w_{n+m}}e^{-E}}{v_{n+m}^i!(w_{n+m}-v_{n+m}^i)!}\left(\frac{p_{n+m}^i}{P_{n+m} }\right)^{v_{n+m}^i}\left(1-\frac{p_{n+m}^i}{P_{n+m}}\right)^{w_{n+m}-v_{n+m}^i}$$ $$=\sum_{m=0}^{N}M_{n+m}\sum_{w_{n+m}=0}^\infty\sum_{v_{n+m}=0}^{w_{n+m}}\frac{v_{n+m}^i}{w_{n+m}}f_{\rm Binomial}\left(v_{n+m}^i,w_{n+m},\frac{p_{n+m}^i}{P_{n+m}}\right)f_{\rm Poisson}(w_{n+m},E)$$ $$=\sum_{m=0}^NM_{n+m}\frac{p_{n+m}^i}{P_{n+m}},$$ which agrees with our expectation. ## A simple limit: constant power and total reward The general formula found above can be simplified in the limit that the power fraction $p_n^i/P_n$, and the total reward $M_n$ do not change too much in the range from $n$ to $n+N$, in which case we can approximate $\{M_n,\dots,M_{n+N}\}\approx\{M_n,\dots,M_n\}=\{M_n\}$, and similarly with the sequence of QAP's, so $$f(\mathcal{M}^i(n,N),\{M_n\},\{p_n^i\},\{P_n\},E)$$ $$=\sum_{w_n=0}^\infty\dots \sum_{w_{n+N}}^\infty\sum_{v_n^i=0}^{w_n}\dots\sum_{v_{n+N}=0}^{w_{n+N}}\delta\left(\mathcal{M}^i(n,N)-M_n\sum_{m=0}^{N}\frac{v_{n+m}^i}{w_{n+m}}\right)$$ $$\times f\left(\frac{v_{n+m}^i}{w_{n+m}},p_n^i,P_n,E\right),$$ where we define the probability distribution, $$f_3\left(\frac{v_{n+m}^i}{w_{n+m}},p_n^i,P_n,E\right)=f_{\rm Binomial}\left(v_{n+m}^i,w_{n+m},\frac{p_n^i}{P_n}\right)P_{\rm Poisson}(w_{n+m},E)$$ For large enough $N$, then applying the central limit theorem we find $$f(\mathcal{M}^i(n,N),\{M_n\},\{p_n^i\},\{P_n\},E)$$ $$\approx\delta\left(\mathcal{M}^i(n,N)-M_n\sum_{m=0}^{N}\langle\frac{v^i}{w}\rangle\right)=\delta\left(\mathcal{M}^i(n,N)-NM_n\frac{p_n^i}{P_n}\right),$$ as was expected. *Comment: Central limit theorem doesnt really say how large $N$ needs to be.* ## Variance of reward As we mentioned before, for the smooth reward structure, there is no variance in the expected reward, since it is exactly determined. It would therefore be interesting to understand the variance in reward introduced by the tipset lottery. The variance is given by $$Var(\mathcal{M}^i(n,N))=\langle\mathcal{M}^i(n,N)^2\rangle-\langle \mathcal{M}^i(n,N)\rangle^2$$, where the second term is the square of the expected value we have already computed, $$\langle \mathcal{M}^i(n,N)\rangle^2=\sum_{m=0}^N\sum_{m^\prime=0}^NM_{n+m}M_{n+m^\prime}\frac{p_{n+m}^i}{P_{n+m}}\frac{p_{n+m^\prime}^i}{P_{n+m^\prime}}.$$ The first term is given by $$\langle\mathcal{M}^i(n,N)^2\rangle=\int_0^\infty \,\mathcal{M}^2\,f(\mathcal{M},\{M_n,\dots,M_{n+N}\},\{p_n^i,\dots,p_{n+N}^i\},\{P_n,\dots,P_{n+N}\},E)d\mathcal{M}$$ $$=\sum_{m=0}^{N}\sum_{m^\prime=0}^NM_{n+m}M_{n+m^\prime}\sum_{w_{n+m}=0}^\infty\sum_{v_{n+m}=0}^{w_{n+m}}\sum_{w_{n+m^\prime}=0}^\infty\sum_{v_{n+m^\prime}=0}^{w_{n+m^\prime}}\frac{v_{n+m}^i}{w_{n+m}}\frac{v_{n+m^\prime}^i}{w_{n+m^\prime}}$$ $$\times f_{\rm Binomial}\left(v_{n+m}^i,w_{n+m},\frac{p_{n+m}^i}{P_{n+m}}\right)f_{\rm Poisson}(w_{n+m},E)$$ $$\times \left[f_{\rm Binomial}\left(v_{n+m^\prime}^i,w_{n+m^\prime},\frac{p_{n+m^\prime}^i}{P_{n+m^\prime}}\right)f_{\rm Poisson}(w_{n+m},E)\right]^{1-\delta_{m,m^\prime}}.$$ The double sum can be split into terms where $m=m^\prime$, and terms where $m\neq m^\prime$, such that, $$\langle\mathcal{M}^i(n,N)^2\rangle=\sum_{m=0}^{N}M_{n+m}^2\sum_{w_{n+m}=0}^\infty\sum_{v_{n+m}=0}^{w_{n+m}}\left(\frac{v_{n+m}^i}{w_{n+m}}\right)^2$$ $$\times f_{\rm Binomial}\left(v_{n+m}^i,w_{n+m},\frac{p_{n+m}^i}{P_{n+m}}\right)f_{\rm Poisson}(w_{n+m},E)$$ $$+\sum_{m=0}^N\sum_{m^\prime=0,m^\prime\neq m}^NM_{n+m}M_{n+m^\prime}\frac{p_{n+m}^i}{P_{n+m}}\frac{p_{n+m^\prime}^i}{P_{n+m^\prime}}.$$ It is necessary to treat $w_n+m=0$ as a special case, since we have expressions that involve this quantity in the denominator (This is not a problem since in this casae $v_{n+m}^i=0$ as well and the end result is finite). Performing the sum over $v_{n+m}$ we find, $$\langle\mathcal{M}^i(n,N)^2\rangle$$ $$=\sum_{m=0}^{N}M_{n+m}^2 \left(f_{\rm Poisson}(0,E)+\frac{p_{n+m}^i}{P_{n+m}}\left(1-\frac{p_{n+m}^i}{P_{n+m}}\right)\sum_{w_{n+m}=1}^\infty \frac{1}{w_{n+m}}f_{\rm Poisson}(w_{n+m},E)\right)$$ $$+\sum_{m=0}^N\sum_{m^\prime=0}^NM_{n+m}M_{n+m^\prime}\frac{p_{n+m}^i}{P_{n+m}}\frac{p_{n+m^\prime}^i}{P_{n+m^\prime}}.$$ We substitute $$f_{\rm Poisson}(0,E)=e^{-E},$$ and [1] $$\sum_{w_{n+m}=1}^\infty \frac{1}{w_{n+m}}f_{\rm Poisson}(w_{n+m},E)=e^{-E}\left(Ei(E)-\log(E)-\gamma\right),$$ where $Ei(x)$ is the exponential integral function https://en.wikipedia.org/wiki/Exponential_integral, and $\gamma=0.5772\dots$ is the Euler-Mascheroni constant. Gathering all the terms together, then the variance is $$Var(\mathcal{M}^i(n,N))=e^{-E}\sum_{m=0}^NM_{n+m}^2\left[1+\frac{p_{n+m}^i}{P_{n+m}}\left(1-\frac{p_{n+m}^i}{P_{n+m}}\right)\left(Ei(E)-\log(E)-\gamma\right)\right].$$ We now have an exact expression for how the different parameter affect the total variance in miner reward ### Simplified constant reward/power case This could be simplified in the case we discussed in the previous section, where power and rewards stay approximately constant in the time period of size $N$, so $M_{n+m}=M,\,p_{n+m}^i=p^i,\,\,P_{n+m}=P$, such that, $$Var(\mathcal{M}^i(n,N))=e^{-E}NM^2\left[1+\frac{p^i}{P}\left(1-\frac{p^i}{P}\right)\left(Ei(E)-\log(E)-\gamma\right)\right].$$ ## Expected time before payoff The probability of miner $i$ receiving $v_n^i$ winning lottery tickets at time $n$ $$f_1(v_n^i,p_n^i,P_n,E)=\sum_{w_n=0}^\infty f_{\rm Binomial}\left(v_n^i,w_n,\frac{p_n^i}{P_n}\right)f_{\rm Poisson}(w_n,E).$$ If total reward and power remain constant, the probability of obtaining $v_n^i$ winning tickets over a period of $x$ epochs is $f_1(v_n^i,p_n^i,P_n,xE)$. The *cumulative* distribution function of waiting times $x$, between winning lottery ticketsis [then given by](https://stats.stackexchange.com/questions/2092/relationship-between-poisson-and-exponential-distribution) $$F_4(x,p_m^i,P_n,E)=1-f_1(0,p_n^i,P_n,xE).$$ $$=1-\sum_{w_n=0}^\infty \frac{(xE)^{w_n}e^{-xE}}{w_n!}\left(1-\frac{p_n^i}{P_n}\right)^{w_n}$$ $$=1-\frac{e^{-xE}}{e^{-\left[(xE)\left(1-\frac{p_n^i}{P_n}\right)\right]}}\sum_{w_n=0}^\infty\left[(xE)\left(1-\frac{p_n^i}{P_n}\right)\right]^{w_n}e^{-\left[(xE)\left(1-\frac{p_n^i}{P_n}\right)\right]}\frac{1}{w_n!}$$ $$=1-\frac{e^{-xE}}{e^{-\left[(xE)\left(1-\frac{p_n^i}{P_n}\right)\right]}}$$ $$=1-e^{-xE\frac{p_n^i}{P_n}}.$$ The probability distribution function for waiting times between wins is then, $$f_4(x,p_m^i,P_n,E)=\frac{dF_4(x,p_m^i,P_n,E)}{dx}=E\frac{p_n^i}{P_n}e^{-xE\frac{p_n^i}{P_n}},$$ That is, the waiting times follow a standard exponential distribution. The expected waiting time before a win is then $$\langle x\rangle=\int_0^\infty x\,f_4(x,p_m^i,P_n,E)\,dx=\frac{P_n}{Ep_n^i}.$$ ## St. Petersburg paradox and time-averaged reward We have established that the expected miner reward for a period of time is the same under the smooth and lottery based reward. It is however wrong to assume that the expected reward is the only quantity relevant to the miner finances, and their decision to mine. This point is exemplified in the [St. Petersburg paradox](https://en.wikipedia.org/wiki/St._Petersburg_paradox), where a game is proposed where the expected reward for the player is infinite, however, a rational player would only be willing to pay a small finite amount to play the game. A recent solution to the St. Petersburg paradox was proposed in [2], where it was shown that it is wrong to assume the expected reward, which is given by the ensemble average of different payouts, is the relevant quantity to player finances. Instead one should consider the "time average" of the reward, where a player would play several consecutive games, and measure on average how much their wealth is expected to grow over time. The relevant quantity proposed in [2] is the wealth growth rate. Suppose a player has at $t=0$, an amount of wealth, $W$. After playing $T$ rounds of the game, their expected wealth is given by $$W(T)=We^{gT},$$ where $g$ is the expected growth rate, which is the quantity of interest. If $g$ is larger than 0, then the player should accept to play the game. As shown in [2], the expected growth rate is computed as follows. Suppose playng the game has a set of possible outcomes, labeled by $n$, where the corresponding payout is $J_n$, and the cost to the player to play such game is $c_n$ (a constant cost was used in [2], but we generalize to the $n$-dependent case, as we will need it for our problem). The probability of outcome $n$ is $p_n$. The expected time duration of one round of the game is $\bar{t}$ (this is normalized to $\bar{t}=1$ in ref [2])The expected growth rate is then given by $$g=\frac{1}{\bar{t}}\sum_n p_n\log\left(\frac{W-c_n+J_n}{W}\right).$$ Playing the game is only profitable when $g>0$. One key insight of [2] is that this quantity now depends on the wealth of the player. A player who starts with a larger amount of wealth should be willing to pay a higher price to pay the game, as their wealth will grow faster with higher initial wealth. By contrast, a player who doesn't have enough wealth should not play the game, unless they can pay a lower price, as their wealth is expected to be reduced. ## Expected growth rate and budget strategy for lottery reward We now apply the results of [2] to the problem of miner return on investment, starting with the case of the lottery-based reward. Suppose a miner starts with an amount of wealth/investment $W$. They must first arrange their budget, and decide how much to spend on onboarding new capacity (buying equipment) and how much budget to leave so they are able to run their equipment for a given amount of time before making any profit. Suppose the miner splits their investment in $qW$ for onboarding capacity, and $(1-q)W$ for running their equipment, where $q\in(0,1)$. The total amount of power the miner will buy is then $$p^i=C_e(qW)$$, where $C_e(x)$ is a price function, that tellus us how much equipment we can purchase for an amount of money $x$. The miner will be able to run this equipment for an amount of time $t$ at a cost $C_r(t,C_e(qW))$, where $C_r(t,p)$ is some function that tells us how much it costs to run $p$ amount of equipment for time $t$. The maximum amount of time the miner can run their equipment without going bankrupt, $T_{\rm max}$, is fixed by $$C_r(T_{\rm max},C_e(qW))=(1-q)W$$ The economics of scale suggest that $C_e$ and $C_{r}$ should be sub-linear functions, as buying and running equipment should become cheaperper-unit with the more amount you buy. For simplicity, however, for the rest of the calculation, we will make the **simplifying assumption** that costs grow linearly with amount of onboarded capacity and running time, such that $$C_e(qW)=qWc_e,\,\,\,\,\,C(t,C_e(qW))=tqWc_ec_r,$$ for some constant rates $c_e$ and $c_r$. The maximum amount of time a miner can run their equipment is then, $$T_{\rm max}=\frac{1-q}{qc_ec_r}.$$ As we previously showed, the amount of time the miner must wait before getting any reward, follows an exponential distribution. Suppose the total network power before the miner joined was $P_0$. The total network power, including the new miner is now $P=P_0+qWc_e$. The probability of waiting a time $t$ before obtaining any reward is then , $$f_{\rm Exponential}\left(t,E\frac{qWc_e}{P_0+qWc_e}\right)$$ Suppose at this time a total new reward of $M$ is given out per epoch amogst the winners. The expected amount of reward a miner will get **given that they have won a lottery**, can be computed from the previously defined probability distributions as $$J(W,q,c_e,P_0,M,E)=\frac{\langle \mathcal{M}^i\rangle}{1-f_1(0,p^i,P,E)}$$ $$=\frac{M\frac{qWc_e}{P_0+qWc_e}}{1-\sum_{w=0}^\infty\frac{E^we^{-E}}{w!}\left(1-\frac{qWc_e}{P_0+qWc_e}\right)^w}$$ As we have shown, the expted duration of each round of this game is $$\bar{t}=\frac{P_0+qWc_e}{EqWc_e}$$ The expected growth rate from [2] is then given by $$g(W,q,c_e,c_r,P_0,M,E)$$ $$=\frac{EqWc_e}{P_0+qWc_e}\int_0^{\frac{1-q}{qc_rc_e}}f_{\rm Exponential}\left(t,E\frac{qWc_e}{P_0+qWc_e}\right)\log\left(\frac{W-tqWc_rc_e+J(W,q,c_e,P_0,M,E)}{W}\right)dt.$$ We can evaluate this integral and further analize the numerical details of this formula, however can already obtain very intersting insights without explicit evaluation. #### Optimal budget strategy Now that we have a formula for the expected wealth growth rate for a given miner, $g(W,q,c_e,c_r,P_0,M,E)$, the budget can be chosen such as to maximmize the growth, for a given amount of wealth. The optimal budget split, $q^*$ can be chosen by maximizing the growth rate, $$\left.\frac{\partial g}{\partial q}\right\vert_{q=q^*}=0.$$ Intuitively, it makes sense that there is an optimal budget strategy. Say the expected waiting time before obtaining any reward is very large, and the miner has a small amount of initial wealth. It would only make sense to buy a small amount of equipment, and leave enough budget to run the equipment as long as possible. The optimal growth rate is then given by $$g^*(W,c_e,c_r,P_0,M,E)\equiv g(W,q^*,c_e,c_r,P_0,M,E).$$ It is important to point out that mining will only be profitable for large enough miners, mining with insufficient wealth will result in a loss. The minimum miner size, $W_{\rm min}$, is then fixed by $$g^*(W_{\rm min},c_e,c_r,P_0,M,E)=0.$$ ## Expected growth rate for smooth reward With smooth reward, the miner expects to get their corresponding reward after every epoch $t_{\rm epoch}$ (with $t_{\rm epoch}=30s$ for Filecoin). This implies a massive rearrangement of the miner budget. The miner only needs to ensure they can run their eqauipment for $T_{\rm max}=t_{\rm epoch}$ The optimal budgeting strategy is then $$\frac{q^*}{1-q^*}=\frac{1}{t_{\rm epoch}c_rc_e}.$$ Notice that this means that the optimal strategy is to onboard as much capacity as possible, and leave only a minimal amount of budget to be able to run your equipment for one epoch. **Smooth reward therefore maximizes onboarding of capacity for each miner** The game has only one possible outcome, that with 100% probability each round will last $t_{\rm epoch}$, and the reward will be, $$J(W,q,c_e,P_0,M)=M\frac{qWc_e}{P_0+qWc_e}$$ The optimal growth rate is then $$g^*(W,c_e,c_r,P_0,M)=\frac{1}{t_{\rm epoch}}\int_0^{t_{\rm epoch}}\log\left(\frac{W-tq^*Wc_ec_r+M\frac{q^*Wc_e}{P_0+q^*Wc_e}}{W}\right)dt$$ $$= g^*(W,c_e,c_r,P_0,M)=\frac{1}{t_{\rm epoch}}\int_0^{t_{\rm epoch}}\log\left(1+q^*\left(M\frac{c_e}{P_0+q^*Wc_e}-tc_ec_r\right)\right)dt.$$ Notice that the dependence in $W$ only comes throught the denomitator containting the miner's contribution to the total network power, and will drpop out in the likely case that $P_0\gg q^*Wc_e$, which makes mining profiable for miners of all sizes. ## References 1. Jones, C. Matthew, and Anatoly A. Zhigljavsky. "Approximating the negative moments of the Poisson distribution." Statistics & probability letters 66.2 (2004): 171-181. 2. Peters, Ole. "The time resolution of the St Petersburg paradox." Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 369.1956 (2011): 4913-4931.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully