Bitcoin Stamps
What are Bitcoin stamps?
Last updated
What are Bitcoin stamps?
Last updated
Bitcoin Stamps are akin to ERC-1155 semi-fungible tokens or digital collectables. However, they are stored directly on Bitcoin’s unspent transaction outputs (UTXOs) – which are records of unspent Bitcoin when transactions between two addresses are made – rather than in the witness data like Ordinals.
In order to understand how Bitcoin Stamps are minted, we also need to understand the Counterparty protocol.
Counterparty is an open-source messaging protocol developed in 2014 that is built on the Bitcoin blockchain. It has a native decentralized exchange (DEX) and token (XCP), allowing users to mint and trade digital assets. When the token launched in 2014, the token generation event utilized Proof-of-Burn (PoB). Users could send BTC to a burn address in exchange for XCP tokens to promote a fair and decentralized token allocation.
The protocol uses OP_Return and multisig transactions to store image data. The OP_Return function allows users to store a small amount of additional information (e.g., note, message, or reference number) up to 80 bytes of data. However, if the file is larger than 80 bytes, the protocol uses a ⅔ multi-sig to store data across multiple outputs. Counterparty software running on a Bitcoin node interprets this blockchain data and indexes the image.
An image is converted to text and encoded as a Base64 file, appending “STAMP:” before the text. The encoded file is then broadcasted to the Bitcoin network using the Counterparty protocol, where the file is broken down and validated on the network. The protocol then recompiles the file data, bringing life back to the original image.
Counterparty uses the Pay to Script Hash (P2ASH) transaction type when minting Bitcoin Stamps. It lets users securely send BTC to a script-linked address like a multi-sig wallet. These transactions settle to the Bitcoin blockchain and can be parsed and indexed by Counterparty nodes. Unlike Bitcoin, Counterparty nodes do not communicate with each other. Their primary role is to connect to Bitcoin software and interpret blockchain data based on specific rules.
Like any transaction on Bitcoin, users who mint Bitcoin Stamps will incur fees. However, they will pay approximately ~4x more than an Ordinals inscription. Ordinals are limited to a single inscription, so assuming a user mints multiple Bitcoin Stamps at one time, the cost of stamping could experience economies of scale. The recommended image size for a Bitcoin Stamp is 24x24px with 8-bit color depth of a PNG, GIF, or similar. Read more here: https://trustmachines.co/blog/bitcoin-stamps-and-how-they-work
Bitcoin stamps can be stored on the BTC address in the wallet (native segwit starting with bc1q...). You may notice that the Stamp address is the same as the BTC balance address and that is as expected Note: It is currently not safe/supported to send them to addresses starting with 3... (wrapped segwit) or bc1p... (Taproot) addresses.
There is a common misconception about how Counterparty works. Unlike Ordinals, which are "tied" to Sats and can be accidentally "sent" to another address, Counterparty is a meta layer that tracks "balances" in a wallet that are not tied to UTXOs at all. Stamps do "encode" their data in UTXOs, but are otherwise not reliant on those UTXOs. Even if you deplete your Bitcoin balance to 0, the Counterparty assets remain in the address. The wallet could be completely blind to Stamps because Counterparty assets can only be "moved" by an OP_RETURN message.
You can't send Stamps yet with Leather. We are working on implementing the feature, follow the progress here: https://github.com/leather-wallet/extension/issues/3714