mit-dci / lit

Lightning Network node software
MIT License
551 stars 119 forks source link

Add a convenience function for atomic swapping #245

Open gertjaap opened 6 years ago

gertjaap commented 6 years ago

Could be worked on after #236 and #237 are implemented.

Would use the HTLC functionality to negotiate and execute an atomic swap between two peers that have two channels between each other:

_____                            ___
|   | ------ (0.05 BTC) ------> |   |
| A |                           | B |
|___| <----- (100 VTC) -------- |___|

Could use #244 to automatically negotiate the rate of exchange

Could use #243 and #242 to automatically find more complex path to swap (in this example, A swaps BTC for VTC via B and C):


A ---(0.05 BTC) --->  B ---(0.05 BTC)---> C
^                                         |
|---------------(100 VTC)-----------------|
gertjaap commented 6 years ago

This is a breakdown of #216