Trustless Swaps for
Bitcoin Sidechains

Exchange sidechain coins for Bitcoin, Bitcoin Cash, Litecoin, and more — peer-to-peer, with no intermediaries. Powered by BIP-300 drivechain technology from Layer Two Labs.

How Coinshift Works

A trustless swap protocol that leverages sidechain consensus to enable safe cross-chain exchanges.

🔒

Output Locking

When a swap is created, L2 coins are locked on-chain. Only a valid claim transaction can unlock them, preventing double-spends and MEV attacks.

🔍

L1 Verification

Coinshift monitors the parent chain via Bitcoin Core RPC, tracking confirmations and verifying that L1 payments have actually been made.

Expiration Protection

Every swap has an expiration block height. If the L1 payment isn't confirmed in time, locked coins are automatically returned to the maker.

🔗

Multi-Chain Support

Swap sidechain coins for BTC, BCH, LTC, and more. Each parent chain has configurable confirmation requirements and RPC settings.

🧩

Deterministic Swap IDs

BLAKE3 hashing generates unique, deterministic swap identifiers that prevent duplicate and replay attacks across the network.

🖥

GUI, CLI & RPC

Use the cross-platform desktop app, the command-line interface, or integrate directly via the JSON-RPC API. Choose what fits your workflow.

Architecture Overview

Coinshift sits at the intersection of the Bitcoin mainchain and BIP-300 sidechains. A Layer Two Labs project.

Layer 1 Bitcoin Mainchain

The BIP-300/301 patched Bitcoin Core node provides the base layer — securing sidechain deposits via hashrate escrows and committing sidechain block hashes via Blind Merged Mining.

BIP-300 — Hashrate escrows for two-way peg
BIP-301 — Blind Merged Mining consensus
CTIP — Single UTXO holding all sidechain BTC
Bridge BIP300301 Enforcer

Validates sidechain deposits, withdrawals, and BMM commitments. Acts as the bridge between L1 and L2, ensuring consensus rules are enforced on both sides.

Layer 2 Coinshift Sidechain

The sidechain runtime hosts the swap protocol, wallet, mempool, and miner. Blocks are merge-mined with Bitcoin via BMM, inheriting its proof-of-work security.

Wallet — Address derivation, UTXO management
Mempool — Transaction pool & validation
Miner — Block production via BMM bids
P2P Net — Peer discovery & block relay
Application Coinshift Swap Engine

The core swap protocol: create offers, lock outputs, monitor L1 payments, and claim coins — all trustlessly enforced by the sidechain's consensus layer.

State Machine — Pending → Confirming → Claimable → Done
Output Locking — L2 coins locked until L1 payment confirmed
L1 Monitor — RPC-based tx detection & confirmation tracking
Expiration — Auto-return if L1 payment times out
Parent Chains Supported L1 Networks

Coinshift monitors these parent chains via Bitcoin Core-compatible RPC to verify that L1 payments have been made and confirmed.

Bitcoin — 6 confirmations
Bitcoin Cash — 3 confirmations
Litecoin — 3 confirmations
Signet / Regtest — 3 confirmations
Desktop GUI eframe / egui
JSON-RPC Server Headless mode
CLI Client Command-line

Swap Flow: Alice & Bob

A typical L2-to-L1 swap in four steps.

  1. Alice creates a swap offer

    Alice locks her L2 coins on the sidechain, specifying how much L1 she wants, which parent chain, and her L1 receiving address.

  2. Bob accepts and sends L1 payment

    Bob sees the offer, agrees to the rate, and broadcasts an L1 transaction to Alice's specified address.

  3. Coinshift verifies L1 confirmations

    The system monitors the parent chain via RPC. Once the required number of confirmations is reached, the swap becomes claimable.

  4. Bob claims the L2 coins

    Bob submits a claim transaction on the sidechain. The locked outputs are released to him. The swap is complete.

Ready to Get Started?

Download the full drivechain stack and start swapping on testnet or mainnet.