ElementsProject / ElementsProject/peerswap

[RFE] Configurable minimum confs prior to preimage reveal?

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
128
Forks
84
Avg merge
3h 1m
Merged PRs (30d)
1

Description

This is a feature request from a very large LN operator. Please discuss how much work it would take to implement this?

They want the ability to assign each peer different configurable quantity of minimum confirmations prior to preimage reveal. For example, if they trust a particular peer to not double-spend they could reduce the BTC mainnet min confs from the default of `6` to `1`.

I suppose they could also set it to `0`. In that case do we have a way to reveal a preimage with a single onchain transaction directly paying the channel partner? In this use case there is no need for a pre-commitment transaction since they trust this particular peer to not double-spend cheat them. I consider these zero conf swaps to be "trust-based" so maybe you don't even need the preimage reveal step. If we ever implement this we might consider a feerate multiplier like `1.25x` to better ensure that one transaction confirms sooner. It would still be cheaper than two onchain transactions.

L-BTC Design Notes
* If this feature happens I would not allow `lbtc` swaps to be below the already default `2` confirmations. That is already ~2 minutes which is plenty fast enough. The way Liquid works two confirmations are supposed to be "final" because reorgs deeper than one are not allowed.
* If zero conf single onchain tx mainnet swaps are implemented, then zero conf lbtc swaps might as well behave the same way. So `0` and `2` would be supported for lbtc while there isn't a good reason to allow `1`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.