Written by Regan Grishaber
A Revocable Sequence Maturity Contract (RSMC) is a script used in the Lightning Network to express the present balance of a channel without having to broadcast transactions to the Bitcoin blockchain and without having to trust the counterparty.
After an initial funding transaction that opens up the channel, subsequent commitment transactions are made that spend from the 2-of-2 output of the funding transaction. Each commitment transaction has two half-signed transactions, both signed by the counterparty. When one party is ready to close out the channel, they can sign their received commitment transaction and include the counterparty’s signature, thereby broadcasting the transaction to the Bitcoin blockchain. Only one of these commitment transactions can be broadcast to the base chain since they spend from the same funding transaction.
RSMCs disincentivize either party from broadcasting anything other than the most recent commitment transaction. Both parties agree to send funds to a contract that represents the revocable output balance. If an old commitment transaction is incorrectly broadcast by one party, the counterparty can sign a superseding Breach Remedy transaction that gives all funds to the counterparty.
If both parties agree on the most recent commitment transaction, either party can broadcast a Revocable Delivery transaction, wherein the payment to oneself is encumbered by the RSMC. The contract specifies some waiting period – e.g. 1000 blocks – before the funds can be spent. If both parties wish to keep the channel open, they can defer broadcasting to the base chain and instead create a new commitment transaction that invalidates the prior one
Lightning Network White Paper by Joseph Poon and Thaddeus Dryja
If there is anything you'd like to add or change, you can tweet your feedback at @messari_crypto or email jack@messari.io