OP_LOOKUP_OUTPUT proposal [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2019-08-12T13:15:04+00:00


Summary:

The email exchange discussed various aspects of atomic swaps, payment channels, and the challenges associated with them. One proposed solution involved using the OP_LOOKUP_OUTPUT opcode to check the status of a dependent transaction before claiming the premium. However, there was disagreement about whether this opcode could look at anything outside of the transaction spending from the script.Another topic of discussion was the protocol for atomic swaps proposed by Fournier et al. The protocol involved creating a payment channel on the WJT blockchain, with one party responsible for preparing the WJT transaction and the other responsible for preparing the BTC transaction. Concerns were raised about potential attacks or double-spending if both parties published transactions simultaneously. It was clarified that the correct order of the protocol would prevent such issues, and there was no need for optimism as most payment channel systems have unilateral closes.The group also discussed the problem of non-cooperation in payment channels. It was pointed out that any payment channel has the risk of non-cooperation by the other party, and introducing various attacks only increases the likelihood of it occurring. This makes it difficult to support multiple currencies on the same Lightning network.Moving on to the proposal itself, it discussed the profitability of arbitrage with the default timelock setting, estimating a profit range of 1% to 2.3%. Previous studies had suggested solutions to this problem but introduced the issue of Bob receiving the premium without payment. To address this, a new opcode called OP_LOOKUP_OUTPUT was proposed. This opcode would allow the transaction verifier to determine the status of a dependent transaction, which Bitcoin does not currently support. By using OP_LOOKUP_OUTPUT in the Bitcoin script, a decision could be made on whether Alice or Bob should receive the premium.The proposal also explored the application of Atomic Swaps in an American Call Options scenario, where Alice is required to pay for the premium regardless of the success of the swap. A sample implementation of a premium transaction for Atomic Swaps involving Spot and Option was provided based on the OP_LOOKUP_OUTPUT opcode.For more details on the proposal, the BIP draft can be accessed at https://github.com/HAOYUatHZ/bips/blob/bip-lookup_output/bip-lookup_output.mediawiki. Overall, the proposal aimed to eliminate risk-free optionality in Atomic Swaps by introducing the OP_LOOKUP_OUTPUT opcode, which used premiums to mitigate risks in both Spot and Option scenarios.


Updated on: 2023-08-02T01:16:02.707170+00:00