MATT

Merkleize All The Things

Introduction

MATT is a proposal to enable a fraud-proof system for smart contracts on Bitcoin. It can compile very general programs into a merkleized execution tree, for which fraud proofs can be executed on the Bitcoin main chain.

Specification

A WIP specification of the new opcodes MATT would introduce can be found on GitHub

Currently, they are the following:

  • OP_CHECKINPUTCOVENANTVERIFY
  • OP_CHECKOUTPUTCOVENANTVERIFY
  • OP_CAT
  • OP_PUSH_ANNEX_RECORD

Use Cases

A very wide range of use cases can be enabled by MATT, through its ability to execute fraud proofs for arbitrary programs. When it comes to covenants, however, it seems that transaction introspection is achieved primarily by using the individual opcodes enabled by the proposal.

Vaults

Salvatore has written an in-depth example of how vaults could be implemented using MATT, as well as a draft implementation for Bitcoin Inquisition.

Joinpools

Johan Halseth wrote to the bitcoin-dev mailing list how MATT, together with OP_CAT can be used to implement Payment Pools.

CTV

Johan Halseth wrote how CTV can be implemented using MATT.

Edit this page on GitHub