I'm reading
lnbook - onion routing, and I feel that the authors, while they've done a great job, don't make this clear enough. My question is: How do you ensure transaction finality with onion routing?
Alright, so let's take the same example. Alice wants to send 100,000 sats to Dina, and Bob & Chan are intermediaries.
1. Dina sends Alice her secret R's hash (H).
2. Alice tells Bob that if he pays Chan 100,100 sats, she'll pay Bob 100,200 sats if he gives her R.
3. Bob tells Chan that if he pays Dina 100,000 sats, he'll pay Chan 100,100 sats, if Chan gives him R.
4. Chan pays Dina 100,000 sats, if Dina gives him R.
Now, this is the step I don't quite understand on how we eliminate trust. Once Dina receives the 100,000 sats, what forbids her from denying to reveal R to Chan?
Secondly, if Chan gets the secret R, what forbids him from not giving it to Bob (so he can later give it to Alice)?
Thirdly, as far as I can tell, the user who firstly moves money is Chan (to Dina). Then, Chan expects from Bob to get the 100,100 sats. What forbids Bob from denying to give it to him?
I'm 99% sure that I lose it when it comes to the
OP_SHA256 H OP_EQUAL scripts. How do Alice, Bob, Chan and Dina eliminate trust, ensure that R will reach Alice, and all that with every sat being sent rightly? Is there a chance the money "get stuck" in the middle?