I had an idea of Taprootized Atomic Swaps for reaching the untraceability of transactions related to a particular swap.
Atomic swap is an incredible approach to cross-chain exchanges without mediators. However, one of the disadvantages of its implementation in the classical form is the “digital trail” - any party can make a matching between transactions in the blockchains in which the exchange took place and find out both the participants in the exchange and the proportion in which assets were exchanged.
A concept of taprootized atomic swaps is hiding the swap's very fact. To an external auditor, transactions to initiate and execute atomic swaps will be indistinguishable from regular Bitcoin payments. In the other accounting system involved in the transfer, more information is disclosed (the fact of exchange can be traced). Still, it is impossible to link this to the corresponding Bitcoin transactions (without additional context from the involved parties).
The protocol description:
1. Alice (skA, PKA) and Bob (skB, PKB) have their keypairs and know each other's public keys.
2. Alice generates a random k and calculates the public value: K = k * G
3. Alice calculates an escrow public key as PKEsc = K + PKB (PK aggregation mechanism)
3.1 The signature for the escrow public key can be generated only with the knowledge of k and skB
4. Alice calculates h as a hash value of k (zk-friendly hash function is recommended to use)
5. Alice forms the funding transactions with the following conditions of how it can be spent (all these conditions can be put into P2TR):
5.1 Signature of skEsc: only Bob, with knowledge of k and skB can spend the output
5.2 Signature of skA + Locktime1: Alice, with knowledge of skA can spend the output, but only after some point in time t1
6. Alice sends the transaction to the Bitcoin network
7. Alice generates the zero-knowledge proof that includes:
7.1 The proof of knowledge of k that satisfies k*G == K
7.2 The proof of knowledge of k that satisfies zkHash(k) == h
8. Alice provides the set of data to Bob: h, K, PKEsc, proof
9. Bob performs the following verifications:
9.1 Verify that PKEsc == K + PKB, it means that the valid PK of Bob was added to escrow PK
9.2 Verifies that Alice knows k that satisfies k*G == K and zkHash(k) == h, it means that Bob can access the output PKEsc if he receives k
10. If verifications are passed, Bob forms the transaction that locks his funds on the following conditions:
10.1 Publishing of k and the signature of skA: only Alice can spend it if she reveals k
10.2 Signature of skB + Locktime2: Bob, with knowledge of skB, can spend the output, but only after some point in time t2
11. Bob sends the transaction to the Ethereum network (or other that supports zkHash() function or smart contracts)
12. Alice sees the locking conditions defined by Bob and publishes the k together with the signature generated by her skA. As a result - Alice spent funds locked by Bob.
12.1 If Alice doesn’t publish the relevant k, Bob can return funds after Locktime2 is reached
13. If Alice publishes a transaction with k, Bob can recognize it and extract the k value
14. Bob calculates the needed skEsc as skEsc = k + skB (or generates two signature values and aggregates them)
15. Bob sends the transaction with the signature generated by the skEsc and spends funds locked by Alice.
So, on the Bitcoin network, it will look like two regular payments; no info about the swap is revealed (if everything went fine).
Happy to receive some feedback and improvement proposals (you can leave it here
https://docs.google.com/document/d/1mVMElv5smDalqD67D9zniwfFfmSg2badeAIZwgW-0kU/ as well)