Intervening / interrupting UTXO transactions

https://docs.google.com/document/d/12atK0oEME0y1GHo_HmqhrcZ3pQeEqB_0tFKknhsjsLY/edit#

Suppose we are interacting with auction contract.

Bob posts a transaction with bid Alice posts a transaction with lower bid, slightly before bob.

Alice consumed the original UTXO since she sent first. Bob’s transaction with original UTXO becomes invalid because Alice went first and consumed it.

Alice can keep front running Bob, making it impossible for Bob to consume UTXO.

Solution

  1. Contracts accept malleable transactions that do not depend on UTXO of the contract. Uses ckb-vm library to implement conv.

  2. Algorithm for miners to recognize the convention, detect what validity conditions exactly a signed transaction does or does not depend on, and automatically re-run an updated transaction with a modified contract UTXO when appropriate.

  3. An optimization heuristic for miners to optimize their earnings based on the available pool of potential transactions.