Whitepaper
BTC ⇄ SOL Atomic Swap Protocol
Version 1.0 | Last Updated: January 2025
This whitepaper presents a novel approach to cross-chain atomic swaps between Bitcoin (BTC) and Solana (SOL) using the Internet Computer Protocol (ICP) as a trustless coordination layer. Our solution leverages threshold cryptography and smart contract escrow to enable secure, non-custodial exchanges without intermediaries.
By utilizing ICP's native Bitcoin integration and Solana RPC capabilities, we achieve true atomic swaps with automatic settlement, timeout protection, and minimal fees of $0.01 per transaction.
The Cross-Chain Challenge
Bitcoin and Solana operate on fundamentally different blockchain architectures, making direct asset exchanges impossible without trusted intermediaries. Traditional solutions include:
- Centralized Exchanges (CEX): Require custody of funds, KYC, and trust in the platform
- Wrapped Tokens: Introduce bridge risks and additional complexity
- Traditional Atomic Swaps: Require both parties to be online simultaneously
These solutions compromise on security, decentralization, or user experience. Our protocol addresses these limitations through ICP-coordinated escrow with threshold signatures.
2.1 System Components
ICP Canister
Smart contract coordinator written in Rust, managing order state and executing threshold signatures
Threshold ECDSA
Distributed key generation for Bitcoin addresses, ensuring no single entity controls funds
Bitcoin Integration
Native ICP Bitcoin API for UTXO tracking, balance queries, and transaction broadcasting
Solana RPC
HTTPS outcalls to Solana network for balance verification and transaction submission
2.2 Swap Flow
Order Creation
User specifies swap parameters (BTC amount, SOL amount, timeout). Canister generates unique deposit addresses using threshold signatures.
Deposit Phase
Users deposit BTC and SOL to canister-controlled addresses. Background watchers monitor confirmations every 30 seconds.
Verification
Canister verifies 3 confirmations for BTC and 32 confirmations for SOL before proceeding to settlement.
Atomic Settlement
Once both deposits confirmed, canister signs and broadcasts transactions to send BTC to SOL depositor and SOL to BTC depositor.
Completion
Order marked as completed. Users receive their swapped assets directly to their wallets.
3.1 Threshold Cryptography
Our protocol uses threshold signatures to ensure no single entity can control user funds:
- Distributed Key Generation: Private keys are split across ICP subnet nodes
- Threshold Signing: Requires consensus from subnet to sign transactions
- Non-Custodial: No single node or entity can steal funds
3.2 Timeout Protection
All orders have a 24-hour expiration window. If both deposits are not confirmed within this timeframe, users can request refunds. The canister automatically signs refund transactions using threshold signatures.
3.3 Attack Vectors & Mitigations
Double-Spend Attack
Mitigation: Require 3+ confirmations for BTC and 32+ for SOL before settlement
Front-Running
Mitigation: Orders are matched at creation time with fixed rates
Canister Compromise
Mitigation: Threshold signatures across subnet prevent single-point failure
Platform Fee
$0.01
Per swap transaction
Avg. Settlement Time
12 min
From deposit to completion
Fee Breakdown
- ICP Canister Cycles~$0.005
- Bitcoin Network Fee~$0.003
- Solana Network Fee~$0.002
- Total Platform Fee$0.01
Mission
Our mission is to enable trustless, secure, and efficient cross-chain asset exchanges without compromising on decentralization or user experience. We believe that blockchain interoperability should be accessible to everyone, not just technical experts.
Why ICP?
The Internet Computer Protocol provides unique capabilities that make it ideal for atomic swaps:
- Native Bitcoin Integration: Direct access to Bitcoin network without bridges
- Threshold Cryptography: Built-in support for distributed key generation
- HTTPS Outcalls: Ability to interact with any blockchain via RPC
- Deterministic Execution: Guaranteed transaction ordering and finality
- Low Cost: Minimal cycle costs enable $0.01 transaction fees
Roadmap
Q1 2025 - MVP Launch
Basic BTC ↔ SOL swaps with threshold signatures and automatic settlement
Q2 2025 - Order Book
Maker/taker model for better price discovery and liquidity
Q3 2025 - Multi-Asset Support
Add ETH, USDC, and other major cryptocurrencies
Q4 2025 - Lightning Integration
Instant BTC settlements via Lightning Network
Open Source
This project is open source and available on GitHub. We welcome contributions from the community and encourage security researchers to audit our code. Transparency and community involvement are core to our values.
The BTC ⇄ SOL Atomic Swap protocol demonstrates that true cross-chain interoperability is possible without sacrificing security or decentralization. By leveraging ICP's unique capabilities—native Bitcoin integration, threshold cryptography, and HTTPS outcalls—we've created a system that is both technically sound and user-friendly.
As blockchain technology continues to evolve, cross-chain solutions will become increasingly important. Our protocol provides a foundation for trustless asset exchanges that can scale to support the entire cryptocurrency ecosystem.
- [1] Internet Computer Protocol - Bitcoin Integration: https://internetcomputer.org/bitcoin-integration
- [2] Threshold ECDSA on ICP: https://internetcomputer.org/docs/current/developer-docs/integrations/t-ecdsa/
- [3] Atomic Swaps: A Comprehensive Guide: https://en.bitcoin.it/wiki/Atomic_swap
- [4] Solana Documentation: https://docs.solana.com/
- [5] ICP HTTPS Outcalls: https://internetcomputer.org/https-outcalls