OpenTransaction Status and the Possibility of Integration into CKB?

Open-Transaction is a long-awaited feature in the Nervos community. It can greatly improve the composability of Cells, and can solve the state contention problem of public Cells, making it possible to simply implement AMM DEX and lending app.

It was previously mentioned that Open Transaction will launch a demo application. What is the current progress? after posting Exploring the CKB OTX Paradigm: Accomplishments and Insights from Building a Transaction Streaming Prototype, is there any progress?

And is Open-Transaction likely to be integrated into CKB? As an extension of CKB Transaction, Open-Transaction should not be very difficult(If Open-Transaction protocol itself has been well-designed), althought a hard-fork is inevitable.

For each transaction, each input has a corresponding witness. We can add an optional attribute otx_field to Witness, or add an otx_fields outside of Witnesses, to determine the OpenTransaction configuration of the transaction.

The configuration of this field will affect the result of calling load_tx_hash when executing the lockscript of the input. That is, the return value of load_tx_hash for each input lockscript is different due to its otx_field.

  • If otx_field is not configured, it is a legacy transaction.
  • If otx_field is configured, then the calculation of its load_tx_hash will only include the specified range corresponding to otx_field.

In this way, we can both be compatible with the legacy transaction format and add the functionality of Open-Transaction. And without changing the code of the lockscript, all lockscripts can support Open-Transaction format transactions, which greatly enhances the composability of Cell programming.


cryptape/ckb-transaction-cobuild-poc : demonstrates how build CKB transaction using a new protocol. This protocol also supports open transaction.


The new Open Transaction is still under design and discussion. It will be included in this repo when it’s ready.