OptimalPercentile

Hedge By Bitcoin | Memberswill go by tor | RecentChanges | Join |

It is often better to express the optimal block size problem in dimensionless manner. It is known that the percentile p is such that

paB=kx=NnAp \equiv a B = k x =\frac{N}{n A}

Denote the expected block fee of all transactions, including those who pay less fee and not included in the block, by m. Define . Then the optimal problem is to maximize:

(R+m 0 pG 1(1u)du)×1+h(l+pk)1+l+pk=mh(Rm+ 0 pA(u)du)(k(1h+l)+pk(1+l)+p)\left(R+m \int_0^p G^{-1}\left( 1-u \right) d u \right) \times \frac{1+h\left( l+\frac{p}{k}\right)}{1+l+\frac{p}{k}}=m h\left(\frac{R}{m}+ \int_0^p A( u ) d u \right) \left( \frac{k(\frac{1}{h}+l)+p}{k(1+l)+p}\right)

Since the maximization is equivalent to the maximization of its natural log, here it is to maximize:

ln(Rm+ 0 pA(u)du)+ln(k(1h+l)+p)ln(k(1+l)+p)\ln\left(\frac{R}{m}+ \int_0^p A( u ) d u \right)+\ln\left(k(\frac{1}{h}+l)+p\right) -\ln\left( k(1+l)+p\right)

Therefore, the optimal equation is:

0=A(p)Rm+ 0 pA(u)du+1k(1h+l)+p1k(1+l)+p=A(p)Rm+ 0 pA(u)du+k(11h)(k(1h+l)+p)(k(1+l)+p)0=\frac{A(p)}{\frac{R}{m}+ \int_0^p A( u ) d u}+\frac{1}{k(\frac{1}{h}+l)+p}-\frac{1}{k(1+l)+p}=\frac{A(p)}{\frac{R}{m}+ \int_0^p A( u ) d u}+\frac{k(1-\frac{1}{h})}{(k(\frac{1}{h}+l)+p)(k(1+l)+p)}

And the second order condition of maximization means:

0>k(1h1)(k(1h+l)+p)(k(1+l)+p)(Ap1A+2k(1h+l)+p)0>\frac{k(\frac{1}{h}-1)}{(k(\frac{1}{h}+l)+p)(k(1+l)+p)}\left( \frac{\partial A}{\partial p} \frac{1}{A} +\frac{2}{k(\frac{1}{h}+l)+p} \right)

effectively,

0>Ap1A+2k(1h+l)+p0>\frac{\partial A}{\partial p} \frac{1}{A} +\frac{2}{k(\frac{1}{h}+l)+p}

Because 0h,p10 \leq h,p\leq1 and l0l \geq 0, it is observed that the optimal p as an implicit function p(h,k,l,Rm)p\left(h,k,l, \frac{R}{m}\right) must be increasing with respect to k under some conditions. By the optimal equation, it follows:

0=p(k)k(k(1h1)(k(1+l)+p)(k(1h+l)+p)(Ap1A+2k(1h+l)+p))+(1h1)(k 2(1+l)(1h+l)p 2)(k(1+l)+p) 2(k(1h+l)+p) 20=\frac{\partial p(k)}{\partial k} \left( \frac{k( \frac{1}{h}-1 )}{(k(1+l)+p)(k( \frac{1}{h}+l)+p)} ( \frac{\partial A}{\partial p} \frac{1}{A} + \frac{2}{k( \frac{1}{h}+l )+p} )\right) + \frac{( \frac{1}{h}-1 )(k^2(1+l)( \frac{1}{h}+l )-p^2)}{(k(1+l)+p)^2(k( \frac{1}{h} +l)+p)^2}

effectively,

0=p(k)kk(Ap1A+2k(1h+l)+p)+k 2(1+l)(1h+l)p 2(k(1+l)+p)(k(1h+l)+p)0=\frac{\partial p(k)}{\partial k}k\left(\frac{\partial A}{\partial p} \frac{1}{A} + \frac{2}{k( \frac{1}{h}+l )+p}\right)+\frac{k^2(1+l)( \frac{1}{h}+l )-p^2}{(k(1+l)+p)(k( \frac{1}{h} +l)+p)}

Note that if h is near zero, any k will serve its job. Also the two following conditions suffice for whatever and and :

k>sup l,h,p (2AApp1h+l)=sup p (2AApp)k> \sup_{l,h,p}^{}\left(\frac{ \frac{2A}{- \frac{\partial A}{\partial p} } -p}{\frac{1}{h}+l} \right)=\sup_{p}^{}\left(\frac{2A}{- \frac{\partial A}{\partial p} } -p\right)

k>sup l,h,p (p(1h+l)(1+l))=1k> \sup_{l,h,p}^{}\left(\frac{p}{\sqrt{(\frac{1}{h}+l)(1+l)} }\right)=1

With exponential distribution example, the two conditions are:

k>2e 1.5=0.446k>2e^{-1.5}=0.446

k>1k>1

so the overall condition is k>1k>1

With uniform distribution example, the two conditions are:

k>2k>2

k>1k>1

so the overall condition is k>2k>2

Also p(h,k,l,Rm)p\left(h,k,l,\frac{R}{m}\right) is increasing with respect to and . is a measure of the impact of infrastructure in term of and the economy size in term of . The larger the k is, the better the blockchain fits the need. Alternatively, another solution to increase percentile is h approaching 1; when h is 1, then p is 1. In a sense, it is people's decision of "to the left" or "to the right" but then a blockchain of h =1 is essentially a centralized database and in my opinion not appealing. Increasing for the sake of higher p is never an option because a super high is like a blockchain on planet Pluto and a blockchain on planet Earth due to speed of light, effectively two distinct blockchains.

As k approaches infinite, p approaches 1 and both miners and consumers agree the block fee qVT which m is approaching too. If miners have stronger bargain power in transaction fee, the equation may be applied by miners to set the m:

m 0 p(Rm)A(u)du=qVTm \int_0^{p\left(\frac{R}{m}\right)} A(u) d u=q V T

and accordingly, the lowest fee per byte maA(p(Rm))m a A\left(p\left(\frac{R}{m}\right)\right)

In the exponential distribution example, the equation is:

mp(Rm)(1ln(p(Rm)))=qVTm p\left(\frac{R}{m}\right) \left(1-\ln\left(p\left(\frac{R}{m}\right)\right)\right)=q V T

Lowest fee per byte ma(ln(p(Rm)))m a \left(-\ln\left(p\left(\frac{R}{m}\right)\right)\right)