I want a Bitcoin opcode that checks, for a given hash and block height, whether an OP_RETURN containing the preimage appeared before that height.
This could be useful for Lightning-like channels buried deep inside shared UTXO structures like Ark (or LayerTree?).
Imagine a payment X → Y → Z, where both channels are inside separate Ark (or LayerTree?) trees.
Y can be confident that either the preimage appears on-chain before the deadline, or it doesn't. In either case, Y won't lose money: the payment either goes through both channels or neither.
If X or Z stops cooperating, Y doesn't need to urgently unroll an entire Ark (or LayerTree?) tree to claim an HTLC. The preimage can be published independently, and the actual channel settlement can happen much later.
We'd probably want slightly staggered deadlines, giving each intermediary time to publish the preimage after settling its outgoing payment. This should make everyone more willing to cooperate and finalize their channel updates, even as the deadlines approach.
This doesn't solve the other Lightning risk: a counterparty broadcasting an old channel state. But to do that, they'd first have to unroll the Ark (or LayerTree?) tree anyway. That gives us more time to react, and once the tree is unrolled, we'd only need to broadcast one transaction to punish the old state.
Apparently Sprites (https://arxiv.org/abs/1702.05812) proposed a related global preimage mechanism for Ethereum, though it used a single deadline. Ours would use a Bitcoin opcode and a registry of on-chain preimage revelations.
This could be useful for Lightning-like channels buried deep inside shared UTXO structures like Ark (or LayerTree?).
Imagine a payment X → Y → Z, where both channels are inside separate Ark (or LayerTree?) trees.
Y can be confident that either the preimage appears on-chain before the deadline, or it doesn't. In either case, Y won't lose money: the payment either goes through both channels or neither.
If X or Z stops cooperating, Y doesn't need to urgently unroll an entire Ark (or LayerTree?) tree to claim an HTLC. The preimage can be published independently, and the actual channel settlement can happen much later.
We'd probably want slightly staggered deadlines, giving each intermediary time to publish the preimage after settling its outgoing payment. This should make everyone more willing to cooperate and finalize their channel updates, even as the deadlines approach.
This doesn't solve the other Lightning risk: a counterparty broadcasting an old channel state. But to do that, they'd first have to unroll the Ark (or LayerTree?) tree anyway. That gives us more time to react, and once the tree is unrolled, we'd only need to broadcast one transaction to punish the old state.
Apparently Sprites (https://arxiv.org/abs/1702.05812) proposed a related global preimage mechanism for Ethereum, though it used a single deadline. Ours would use a Bitcoin opcode and a registry of on-chain preimage revelations.