Sunday, July 6, 2025
HomeBitcoinHow one can compute the anticipated variety of sats to reach in...

How one can compute the anticipated variety of sats to reach in a probabilistic cost circulation?

Have a look at the next community instance:

How one can compute the anticipated variety of sats to reach in a probabilistic cost circulation?

Assume S needs to ship 3 sats to R. You possibly can additional assume that S has sufficient liquidity in every of its native channels to ship as much as 3 sats. Additionally assume the liquidity in channels (A,R), (B,R) and (C,R) is uniformly distributed.

one optimally dependable cost circulation on this diagram appears like this:

1 sat: S --> A --> R   likelihood: 2/3
2 sats: S --> B --> R  likelihood: 3/5

This circulation has a complete likelihood of 2/3*3/5 = 2/5 = 0.4 = 40%

The query:

How one can compute the anticipated worth of Satoshis to reach at R if S sends 3?

Choice A

(which I already know is fallacious however I write it down as a result of I believe some individuals might need the same first thought)

Initially I assumed this is able to simply be 3 sats * 2/5 = 6/5 sats = 1.2 sats which is what one will get from multiplying the quantity to ship with the likelihood of the circulation. This appears unusual as sending 2 sats alongside S-->B-->R has a likelihood of 3/5 and with the reasoning of above an expectation worth of 2 sats * 3/5 = 6/5 sats = 1.2 sats. because the anticipated worth for 1 sat alongside the S-->A-->B path is bigger than 0 this is able to be a contradiction to the additivity of the anticipated worth.

Choice B

Ranging from the above reasoning we add the anticipated values for the disjoint paths so:

E[3 sats] = 1 sat * 2/3 + 2 sat * 3/5 = 10/15 sats + 18/15 sats = 28/15 sats

Choice C

In fact the two satoshi path S-->B-->R doesn’t need to be despatched as one onion however might be despatched as two onions with 1 sat every:

The primary has a likelihood of 4/5 and the second has a conditional likelihood of 3/4 which is extensively defined at this situation. With the logic from possibility B one ought to be capable of add these anticipated values.
so now we have the anticipated worth for sending two sats in two seperate 1 sat onions alongside S--> B --> R can be computed as:

E[2 sats] = 1 sat * 4/5 + 1 sat * 3/4 = 31/20 sats 

If we add the 1 sat onion from the S-->A-->R which was 2/3 sats

we might anticipate to have

E[3 sats] = 31/20 sats + 2/3 sats = 93/60 sats + 40/60 sats = 132/60 sats = 33/15 sats

That is 5/15 sats = 1/3 sats greater than the reply in possibility B

Choice D

To make issues worse I’m confused if the anticipated values of dissecting the two sat onion in possibility C into two 1 sat onions can simply linearly added up because the second onion is conditioned on having 2 sats of liquidity within the channel. If the primary onion has failed the second will definitely fail. Thus one must compute anticipated worth for sending two 1 sat onions like this:

E[2 sats] = 1 sat * 4/5 + 1 sat * 3/5 = 7/5 sats

this is able to lead to a complete anticipated worth of:

E[3 sats] = 2/3 sats + 7/5 sats = 10/30 sats + 21/15 sats = 31/15 sats

Ideas

only for comparability listed below are the outcomes

  • Choice A: 18/15
  • Choice B: 28/15
  • Choice C: 33/15
  • Choice D: 31/15

Whereas Choice B appears actually proper it is smart to additional dissect the two sats onion. In simulations I did evidently Choice D is appropriate which is a bit stunning for me. Utilizing the formalism of likelihood principle the distinction for the two sat path is:

  • Choice C: E[2 sats] = 1 sat * P(X>=1) + 1 sat * P(X>=2 | X >= 1)
  • Choice D: E[2 sats] = 1 sat * P(X>=1) + 1 sat * P(X>=2)

As stated the simulated setting signifies that Choice D is the right reply however that’s extremely stunning to me as I might anticipate the second time period to be a conditional probabilty.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments