Home Bitcoin lightning community – Methods to compute the anticipated variety of sats to reach in a probabilistic fee move?

lightning community – Methods to compute the anticipated variety of sats to reach in a probabilistic fee move?

0
lightning community – Methods to compute the anticipated variety of sats to reach in a probabilistic fee move?


Let’s evaluation the definition of anticipated worth.
The anticipated worth of the random variable X given the state of the system O,
denoted as E(X,O) is computed as:

E(X,O) = sum_i p_i(O) X_i

The sum is over all microstates (all methods wherein liquidity could possibly be allotted within the channels) or equivalently one can select to sum over all potential observable outcomes. The p_i(O) is the chance of verifying i given the state O, and X_i is the worth that X takes if i is verified.
Utilizing this definition, one instantly sees that E(.,O) is a linear operator:

E(X+a*Y,O) = E(X,O) + a*E(Y,O)

That may be sufficient to reply your query.
You get completely different solutions as a result of you’ve gotten constructed your observables otherwise.

Your observable is the sum of two flows x that goes by means of S-A-R with 1 sat and y that goes by means of S-B-R with 2 sat.

E(x+y,O) = E(x,O) + E(y,O)

Now, x both fails (prob. 1/3) getting us 0 sat or it succeeds giving us 1 sat (prob. 2/3).

E(x,O) = 0*1/3 + 1*2/3 = 2/3

Equally with y

E(y,O) = 0*2/5 + 2*3/5 = 6/5

Including as much as

E(x+y,O) = 2/3 + 6/5 = 28/15

However watch out, that right here we’re assuming that x consequence is unbiased of the end result of y. That is the case in case you are sending two single path funds.

In the event you as a substitute contemplate an atomic multi-path fee wherein both each x and y succeed or none will, then the 2 outcomes for x are once more 1 sat and 0 sat, however with chances 2/3*3/5=2/5 (each x and y succeed)
and three/5 (all different circumstances) respectively:

E(x,O)= 1*2/5 + 0*3/5 = 2/5

equally for y

E(y,O)= 2*2/5 + 0*3/5 = 4/5

Including as much as

E(x+y,O) = 2/5 + 4/5 = 6/5 = 18/15

You might be constructing your observable because the sum of three single path flows (non-atomic):
x representing 1 sat over S-A-R, y representing 1 sat over S-B-R
and z representing 1 sat over S-B-R AFTER y. That is completely different from case B as a result of y and z aren’t hooked up to one another, y would possibly succeed after which z might fail.

Typical computations

E(x,O) = 0*1/3 + 1*2/3 = 2/3

for y

E(y,O) = 0*1/5 + 1*4/5 = 4/5

Then comes z, which can succeed provided that there may be sufficient liquidity for two sats on channel B-R, then

E(z,O) = 0*2/5 + 1*3/5= 3/5

Including up:

E(x+y+z,O) = 2/3+4/5+3/5 = 31/15

Is much like case D however the math is unsuitable.
You might be appropriately computing E(x,O)=2/3 and E(y,O)=4/5, however with
E(z,O) you might be messing up with the conditional chance.

Let’s examine all potential outcomes:

  • y fails, then additionally z fails, prob. 1/5, (having precisely 0 sat liquidity)
  • y succeeds, however z fails, prob. 1/5, (having precisely 1 sat of liquidity)
  • y succeeds, z succeeds, prob. 3/5, (all different circumstances which correspond to having sufficient liquidity for two sat)
    which is similar because the multiplication of y succeeding and the conditional prob. of z succeeding after y does (3/5 = 4/5 * 3/4).
E(z,O) = 0*1/5 + 0*1/5 + 1*3/5 = 3/5

It is very important state that z is tried after y or we get into race situations.

  • Case A is true should you ship a two move atomic fee,
  • Case B is true should you ship two single path funds,
  • Case C is unsuitable,
  • Case D is true should you ship three single path funds.

I’m assured that should you run the experiments you will verify.

LEAVE A REPLY

Please enter your comment!
Please enter your name here