Trustless Trading on Bitcoin: RGB Assets and Atomic Swaps
This article is based on Walter Maffione’s talk and live demo at the Tuscany Lightning Summit 2026, held in Viareggio in May 2026. Walter is the lead developer of KaleidoSwap.

RGB atomic swaps on Bitcoin are the technical foundation behind trustless digital asset trading: no custodian, no bridge, settlement directly on Bitcoin. KaleidoSwap is the first platform to ship this as a live product.
In Brief
- RGB Protocol on Bitcoin makes digital assets self-sovereign — the owner holds them directly, with no custodian at any point.
- Atomic swaps are a Bitcoin primitive (HTLCs). RGB’s contribution is that the assets being swapped never require a custodian.
- KaleidoSwap is the first non-custodial atomic swap platform built on the RGB Lightning stack, showing what RGB trading infrastructure looks like in practice.
- The goal: one Lightning rail for all Bitcoin layers — RGB, Spark, Arkade, Liquid — from a single self-custodial interface.
- On the roadmap: BOLT12, on-chain RGB swaps, Liquid integration, and an open-source market maker.
Why Has Trustless Trading on Bitcoin Been Hard?
Trading digital assets on Bitcoin has historically required one of two compromises. The first is trusting a custodian to hold and settle your assets. The second is relying on a bridge — a system that wraps assets from one chain to move them onto another, introducing new points of failure and trust.
Neither option is consistent with Bitcoin’s core principle of self-custody. Besides, both become unnecessary when assets are self-sovereign and can be exchanged via atomic swaps on Bitcoin.
In fact, RGB Protocol on Bitcoin changes the game. Because RGB assets are validated client-side and anchored to Bitcoin via single-use seals, they are as self-sovereign as satoshis. The owner holds the full history, the chain holds a commitment, and no counterparty needs to be trusted to verify ownership. Thus, the custodian is removed from the equation.
However, the swap itself still carries a fundamental problem: how do you prevent one party from receiving the asset and not paying in return?
How Do RGB Protocol on Bitcoin and Atomic Swaps Fit Together?
Atomic swaps are not new to Bitcoin. The HTLC (Hash Time-Locked Contract) mechanism behind them has existed on Lightning since the beginning. In practical terms, both sides lock their funds behind the same hash preimage, and the swap completes only when both reveal it. If one side does not reveal the preimage in time, the timelocks expire and both parties get their funds back.
Since the swap mechanism already existed, RGB added the missing piece: assets that can be traded without a custodian.
Because RGB Protocol on Bitcoin integrates with Lightning by adding an OP_RETURN commitment to every channel transaction, RGB assets move through Lightning channels and inherit the HTLC mechanism directly. The result is a combination where both halves of the trustlessness problem are solved:
- Through RGB, assets are validated client-side and anchored to Bitcoin via single-use seals, so the owner holds the data directly, at all times.
- Lightning HTLCs remove the counterparty risk: both sides of the swap either complete atomically or neither does, with Bitcoin timelocks enforcing the guarantee.
No intermediary holds custody. No bridge wraps the assets. Settlement happens on Bitcoin.
This is not a theoretical property. It is already implemented and working on testnet.
What Is KaleidoSwap?
KaleidoSwap is the first non-custodial atomic swap platform built on the RGB Lightning stack. Walter Maffione, who leads development, described the founding idea:
“The idea of KaleidoSwap was to create a DEX on top of RGB Lightning. We built, two years ago, an MVP of a market maker that can provide swaps of RGB assets on top of Lightning.”
The RGB Lightning layer KaleidoSwap runs on is built on two open-source libraries from RGB-Tools: rgb-lib, which handles core RGB Protocol on Bitcoin functionality, and a fork of rgb-lightning-node, the RGB-enabled Lightning node. KaleidoSwap maintains their own forks of both, adding the LSP and market maker logic on top.
For Spark and Arkade, KaleidoSwap uses a separate LDK-based stack without RGB modifications: those layers handle standard Lightning and non-RGB asset operations.
The project started as a desktop application, meaning the first public interface to an RGB Lightning node, and has since been growing into a multi-layer swap infrastructure covering Lightning, Spark, and Arkade.
How Do RGB Atomic Swaps on Bitcoin Work?
An RGB atomic swap on Bitcoin uses an HTLC on Lightning. Both sides lock their assets behind the same hash preimage. The swap completes only when both reveal it — or neither does. KaleidoSwap implements this mechanism via a Request-for-Quotation (RFQ) model: the user asks the market maker for a price, reviews the quote, and confirms the swap. There is no order book and no custodian at any point in the flow.
The swap execution:
- The user requests a quote, specifying the source asset and layer, the amount, and the destination asset and layer
- The market maker returns a price
- The user confirms
- An HTLC is initialized with the maker
- The maker creates an invoice the client settles
- Once the HTLC settles, both sides of the swap complete atomically
The SDK validates the amount at settlement to protect the user if the maker attempts to cheat. Both sides either complete or retain their original assets.
On top of this foundation, KaleidoSwap has built additional capabilities that demonstrate what RGB-based trading infrastructure can support:
- Dollar-Cost Averaging (DCA): scheduled or price-triggered Bitcoin purchases using RGB asset liquidity inside Lightning channels, running autonomously in the background.
- Limit orders: when the market price hits a user-defined target, the application executes an atomic swap automatically.
- LSP-provisioned channels: users can purchase a new RGB Lightning channel with an asset already included as initial liquidity, paid via Lightning in a single flow.

“Our idea is basically to have one Lightning rail to settle all the different protocol assets.”
The architectural thesis behind KaleidoSwap points to a compelling vision for the RGB ecosystem: one unified settlement layer for all Bitcoin-native assets, across every layer, with no custodians.
Can RGB Assets Be Controlled by an AI Agent?
Agentic payments on RGB allow an AI agent to operate a Lightning wallet, executing swaps, buying liquidity, and running DCA orders through a chat interface. KaleidoSwap has been building in this direction:
“With agentic payments, you will be able to do a lot of things — and cool things.”
Two components were demonstrated at the Summit:
MCP library: a Model Context Protocol (MCP) library connecting an rgb-lightning-node to AI clients such as Claude. An agent can query balances, request quotes, and execute swaps directly from a chat interface.
KaleidoSwap agent: a lightweight agent in a Docker environment, controlled via Telegram, executing atomic swaps, buying Lightning channel liquidity, and running DCA orders from a chat message.
At the Wallet Dev Kit hackathon, the KaleidoSwap team built a WDK plugin integrating both the rgb-lightning-node interface and the swap provider. They then demonstrated full trading control from Telegram. The project placed first in the DeFi agentic category and second overall.
For the RGB ecosystem, the implication is concrete: RGB assets already on Lightning can be managed through natural-language interfaces today, without waiting for new protocol primitives.
What Is the KaleidoSwap Browser Extension?
The KaleidoSwap browser extension is a wallet covering Spark, Arkade, and optionally RGB Lightning from a single mnemonic. It was the main product announcement at the Tuscany Lightning Summit 2026. As Walter put it:
“From a single mnemonic, you have multiple accounts on multiple layers.”
At launch:
- Deposit: Lightning payments via Boltz swap, on-chain deposits, and cross-chain deposits via bridge APIs
- Swaps: Flashnet for Spark-native swaps; KaleidoSwap for RGB Lightning swaps
- Yield: USDB on Spark offers a daily yield paid directly to the wallet
- RGB Lightning integration: connect an existing rgb-lightning-node via QR code and access RGB assets and swaps directly in the extension
The extension launched in closed beta on Spark and Arkade (mainnet). RGB Lightning integration is available on testnet. The codebase will be open-sourced once the alpha phase concludes.
What’s Next for RGB-Based Trading on Bitcoin?
The next milestones for RGB-based trading include on-chain RGB swaps, Liquid integration, an open-source market maker, BOLT12, and peer-to-peer trading via Nostr.
On-chain RGB swaps: RGB Protocol on Bitcoin is live on mainnet. KaleidoSwap plans to extend RGB atomic swaps on Bitcoin to non-Lightning, on-chain environments, thus making trustless trading of RGB assets available without Lightning channels.
Multi-layer settlement: Liquid integration is in exploration, which would add a third settlement layer to the RGB ↔ Lightning ↔ Spark ↔ Arkade stack. Multi-route swaps across all of these layers in a single operation are on the roadmap.
Open-source market maker: KaleidoSwap is planning to open-source the market maker backend, following the approach taken by Boltz. The goal is to allow any operator to run the same infrastructure, creating a competitive, decentralized market for RGB asset liquidity rather than a single provider.
BOLT12 and Wallet Dev Kit: BOLT12 support for multi-receive offers across layers, and deeper WDK integration as a potential universal interface.
P2P trading via Nostr: the current model is market maker-based, where users swap against KaleidoSwap’s own liquidity. Peer-to-peer trading via Nostr is on the roadmap, which would allow two users to find each other and swap directly.
“We want to have every Bitcoin layer to integrate it from one single swap provider in a fully self-custodial way.”
What Does KaleidoSwap Mean for the RGB Ecosystem?
KaleidoSwap’s work matters beyond the product itself. It is the first public answer to a question the RGB ecosystem has been building toward: what do RGB atomic swaps on Bitcoin actually look like?
As shown at the Tuscany Lightning Summit 2026, the answer is a Lightning-native swap platform with an RFQ model, an open SDK, a browser extension, and an agentic interface. All of it is built on the open-source RGB stack.
Every layer that the RGB stack adds makes the next one easier to build:
- RGB Protocol on Bitcoin — brings self-sovereignty to assets
- Lightning integration — gives them payment channels and routing
- Atomic swap primitive — gives them a trustless exchange mechanism
- KaleidoSwap — gives them a market
Learn More
- RGB Protocol on Bitcoin: rgb.info
- RGB Lightning Network: rgb.info/learn/rgb-lightning-network/
- Technical documentation: docs.rgb.info
- rgb-lib: github.com/RGB-Tools/rgb-lib
- rgb-lightning-node: github.com/RGB-Tools/rgb-lightning-node
- KaleidoSwap: kaleidoswap.com — github.com/kaleidoswap

