MATT is a simple yet powerful approach for bitcoin smart contracts that is designed to be extremely simple, yet powerful.
It could be enabled as a soft fork with various combinations of opcodes. The most direct way is based on an opcode called OP_CHECKCONTRACTVERIFY (CCV).
Key applications include:
- Scaling and privacy with more powerful layer 2 constructions.
- Trustless bridges for optimistic rollups or other sidechains.
- Vaults for better self custody.
By enabling scalable fraud proof protocols for arbitrary computations, it would bring permissionless innovation in the bitcoin's layer 2 space, while keeping Bitcoin's layer 1 simple and minimalistic.
Start here
Gentle introduction on StackExchange: A beginner-friendly explanation of MATT and its core concepts.
FAQ Answers to common questions about MATT, its implementation, and use cases.
Specs and implementation
BIP draft
bitcoin-core implementation
Discussion on the amount logic of OP_CHECKCONTRACTVERIFY
Presentations
An introduction to MATT and how it enables scalable fraud proofs on Bitcoin.
A deep dive into MATT and the pymatt Python framework, with a re-implementation of James O’Beirne's vaults using CCV.
Timestamps:
Intro to MATT
Vaults
Vault demo
Code in pymatt
Programming with MATT
- Docker image of bitcoin-inquisition + OP_CHECKCONTRACTVERIFY + OP_CAT + OP_CTV for regtest.
- pymatt Python framework for MATT smart contracts, and examples.
Research
- Games in the head (and fraud proofs for the plebs): an exploration on how to optimize 2-party fraud proof protocols implemented with MATT, and an estimate of the worst-case on-chain costs.
- Aggregate delegated exit for L2 pools: an approach for a fraud-proof based exit protocol for shared UTXOs that would allow many users to cooperate in order to withdraw their money.
- elftrace: Johan Torås Halseth's prototype of a compiler for arbitrary computation to RISC-V, and verify in Bitcoin Script via MATT's fraud proofs.
▶️ Optimistic execution of RISC-V in Tapscript: Presentation at btc++ − Austin, May 1st, 2024.
bitcoin-dev
- Original bitcoin-dev post
- Vaults in the MATT framework and code example
- MATT plays Rock-Paper-Scissors + errata
- Johan Torås Halseth's demonstration of CoinPools exit clause using MATT and Merkle trees. (docs) + (code)