Detailed protocol design for routed multi-transaction CoinSwap appendium



Summary:

A new version of the CoinSwap protocol has been released, offering a secure and private way to exchange cryptocurrencies. The protocol involves staggered timelocks, hash preimages, and anti-DOS features, ensuring that each party can retrieve their coins in case of an abort while maintaining privacy. The protocol includes multi-transaction CoinSwaps, routed CoinSwaps, liquidity market, private key handover, and fidelity bonds.One of the features of the protocol is routed CoinSwaps, which have one market taker and two makers but can be extended to any number of makers. Funding transactions pay into the 2-of-2 multisig addresses, while contract transactions may spend from the 2-of-2 multisig outputs. To prevent attacks such as low miner fees or intentional transaction abortion, parties must refuse to sign a contract transaction if the corresponding funding transaction pays miner fees greater than the attacker's. Collateral payments are suggested to avoid post-coinswap-theft-attempts.The v2 design for CoinSwap is explained in detail through a step-by-step process involving three parties: Alice, Bob, and Charlie. The taker does not require collateral payments and can fully spend their entire wallet in one set of CoinSwaps. Contract transactions have different versions depending on who knows them. The table of balances before and after a coinswap resolved with contract txes known to senders shows everyone gets their money back and pays for their own miner fees. Successful CoinSwap but with one post-CoinSwap-theft-attempt will result in the Bob losing K bitcoins and an extra miner fee while Charlie gains K bitcoins.The document provides a detailed analysis of possible attacks, deviations from the protocol, miner fees, and vulnerabilities of RBF. Parties must always be watching the network and ready to respond with their own sweep using a preimage. Alice's reaction of blacklisting both fidelity bonds might not be the right way, because one maker could use it to get another one blacklisted (as well as themselves).Overall, the CoinSwap protocol aims to provide a secure, private, and efficient way of exchanging cryptocurrencies between parties.


Updated on: 2023-05-20T23:57:05.456253+00:00