How are failed transactions treated on Interledger?
When you send an ILP Prepare
packet, you will either get a Fulfill
or Reject
packet back. If it’s a Fulfill
, you know your transaction made it to the receiver. If it’s a Reject
, meaning that the transaction failed for some reason, no money will have been transferred and the balances along the path will be restored to their previous state. Reject
packets include error codes to help the sender figure out why the Prepare
didn’t go through.
Just to add to Evan’s comments, the above is what happens on the lower level of an ILP transaction. Higher levels like STREAM will take this into account and will be able to gracefully handle failed packets by proceeding to send more packets if some are rejected.
Currently there is a scenario where a failed transaction creates risk between two peers and that is if a failure occurs when a fulfillment is being passed back to the sender.