All Episodes
Sept. 23, 2025 - Freedomain Radio - Stefan Molyneux
04:35
What Is an OP_RETURN Transaction in Bitcoin?
| Copy link to current segment

Time Text
Okay, so what is an OP return transaction?
OP return is one of the opcodes in the Bitcoin scripting language.
An opcode is one of many instructions that are understood by nodes when processing transactions.
Bitcoin scripting is called a Bitcoin.
When you send funds from your wallet to an address, two basic scripts come into play.
One script unlocks this is a quote, unlocks the funds from your address or addresses, and another locks the funds to the recipients.
As a regular user, you don't need to create or maintain those scripts, they're just part of your wallet and the overhanging code.
Sent funds become the unspent transaction output or boy, they're not great at acronyms.
UTXO.
I love Unreal Tournament.
UTXO, there we go.
Send funds become the unspent transaction output of a given transaction.
These funds remained locked until the owner of the address decides to do something with them.
Bitcoin's scripting language is also highly customizable.
The rules that govern the transaction are represented in code and can either be public on chain or agreed upon off chain.
Off chain rules allow for greater complexity as well as ensuring sensitive information is kept private and are represented with a hash on the transactions.
So what what are we talking about here?
Well, some examples of these rules are transactions that require multiple signatures before funds are sent.
Transactions that require partial agreement from responsible parties, say two out of three, people must approve time-based approaches, valid only until X time or valid only after X time or shared passwords and so on.
These scripts are typically included in wallet applications, so users do not need to know how to do scripting to perform these kinds of transactions.
The OP return script is another variant that renders the transaction output as unspendable, right?
So you want to always prevent double spending on a blockchain and a lot of uh effort and energy is spent in by most cryptos to make sure you can't double spend, right?
To send your uh because it takes a while to verify transactions on the blockchain, you don't want to say, I'm gonna buy ten things with all of that, right?
I want to buy ten things and then you can only pay for one.
So the OP return script is another variant that renders the transaction output as unspendable.
These transactions are typically submitted with zero Bitcoin and are used to send arbitrary data to the blockchain.
Once confirmed by miners, the miners are the ones who process the blockchain in return for the reward of possibly getting Bitcoin.
This transaction is then available to the rest of the network and relate accordingly.
The OP return script contains an arbitrary value set by the person who created the transaction.
There can only be one OP return output per transaction.
Right?
So it's uh you know, if you've ever sent something by mail, registered, you get a message when it's been sent or signed for or something like that.
Or you send something to someone and you call them and say, Hey, did you get that thing?
Uh so this is the kind of thing, right?
At present the value allowed, as we said by the OP return opcode is eighty-three bytes.
That's eighty-three ones and zeros.
That's pretty small.
This limitation was put in place starting in 2014.
After developers on the Bitcoin network started using it to include significant amounts of data as part of their applications.
So when uh library or LBRY was running, I would uh put uh WAV files on their blockchain.
And I got messages saying, hey, can you replace those with flag files?
In other words, flack off with your web files.
Totally fair.
Totally fair.
There was, I can't remember the name of it now.
There was a video service that I used for quite some time.
I actually spoke with the um CEO for a while.
But there was video service that I used for a while where they were putting video in a blockchain, and uh that did not sadly last.
Well, for reasons of of sort of we can understand, right?
Okay, so why did they put this limitation in 2014?
Well, they wanted to keep transactions on the blockchain small to maintain efficiency and avoid bloat.
Discourage non financial data storage to keep Bitcoin focused as a decentralized payment system, right?
I mean, can you imagine if if uh your visa transactions uh all of them included a selfie, you know, or a five minute video of you singing, hey Macarena.
Well, I mean that would completely kill the speed of the visa network, right?
Export Selection