Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.yattacorp.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Bitcoin smart contract ecosystem has several approaches to enabling programmability. Here’s how NEXUS compares to other protocols.

Quick Comparison

FeatureNEXUSOP_NETAlkanesArchSpark
ArchitectureMetaprotocolMetaprotocolMetaprotocolSeparate chainPayment Channels
Smart ContractsFull WASMFull WASMWASMFull WASMNo
Multi-ChainBTC + ZEC + DOGEBTC onlyBTC onlyBTC onlyBTC only
VerificationZK + BitVM2OptimisticIndexer consensusZK ProofsChannel state
Cross-Contract Calls✅ Yes✅ Yes✅ Yes✅ Yes❌ No
Encrypted Mempool✅ Yes❌ No❌ No❌ No❌ No
Stealth Addresses✅ Yes❌ No❌ No❌ No❌ No
Unified Liquidity✅ V2❌ No❌ No❌ No❌ No
Native ZK Verification✅ Zcash❌ No❌ No❌ No❌ No
User Self-Custody✅ 2-of-2 + ExitVaries✅ YesBridge✅ Yes

Detailed Comparisons

OP_NET is a Bitcoin metaprotocol for smart contracts.Similarities:
  • Both are metaprotocols (not L2s)
  • Both support WASM smart contracts
NEXUS Advantages:
  • Multi-chain: NEXUS supports Bitcoin, Zcash, and Dogecoin. OP_NET is Bitcoin-only.
  • Native ZK on Zcash: Groth16 proofs verified on-chain (no fraud proof delay).
  • Unified liquidity: Cross-chain swaps between BTC/ZEC/DOGE in V2.
  • BitVM2 fraud proofs: Permissionless challenges with bisection game.
  • Pre-signed exits: Users always have unilateral exit capability.
Alkanes is a WASM-based smart contract protocol on Bitcoin.Similarities:
  • Both are metaprotocols on Bitcoin
  • Both support WASM smart contracts
  • Both have cross-contract calls
NEXUS Advantages:
  • Full contract support: NEXUS enables complex DeFi contracts (Uniswap V3, lending protocols, DAOs). Build any contract you can imagine with full WASM capabilities.
  • Multi-chain: NEXUS works on BTC, ZEC, DOGE. Alkanes is Bitcoin-only.
  • ZK verification: NEXUS uses ZK proofs on Zcash. Alkanes relies on indexer consensus.
  • Unified liquidity: Cross-chain swaps between BTC/ZEC/DOGE in V2.
  • BitVM2 fraud proofs: Permissionless challenges with bisection game.
  • Pre-signed exits: Users always have unilateral exit capability.
  • EIP-1559 fee market: Dynamic base fee with predictable pricing.
  • Rich SDK: Solidity-compatible patterns (Mapping, SafeMath, ReentrancyGuard).
Arch is a Bitcoin L2 using ZK rollup architecture.Similarities:
  • Both support full smart contracts
  • Both use ZK proofs for verification
NEXUS Advantages:
  • Metaprotocol vs separate chain: NEXUS is a metaprotocol (no separate consensus). Arch runs its own chain with a sequencer.
  • Multi-chain: NEXUS supports BTC, ZEC, DOGE. Arch is Bitcoin-only.
  • Native ZK verification: NEXUS leverages Zcash’s on-chain Groth16 verification.
  • No bridge risk: NEXUS vaults are 2-of-2 multisig with pre-signed exits. Cross-chain bridges carry different trust assumptions.
  • Unified liquidity: Cross-chain swaps in V2.
Spark is a Bitcoin payment channel protocol (Lightning-like).Similarities:
  • Both enable fast Bitcoin transactions
  • Both use pre-signed transactions for security
NEXUS Advantages:
  • Smart contracts: NEXUS supports full WASM contracts. Spark is payments-only.
  • No channel management: NEXUS doesn’t require channel opening/closing.
  • Multi-chain: NEXUS works on BTC, ZEC, DOGE. Spark is Bitcoin-only.
  • DeFi: NEXUS supports AMM, tokens, lending. Spark is for payments.
  • No liquidity lockup: Spark requires locking funds in channels.
Spark Advantages:
  • Instant finality for payments
  • Lower fees for simple transfers
  • More mature payment routing

NEXUS Unique Features

1. Multi-Chain Unified Liquidity (V2)

NEXUS is the only protocol that unifies liquidity across Bitcoin, Zcash, and Dogecoin:
BTC ←→ ZEC ←→ DOGE
     NEXUS
Trade any pair with deep liquidity via intent exchange.

2. EIP-1559 Dynamic Fee Market

NEXUS implements a full EIP-1559 fee market - the first Bitcoin metaprotocol to do so:
  • Dynamic base fee that adjusts with block utilization (40% target)
  • Priority fees for faster inclusion
  • Predictable fees - no more fee spikes or stuck transactions
  • Fee estimation API with slow/standard/fast/instant tiers
  • 12.5% max change per block - smooth transitions, no volatility
Base Fee Adjustment:
- Block > 40% full → base fee increases (up to 12.5%)
- Block < 40% full → base fee decreases (up to 12.5%)
- Block = 40% full → base fee unchanged

3. Encrypted Mempool (MEV Protection)

NEXUS encrypts all transactions before submission. Content is hidden from everyone — including node operators — until block inclusion. This prevents:
  • Sandwich attacks on AMM swaps
  • Front-running profitable contract calls
  • Transaction snooping before execution
Uses ECDH + HKDF-SHA256 + ChaCha20-Poly1305 (protocol version 2). No other proof-of-work smart contract protocol offers this.

4. Stealth Addresses (On-Chain Privacy)

Every wallet on NEXUS can publish a stealth meta-address. Senders generate unique one-time addresses per transaction — observers cannot link transactions to the same wallet. Supports both transfers and contract calls. Uses ERC-5564 Dual-Key protocol with 1-byte view tags (filters 99.6% of non-matching scans client-side).

5. Parallel Mempool with Lock-Free Validation

High-throughput transaction processing:
  • Multi-threaded validation workers - parallel signature verification
  • Lock-free submission queues - no contention bottlenecks
  • Batch insertion - reduced lock contention for mempool writes
  • Signature verification cache - LRU cache prevents redundant crypto ops
  • Per-address nonce tracking - concurrent nonce management
  • Backpressure handling - graceful degradation under load

6. True Self-Custody with Vaults

Every NEXUS vault provides:
  • 2-of-2 multisig: User + protocol keys required for normal operations
  • Pre-signed exit: User always holds a pre-signed withdrawal transaction
  • 2-week timelock: Exit transactions have a timelock for fraud proof window
  • 1:1 backing: L1 balance = NEXUS balance always verifiable
┌─────────────────────────────────────────┐
│           NEXUS Vault (2-of-2)          │
├─────────────────────────────────────────┤
│  Normal Path: User + Protocol sign      │
│       ↓                                 │
│  Instant withdrawal                     │
│  ─────────────────────────────────────  │
│  Exit Path: User's pre-signed tx        │
│       ↓                                 │
│  2-week timelock → Funds to user        │
└─────────────────────────────────────────┘

7. Full WASM Programmability with Advanced Features

Unlike token-focused protocols, NEXUS supports:
  • Cross-contract calls (XCC) - contracts can call other contracts
  • Delegate calls - execute code in caller’s context
  • Factory pattern - deploy contracts from templates (xcc::deploy_template)
  • Value transfers - send native tokens with calls
  • Bitcoin SPV proofs - verify BTC transactions on-chain
  • L1 block data access - read Bitcoin/Zcash/Doge block hashes

8. Solidity-Compatible SDK

Familiar patterns for EVM developers:
// Solidity-style mappings
static BALANCES: Mapping<Address, U256> = Mapping::new(b"bal");
static ALLOWANCES: DoubleMapping<Address, Address, U256> = DoubleMapping::new(b"allow");

// SafeMath operations
let sum = a.add(b);  // Reverts on overflow
let diff = a.sub(b); // Reverts on underflow

// Reentrancy protection
nexus_fn! {
    fn withdraw(amount: U256) {
        let _guard = ReentrancyGuard::new();
        // Protected logic
    }
}

// Context access (like Solidity's msg.sender)
let sender = Blockchain::msg.sender();
let value = Blockchain::msg.value();

9. Contract Templates for Factory Patterns

Deploy child contracts without storing bytecode:
// Register template at VM level
processor.register_template("amm_pair", pair_wasm_bytes);

// Deploy from template in contract
let pair_id = xcc::deploy_template("amm_pair", &init_args, &salt);
This enables:
  • AMM factories - deploy new trading pairs
  • Token factories - create new tokens
  • Proxy patterns - upgradeable contracts
  • Reduced gas costs - no bytecode storage in factory contract

When to Use NEXUS

Use CaseBest Choice
Multi-chain DeFi✅ NEXUS
BTC/ZEC/DOGE swaps✅ NEXUS
Complex smart contracts✅ NEXUS
Fast ZK-verified finality✅ NEXUS (Zcash)
Simple BTC paymentsSpark/Lightning
Runes token tradingAlkanes
Bitcoin-only separate chainArch

Summary

NEXUS differentiates through:
  1. Multi-chain: Only protocol spanning BTC, ZEC, and DOGE
  2. Native ZK: Leverages Zcash’s on-chain Groth16 verification
  3. Encrypted mempool: MEV and front-running protection on every transaction
  4. Stealth addresses: On-chain privacy for transfers and contract calls
  5. Unified liquidity: Cross-chain swaps via intent exchange (V2)
  6. True self-custody: 2-of-2 vaults with pre-signed exits
  7. Full programmability: Arbitrary WASM contracts with cross-contract calls