Start typing to search this publication.
crypto.news logo crypto.news
Open menu
crypto.news logo

Subscribe to crypto.news

Get new posts delivered straight to your inbox.

OP_RETURN in a Bitcoin transaction: what the extra output does

crypto.news avatar crypto.news
3 min read

An extra output in a Bitcoin bridge deposit is often OP_RETURN: a provably unspendable output that stores a small piece of data, such as instructions for where the deposit should go.

  • The OP_RETURN output carries data and should hold 0 sats.

  • A separate, spendable output carries the BTC being deposited.

  • The extra bytes increase the transaction’s virtual size and miner fee.

OP_RETURN stores data without creating a spendable UTXO

OP_RETURN is a Bitcoin script instruction that makes an output impossible to spend. A script beginning with OP_RETURN fails when executed, so Bitcoin nodes can leave that output out of the UTXO set while its data remains in the transaction recorded in a block.

Bitcoin transactions have inputs and outputs, but no general memo field. An OP_RETURN output gives a service a dedicated place to put compact instructions alongside a payment. TeleSwap uses this arrangement for cross-chain requests. The bridge context at teleswap.net explains why a BTC payment may need destination instructions in the same transaction.

The distinction from a UTXO matters when you inspect the outputs. A payment output creates BTC that its recipient can later spend; an OP_RETURN output creates no spendable BTC. A wallet may also show a personal transaction note, but that note is not necessarily part of the Bitcoin transaction. The OP_RETURN data is.

Data capacity depends partly on node relay policy. Bitcoin Core long used an 80-byte default for OP_RETURN data; version 30 raised its default data-carrier limit. Those defaults govern which transactions a node normally relays or mines, rather than changing the consensus rule that makes OP_RETURN unspendable. See the Bitcoin Core v30 release notes for the policy change.

The BTC goes to a Locker, while OP_RETURN carries the request

A TeleSwap deposit places the BTC amount in an output paying a Locker and puts the cross-chain request in a separate OP_RETURN output. That request encodes details such as the destination chain, the recipient’s EVM address and the request type. Those details tell the bridge how to handle the deposit after it verifies the Bitcoin transaction; the Locker output supplies the BTC.

Say you are reviewing a bridge transaction before signing. The Locker output should show the BTC amount you intend to deposit, and the OP_RETURN output should show 0 sats. Your wallet may also include a change output returning unused BTC to you. Its presence does not move the deposit amount out of the Locker output.

Putting sats in OP_RETURN burns them forever. No later transaction can spend that output, so its value cannot reach the Locker or be recovered as change. Correcting an address or request type after broadcast likewise requires a new transaction; editing a wallet label cannot alter the bytes already sent.

Can OP_RETURN data be changed or deleted?

Confirmed OP_RETURN data stays in its Bitcoin transaction and cannot be edited. A node may prune its local copy of old block data, but that does not delete the transaction from the blockchain. Before confirmation, replacing a transaction means broadcasting a different transaction under the network’s applicable replacement rules.

Does an OP_RETURN output raise the transaction fee?

An OP_RETURN output increases transaction virtual size because its script and data take space. At a given fee rate, more virtual bytes mean a higher miner fee; the amount depends on the payload and the rate you choose. That fee is separate from any sats assigned to the output, which would be burned.

Before signing a bridge deposit, confirm that the Locker receives the intended BTC and the OP_RETURN output holds 0 sats.

Subscribe to crypto.news