Ryan Fugger's original idea from 15 years ago to complete a payment from the direction of the seller and towards the buyer was invented to avoid the "stuck payment" attack problem, and this problem is the main problem in multi-hop payments. Ryan's idea had a race condition, and it could be removed by reducing the size of the penalty (in Ryan's idea 15 years ago the penalty was the full payment). Interledger STREAM payment does this by dividing the payment into small chunks, but, you can also achieve it in the opposite way, and in doing so avoid all the problems "stream payments" have (i.e., limits to how small amount packet and timeout size you can reach, countless transactions to do simple things as main problem). What you can do is instead of timing out full payment at once, you start to continuously cancel chunks of it after you reach the timeout. This is a very simple idea and easy to understand, but the next question is then: how to organize that? To organize it, you need to add two steps.
The first step, sets up an "all-or-nothing" payment that either succeeds, or, ends up being "cleared" slowly with penalties exactly on the users that caused the payment to get stuck (and everyone else gets financially compensated). This step I call "commit", and it goes from the buyer and towards the seller. To avoid stuck propagation, there is a penalty on the buyer once the payment times out which forces them to use "buyer cancels" (authenticated with preimage of payment ID or similar). This penalty results from that in "commit" the payments gets continuously finalized in "chunks" after the timeout (thus the opposite of during "finalize", i.e., when the payment completes). And, from that there is also "buyer fees" added on top of all this (paid out in proportion to how much of payment was "auto-cleared", up to 100%). The "buyer fees" achieve two things: they ensure everyone is financially compensated. And, they avoid an attack where buyer and seller (or user who commit reaches...) are both attackers (where the finalization would just end up with attacker sending money to themselves, thus successfully doing a "stuck payment" attack).
And then, the second step, between "commit" and "finalize", the buyer needs to revoke their right to cancel. This is done with "seal" and there the payment starts to be continuously cancelled such that an intermediary that is not propagating "seal" will start to finalize the payment towards the seller and cancel it towards the buyer, thus being penalized.
Three steps, "commit", "seal", "finalize". Three mechanisms, continuously cancel, finalize, and continuously pay out buyer fees.
Implementation is super easy, as you only need to account for the penalty effect when a decision happens (such as when the user who the payment was stuck at finally decides to propagate the signal, or when a payment was fully cleared by the penalty mechanism and thus removed in full).
99% of it is implemented on
https://bitbucket.org/bipedaljoe/ripple/ (really only missing the "cleanupPayment" handler) and this article describes it well and also has illustrations:
https://ripple.archi/multi_hop_payment_game_theory.pdf.
If I am right, this is what has been missing for a true multi-server Ripple. I originally built my implementation without having an "automated" solution to stuck payment problem (I assumed, and still think, it could be handled socially, manually, but I recognize the value of automating it as well), and based on the feedback I got here it seemed that "stuck payment" attack problem should be automated, so I came up with what might be the perfect solution.
It would be good for the idea if others chime in on if it sounds reasonable, or seems like shit. That way, it can grow in the Ripple community. Everyone here would like to see Ripple succeed and since Ripple is so simple, a true decentralized currency, it could be built by anyone and started from anyone and anywhere, and as many might be wanting to solve this problem, it might be meaningful to evaluate my solution since it seems to be an innovation, and one that is a logical continuation of the ideas Ryan Fugger had developed 15 years ago (just as STREAM payments are... but, theirs is not a good solution).
Peace, Johan