Pools without covenants

Pools without covenants

Original Postby 40000bytes

Posted on: May 3, 2024 21:19 UTC

The process of Coinjoin, a method used for enhancing privacy in Bitcoin transactions, is known to demand extensive interaction among participants.

Recent research points to a potential simplification of this process by employing the SIGHASH_ALL | SIGHASH_ANYONECANPAY signature scheme, which notably reduces the number of steps required for a transaction. Additionally, the use of Nostr encrypted channels has been suggested as a means to allow users to participate without the need to remain constantly online. Payment Pools have been introduced as a concept allowing for "rolling coinjoin" transactions, which would facilitate continuous mixing of coins. However, the implementation of such pools faces significant hurdles without the introduction of covenants, a type of Bitcoin transaction that imposes additional conditions on how funds can be spent.

To address these challenges, a novel solution leveraging both SIGHASH_ALL | SIGHASH_ANYONECANPAY and Nostr encrypted channels has been proposed. This approach enables the creation of pools where users can join at any time and exit collectively, with the option for unilateral exits also available through the use of pre-signed transactions, possibly requiring multisig setups and some degree of interaction among participants. An ongoing project, the electrum plugin for joinstr, exemplifies this method's application, though it remains under development. The plugin uses a basic method for creating Nostr channels outlined in NIP 4, with further enhancements possible through other NIPs found in the nostr repository.

The practical aspects of creating and joining these innovative pools are illustrated through code excerpts. These snippets detail functions for channel creation and joining, demonstrating the use of programming techniques like threading and JSON handling to facilitate the pooling process. Importantly, the paid relay feature is incorporated to mitigate the risk of denial of service attacks, underscoring the thoughtful consideration given to security and reliability.

In broader discussions, the terminology surrounding these innovations has been debated, with a preference shown for the term "pools" to describe the collaborative structures enabling not only coinjoin transactions but potentially other applications as well, such as Discreet Log Contracts. This dialogue indicates an ongoing exploration of the technology's utility beyond its initial privacy-focused intent, suggesting a wider field of application for the mechanisms developed.