Phoenix uses the swap-in potentiam scheme to trustlessly swap on-chain deposits to Lightning with 0 confirmations channels.
This scheme introduces a duration of 4 months during which swaps can be attempted. After this four months have passed, deposits that have not been swapped time out and enter a grace period of two months. After this two months period has passed, these deposits can be unilaterally spent by the user's wallet to any address.
Getting the closest timeout
PeerManager exposes a new swapInNextTimeout flow that contains a Pair of Utxo -> Block to timeout.
Swap-in screen
This PR improves the swap-in screen by discriminating funds according to their status (confirming, swappable, timed-out, and cancelled), based on their confirmation count.
Note that in the screenshot below, the timeout was set to 1 month for a test, but production value is 4 months.
This elements are not clickable. The UI does not display the details of each UTXO with their remaining block count before timeout. I've tried doing this and it made things overwhelmingly complex while bringing no real utility to the user.
Notice in home
An important notice is also added to the home screen, if a swap is going to time out soon (< 1 month). Also the icon changes to /!\ if the timeout is less than a day (not the case on the screenshot below).
System notification
The notifications for pending deposits will mention the timeout if it is available at the time of the notification.
Phoenix uses the swap-in potentiam scheme to trustlessly swap on-chain deposits to Lightning with 0 confirmations channels.
This scheme introduces a duration of 4 months during which swaps can be attempted. After this four months have passed, deposits that have not been swapped time out and enter a grace period of two months. After this two months period has passed, these deposits can be unilaterally spent by the user's wallet to any address.
Getting the closest timeout
PeerManager
exposes a newswapInNextTimeout
flow that contains aPair
ofUtxo -> Block to timeout
.Swap-in screen
This PR improves the swap-in screen by discriminating funds according to their status (confirming, swappable, timed-out, and cancelled), based on their confirmation count.
Note that in the screenshot below, the timeout was set to 1 month for a test, but production value is 4 months.
This elements are not clickable. The UI does not display the details of each UTXO with their remaining block count before timeout. I've tried doing this and it made things overwhelmingly complex while bringing no real utility to the user.
Notice in home
An important notice is also added to the home screen, if a swap is going to time out soon (< 1 month). Also the icon changes to
/!\
if the timeout is less than a day (not the case on the screenshot below).System notification
The notifications for pending deposits will mention the timeout if it is available at the time of the notification.