Home /
Learn /
How RGB works
Learn /
Protocol mechanics

How RGB Protocol on Bitcoin

works.

RGB Protocol on Bitcoin has three cryptographic primitives — client-side validation, single-use seals, and the Schema system — working together to make digital asset ownership on Bitcoin possible without publishing contract data on-chain.

12 min read
Intermediate
Updated July 2025
Source

All technical content on this page is based on RGB documentation at docs.rgb.info ↗

01 /
The three primitives

RGB Protocol on Bitcoin is built on three

cryptographic building blocks.

Each primitive solves a specific problem. Together they make it possible to own and transfer digital assets on Bitcoin without any contract data touching the blockchain.

Primitive 1

Client-side validation

Each party validates only their own slice of contract history. Privacy by design, unlimited scalability.

Primitive 1

Single-use seals

Every state transition is bound to a Bitcoin UTXO. Spending it closes the seal — preventing double-spending.

Primitive 1

Schema system

Declarative contract templates define state structure and transition rules — without executable on-chain code.

The order matters: the Schema defines what the contract is, client-side validation ensures only relevant parties see the data, and single-use seals ensure each transition is final and unique. Bitcoin provides the timestamp and double-spend protection.

02 /
Client-side validation

Each party validates

only what matters to them.

In a standard blockchain, every node stores and re-executes every contract. This creates a fundamental scalability and privacy ceiling — all data is public, all nodes bear the full computational load.

RGB inverts this. As stated in docs.rgb.info, “the logic of validation can be reversed”: each participant validates only their own relevant subset of contract history — the Directed Acyclic Graph (DAG) connecting Genesis to their current owned state. This private slice of history is called a shard.

The scalability benefit is direct: since only the tiny cryptographic commitment needs to be stored by all (order of tens of bytes, or zero extra bytes in the Tapret scheme), thousands of RGB transitions from different contracts can be batched into a single Bitcoin transaction with negligible on-chain footprint.

Full explanation → Client-side validation

03 /
Single-use seals

A promise that can only

be kept once.

Definition — docs.rgb.info

“Single-Use-Seal is a formal promise to commit to a (yet) unknown message in the future, once and only once, such that the fact of commitment is demonstrably known to all members of a certain audience.”

docs.rgb.info/distributed-computing-concepts/single-use-seals

Proposed by Peter Todd in 2016, single-use seals are the anti-double-spend mechanism of RGB Protocol on Bitcoin. They work in three steps:

Step 1 — Seal definition

Alice defines the seal

Alice promises Bob to publish a specific message at a defined point in time, using an agreed publication medium — in RGB, a Bitcoin UTXO.

seal ← Define()

Step 2 — Seal closing

Alice closes the seal

Alice publishes the message (an RGB state transition commitment) by spending the UTXO. This produces a witness — proof the seal was closed. The seal cannot be closed again.

witness ← Close(seal, message)

Step 3 — Seal verification

Bob verifies independently

Bob receives the seal, witness, and message, and verifies locally that the seal was correctly closed. No trust in Alice required — the Bitcoin blockchain provides the proof.

bool ← Verify(seal, witness, message)

In RGB, seal definitions are Bitcoin UTXOs. The commitment is a hash embedded in a Bitcoin transaction. The seal closure is the spending of that UTXO. The chain of connected transaction spends represents the Proof-of-Publication — the immutable record that a transition occurred.

This is what makes ownership of RGB assets identical in security to ownership of bitcoin itself: controlling a UTXO means controlling all RGB assets assigned to it via single-use seals.

04 /
Schema system

Contracts defined declaratively,

not as executable code.

An RGB Schema is a declarative template that defines the structure of a contract. As documented in docs.rgb.info, a Schema is the analog of a class in object-oriented programming — it specifies what the contract is, not how to execute it on-chain.

This is architecturally different from Ethereum, where contract code is stored and executed by every node on the blockchain. In RGB, the Schema defines validation rules that are executed locally by AluVM during client-side validation — never on-chain. A Schema answers:

What owned states and assignments exist?
What global state does the contract have?
How is Genesis structured?
What state transitions are possible?
How can state data change within transitions?

After compilation, a Schema is encoded in a .rgb binary file imported by wallet software. Five standard schemas are supported — NIA, UDA, CFA, IFA, PFA — and custom schemas can be built for any use case.

See all supported schemas →

05 /
State & state transitions

From Genesis to the

current state.

As documented in docs.rgb.info, “a State can be defined as a unique configuration of information or data that represents the conditions of a contract at a specific point in time.” Every RGB contract evolves through a chain of state transitions from its first definition (Genesis) to its current active state.

Origin

Genesis

First contract state. Defines global state (ticker, supply) and initial ownership allocations.

Operation

State transition

Consumes owned states (inputs), creates new assignments (outputs). Committed to a Bitcoin UTXO.

Operation

State transition

Each transition builds on the previous, forming a DAG. Ordering guaranteed by Bitcoin timestamps.

Current

Active state

The most recent valid state — the ownership the receiver validates against the full DAG.

Origin

Genesis

First contract state. Defines global state (ticker, supply) and initial ownership allocations.

Operation

State transition

Consumes owned states (inputs), creates new assignments (outputs). Committed to a Bitcoin UTXO.

Operation

State transition

Each transition builds on the previous, forming a DAG. Ordering guaranteed by Bitcoin timestamps.

Current

Active state

The most recent valid state — the ownership the receiver validates against the full DAG.

The key insight from docs.rgb.info: “a given chain of RGB transitions does not necessarily correspond to a chain of Bitcoin transactions” — the on-chain order of anchor transactions does not allow inferring the ordering of DAG nodes. The DAG ordering is maintained by operations committing to their inputs, anchored to Bitcoin for timestamping.

06 /
Lightning Network integration

Assets that move at

Lightning speed.

The primitives above don’t just work on Bitcoin’s base layer — they integrate natively with the Lightning Network. RGB state transitions embed directly inside Lightning commitment transactions, meaning assets flow through typed channels at the same speed and cost as any Lightning payment.

Unlike approaches that wrap or bridge assets to interact with Lightning, RGB operates at the protocol level. Each channel carries its own typed asset state — validated privately by each party, settled on Bitcoin, with no extra trust assumption beyond the channel itself.

Lightning benefit 1

Instant settlement

RGB asset transfers settle in milliseconds — the same speed as any Lightning payment, identical security from Bitcoin’s proof-of-work.

Lightning benefit 2

Near-zero fees

Lightning routing fees apply — fractions of a cent regardless of amount. No base-layer transaction cost, no gas, no fee market.

Lightning benefit 3

No bridges required

Assets never leave Bitcoin’s security model. No lock-up contracts, no third-party operators, no additional trust assumptions.

07 /
Digital bearer rights

Contracts that work like

bearer instruments.

As documented in docs.rgb.info, the philosophy behind RGB’s architecture has historical roots: “Not long ago, contracts such as securities were bearer instruments. The bearer nature of contracts is, in fact, a centuries-old tradition.”

RGB revives this model in digital form. The bearer rights of each party are contained as data within the contract — held privately, transferable directly between parties, enforced cryptographically without a custodian or registry.

Modern finance — registry model

Assets live in custodial registries

– Bank or broker holds the record of ownership
– Transfer requires intermediary approval
– Counterparty risk at every level
– Privacy depends on institution policies
– Censorship possible at registry level

RGB Protocol on Bitcoin — bearer model

Rights contained in the contract itself

– Ownership proven by controlling the UTXO
– Transfer is direct — sender to receiver
– No intermediary, no custodian
– Privacy by design — data between parties only
– Bitcoin-level censorship resistance

The order matters: the Schema defines what the contract is, client-side validation ensures only relevant parties see the data, and single-use seals ensure each transition is final and unique. Bitcoin provides the timestamp and double-spend protection.

08 /
Go deeper

What to read

next.

Client-side validation in RGB Protocol on Bitcoin

Client-side validation

Deep dive into the privacy and scalability model of RGB.

Client-side-validation

RGB Protocol on Bitcoin Lightning Network integration

RGB & Lightning Network

How state transitions work inside Lightning channels.

RGB & Lightning Network

Getting started building on RGB Protocol on Bitcoin

Get started building

Issue your first RGB asset using the Schema system.

github.com/rgb-protocol ↗

RGB Protocol on Bitcoin full documentation

Full protocol documentation

Complete technical specification on Gitbook.

docs.rgb.info ↗

Ready to build

on RGB Protocol on Bitcoin?

The primitives are clear — now put them to work.