There has been a lot of debate recently about OP_RETURN limits, and one of the restrictions limits the number of OP_RETURN outputs that can be used in a transaction. Using Libre Relay, it's already possible to relay transactions that use more than one OP_RETURN output.
Can we use multiple OP_RETURN in coinjoin transactions?
Coinjoin can be used by ordinals users to hunt sats. It doesn’t require the use of OP_RETURN and there is an open issue to implement it in ord.
Runes users can benefit from OP_RETURN and coinjoin in 2 ways although it will require some changes in the protocol:
- Mint multiple runes in the same transaction. If multiple runes are minted in a bitcoin transaction it would look like this:
It will need some coordination between users however, improves privacy in minting and cost in some cases.
- Coinjoin can also be done while transferring mint. This is an example runes transfer transaction: 05e9c6b6c1b23ee6676d030090d64f7334f6f20c3d09f9878817a617d8233a14
There is another degen protocol for minting tokens called OP-20 which uses OP_RETURN however it does not allow more than one mint in a transaction.
Example transaction: 05e9c6b6c1b23ee6676d030090d64f7334f6f20c3d09f9878817a617d8233a14
What other use cases could benefit from multiple OP_RETURN and coinjoin?
OpenTimestamps can also use multiple OP_RETURN outputs in a single transaction. Batching would reduce the cost and coinjoin could improve privacy.
Here is an example OpenTimestamps transaction: 3371fa8d145d917c1f8f5f302f00ba9381570e927f02160032331c1f74d19e36
Conclusion
Every protocol that uses OP_RETURN would benefit from multiple OP_RETURN outputs in the same transaction. They could either use batching or coinjoin depending on the priority of users.