Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOB]: Swap HTLC via Taproot+Musig2 #121

Closed
rajarshimaitra opened this issue Mar 30, 2024 · 0 comments
Closed

[SOB]: Swap HTLC via Taproot+Musig2 #121

rajarshimaitra opened this issue Mar 30, 2024 · 0 comments
Labels
Summer of Bitcoin SOB Project Issues

Comments

@rajarshimaitra
Copy link

Swap HTLC via Taproot+Musig2

Description

The current coinswap protocol operates by constructing Hash Time Locked Contracts (HTLCs) between Takers and Makers. These HTLCs are expressed as WSH scripts. The contract Redeemscript is defined here.

Further optimization of HTLC contracts can be achieved by leveraging Taproot and Musig2. In this optimization, the individual hashlock and timelock scripts are represented as two leaves of Taproot at a depth of 1. The internal public key becomes the aggregated Musig2 key, combining the public keys of the Sender and Receiver.

This optimization allows for the consolidation of funding and contract transactions into a single Taproot transaction, reducing the cost of the swap and providing anonymity akin to all Taproot transactions.

Expected Outcomes

  • Translation of the WSH contract into a Taproot contract.
  • Aggregation of internal keys using Musig2.
  • Successful swap implementation using Taproot and Musig2.

Resources

Skills Required

  • Proficiency with Git. Guide
  • Experience with Rust. First seven chapters of the book
  • Ability to set up a local core node in regtest mode and mine blocks.
  • Familiarity with BDK v1.0 API.
  • Understanding of Coinswap Wallet.

Mentor(s)

@rajarshimaitra

Difficulty

Hard

Competency Test

  • Install Rust, compile, and run all the coinswap tests.
  • Set up a local Bitcoin Core in regtest mode. Create a wallet, receive and send transactions via bitcoin-cli.
@rajarshimaitra rajarshimaitra added the Summer of Bitcoin SOB Project Issues label Mar 30, 2024
@mojoX911 mojoX911 added this to the taproot-musig2 milestone Jun 27, 2024
@mojoX911 mojoX911 removed this from core lib Jun 27, 2024
@mojoX911 mojoX911 removed this from the taproot-musig2 milestone Aug 1, 2024
@mojoX911 mojoX911 closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Summer of Bitcoin SOB Project Issues
Projects
None yet
Development

No branches or pull requests

2 participants