Beersy
BRC-18

Pay to False Return

The blockchain can carry data as well as money, but data has to be attached to an output nobody can spend. This defines how to write such an output and the practices to follow when putting data in one.

No author creditedchanged 7 Apr 20231 min read
OP_FALSEOP_RETURNdata

Summary

Why
Developers need a standard way to store arbitrary data in a Bitcoin SV transaction without creating a spendable, and therefore misleading, output.
What
BRC-18 defines the script template, a pattern used to store data on the blockchain in a deliberately unspendable output.
How
A developer builds an output whose locking script starts with OP_FALSE then OP_RETURN, followed by one or more data pushes, and includes it in a transaction.

What this lets you do

  • Store arbitrary data in a transaction output
  • Mark an output as intentionally unspendable
  • Push data across multiple stack elements after OP_RETURN
  • Timestamp data via inclusion in a mined block
  • Avoid bloating the spendable set with data records

Written by claude-sonnet-5 from the specification text. Where the two differ, the original is correct.

Reference for an AI

Everything an assistant needs to answer questions about BRC-18 accurately, including what it depends on.

The specification

Abstract

The script template is a method for storing data on the Bitcoin SV blockchain. It creates a non-spendable output and appends the desired data to the end of the script for storage. This standard aims to define the rules and best practices for using this script template.

Motivation

The low transaction fees and high capacity of the Bitcoin SV network make it an attractive option for storing data on the blockchain. The OP_FALSE OP_RETURN script template is a widely used method for achieving this goal due to its simplicity and ease-of-use.

Specification

To use the OP_FALSE OP_RETURN script template, an output must be included in a Bitcoin transaction with a comprising OP_FALSE followed by OP_RETURN, followed by the data to store in the script. The data can be pushed into one or multiple stack elements after the OP_RETURN opcode.

For example:

.lock
  FALSE RETURN
  <data1>
  <data2>
  <data3>

Implementations

Several implementations and protocols make use of the OP_RETURN script template, including the RUN protocol and Bitcoin OP_RETURN Bytecode (BOB).

Limitations

The main limitation of using OP_FALSE OP_RETURN is the non-spendability of these outputs and their ability to be pruned by miners. They are records rather than tokens. Artefacts predominantly as a proof of existence of data at a certain time - timestamped by the Bitcoin system as a hash with a merkleproof to a block, even if miners themselves prune the data.

Was this helpful?

Search Beersy

Search standards by number, title, author or topic