Skip to main content
Bitrune is a Bitcoin-native AMM protocol for trustless BTC-Rune swaps, built entirely on Bitcoin L1 using Taproot and MuSig2. The protocol is organized into six functional layers.

Protocol Layers

Deposit Layer

Users send BTC or Runes to their personal Taproot deposit address. A chain monitor tracks every deposit through a well-defined state progression:
StateMeaning
MempoolTransaction detected in the mempool, zero confirmations
ConfirmingAt least one confirmation, below the required threshold
CreditedSufficient confirmations reached, balance available for use
DroppedTransaction evicted from the mempool or invalidated
Once a deposit reaches the credited state, the user can swap, provide liquidity, or withdraw.

AMM Layer

Constant-product liquidity pools hold paired BTC and Rune reserves. The protocol supports two execution modes:
  • Ledger swaps — for pre-etch pools, swap results are recorded as internal balance updates.
  • On-chain swaps — for post-etch pools, each swap produces a fully signed MuSig2 transaction broadcast to Bitcoin.
Both modes enforce slippage protection and apply a swap fee before computing the output amount.

LP Layer

Liquidity providers deposit paired BTC and Rune assets into a pool and receive proportional shares representing their ownership. Trading fees accrue implicitly through reserve growth — as swaps execute, the pool’s reserves increase, and each LP share becomes redeemable for a larger portion of the reserves over time.

Etching Layer

Users create new Runes directly through the protocol. Each etching produces an on-chain Runestone transaction. Optional deflationary mechanics — such as per-swap tax rates allocated to burn, liquidity, or designated addresses — are configured at etching time and enforced by the protocol on every subsequent swap.

Audit Layer

Every on-chain transaction the protocol produces embeds structured proof data in Runestone odd-tags. These tags encode the full AMM state transition — reserves before and after, fee amounts, LP share changes — enabling any independent observer to reconstruct and verify the protocol’s behavior without trusting the operator.

Recovery Layer

Each user deposit address includes Taproot script-path leaves with time-locked recovery conditions. If the platform becomes unavailable, users can unilaterally reclaim their funds after a waiting period. A separate, longer timelock allows the platform to recover dormant funds. No third party is involved in either recovery path.

Conceptual Overview

User Wallet (Passkey / WebAuthn)
    ↕ (BTC / Rune transfers)
Taproot Deposit Address (2-of-2 MuSig2)
    ↕ (cooperative signing)
AMM Engine ←→ Liquidity Pools ←→ Mining Pools
    ↕ (Runestone with audit tags)
Bitcoin Blockchain
  1. The user deposits BTC or Runes to their personal Taproot address.
  2. The chain monitor detects the deposit and advances it through the state machine.
  3. The user initiates a swap, LP operation, or withdrawal.
  4. The protocol constructs the transaction and coordinates MuSig2 signing between user and platform.
  5. The signed transaction, including embedded audit tags, is broadcast to Bitcoin.
  6. The chain monitor confirms the transaction and updates balances accordingly.