bitcoin-dev

Design for a CoinSwap implementation for massively improving Bitcoin privacy and fungibility

Design for a CoinSwap implementation for massively improving Bitcoin privacy and fungibility

Original Postby Chris Belcher

Posted on: June 10, 2020 10:15 UTC

The email conversation discusses the implementation of a new Coinswap protocol.

The protocol splits Coinswap into two phases, "channel establishment" and "HTLC forwarding", followed by "HTLC resolution" and "private key handover". The Spilman channel creates a temporary unidirectional time-bound channel, reusing the same timelock as the HTLC that is expected to instantiate. This allows for simultaneous funding transactions without the risk of race loss. However, they still have to wait for deep confirmation before signing contract transactions, and Bob has to wait for the incoming contract transaction before signing its outgoing contract transaction. The scheme breaks private key handover because relative timelocks need to start ticking down only after a contract transaction is confirmed. The proposed alternative, swap-on-receive+swap-on-change, may not be appropriate for every threat model and use case but is useful when Bitcoin is being used more as day-to-day money.