Subscriptions

Recurring cancellable subscriptions can be accomplished through pre-signed transactions with HTLCs.

For a two-time recurring subscription, Alice can construct transactions as follows:

Subscription
Subscription pre-signed transactions.

Each pre-signed transaction spends the HTLC UTXO of its parent after the timelock expires (which is set to the subscription period, e.g. 1 month for a monthly subscription). The transaction burns a portion of this UTXO (or otherwise pays for the subscription), and outputs the remainder to a new HTLC whose timelock is offset by another period. At any time, Alice can cancel the recurring payments by spending the HTLC UTXO with the hashlock condition, which is set to return the funds to an address she controls. Her wallet stores the preimage, or it can even be deterministically generated from her private key, e.g. by signing over the subscription identifier.

An additional output can be added to pay fees to the block producer, but that is an implementation detail.