KeyBay KeyBay Capital Bitcoin L1 Yield Launch App
Products KBY Token Docs Security Blog Team Launch App
Technical Reference · KeyBay Capital

Documentation

Complete technical reference for KeyBay Capital. Vault mechanics, credit system, stablecoin rails, risk parameters, supported wallets, and system architecture.

Vault Mechanics

KeyBay uses an exchange-rate model for yield distribution. When a user deposits BTC, the vault mints kbBTC shares proportional to the current exchange rate. As the vault generates yield, the operator updates the exchange rate so that each kbBTC share is redeemable for more BTC over time. Users always see their balance denominated in BTC.

The deposit and redemption flow works as follows: deposit BTC, receive kbBTC shares at the current exchange rate, the exchange rate rises as yield accrues, and upon withdrawal the user redeems kbBTC for more BTC than originally deposited.

Vault Structure

OP_NET — 2 vaults:

  • BTC L1 Alpha Vault: A more concentrated BTC L1-only vault on OP_NET for advanced users seeking higher-conviction exposure. 30-day rolling lock period (4,320 blocks). (Preview positioning live now)
  • Bitcoin Yield Vault: The flagship OP_NET vault with a 4–10% target yield band. The vault allocates across three strategy sleeves (basis carry, overcollateralized lending, and options carry) with dynamic weighting based on market conditions.

Arkade — future protocol expansion: Arkade remains on the roadmap for a later rollout once integration readiness and protocol timing align. It is no longer presented as the primary live product split on KeyBay.

Yield Accrual

Yield accrues through the exchange rate mechanism. The vault operator periodically updates the exchange rate to reflect earned yield. As the rate increases, each kbBTC share becomes redeemable for a larger amount of BTC. There is no rebasing or token distribution event. The user's share count stays constant while the BTC value per share rises.

Lock Period

The vault uses a 30-day rolling lock period, equivalent to 4,320 Bitcoin blocks. After depositing, a user must wait for the lock period to elapse before initiating a withdrawal. The lock period resets on each new deposit.

Credit Mechanics

The credit system allows users to deposit BTC as collateral and borrow stablecoins against it. The flow is: deposit BTC collateral into the CreditVault, request a stablecoin borrow up to the maximum loan-to-value ratio, repay debt plus accrued interest to unlock collateral.

LTV Calculation

Loan-to-value is calculated as:

LTV = debtUsd / (collateralBtc × btcPrice) × 100

  • Max LTV: 40% — New borrows are blocked when LTV reaches or exceeds 40%.
  • Margin call at 40% LTV — The position is flagged and the user is notified to add collateral or repay debt.
  • Liquidation threshold: 50% — When LTV reaches 50%, the protocol seizes collateral and applies a 15% liquidation penalty.

Interest

Interest accrues at 8% APR (base rate), compounded per-block. KBY holders at Tier 2+ receive reduced rates: 7.00% (Preferred), 6.50% (Private), 6.00% (Institutional, invitation only). The calculation uses 52,560 blocks per year as the base. Each block that passes adds a proportional fraction of the annual rate to the outstanding debt.

Minimum Collateral

The minimum collateral deposit is 50,000 satoshis (0.0005 BTC). Deposits below this threshold are rejected by the contract.

Stablecoin Rails

KeyBay supports two stablecoin rails for credit operations. Each rail serves a different infrastructure layer and has its own activation criteria.

Rail A: OP_NET Stable (L1)

Rail A uses OP_20S tokens, the peg-aware stablecoin standard on OP_NET. Stablecoins are issued and transferred as native Bitcoin L1 transactions through OP_NET smart contracts. No Lightning Network infrastructure is required.

  • Status: Coming Soon — OP_NET mainnet is live. Rail A activates when the first OP_20S stablecoin is deployed.
  • Peg monitoring: The system automatically pauses credit operations on Rail A if the stablecoin depeg exceeds 2% from its target peg.

Rail B: USDT via Lightning

Rail B uses Taproot Assets USDT, transferred over the Lightning Network. The infrastructure runs litd, which bundles lnd and tapd together, enabling BTC-to-USDT conversion via the RFQ (Request for Quote) protocol.

  • Status: Coming Soon — Activates when Phase 2 infrastructure is running. Rail B requires a fully operational litd node with Taproot Assets channels.

Deposit Rails

KeyBay accepts deposits through several rails. Each rail has its own settlement path and ops review requirements.

  • BTC (Bitcoin Mainnet)Live Primary deposit method. Send BTC to a vault-allocated mainnet address. 2-block confirmation. Credited after ops review.
  • Stablecoin (Off-Chain)Live USDC/USDT from Ethereum, Tron, Arbitrum, or Polygon. Converted to BTC at market rate. Requires ops confirmation.
  • Ethereum (ERC-20)Live USDC/USDT via MetaMask. 12-block confirmation on Ethereum Mainnet.
  • Solana (SPL)Live USDC/USDT via Phantom. ~32 slot confirmation on Solana Mainnet.
  • Fiat (Wire / Card)Live Bank wire ($100+) or card/ACH ($50–$10,000 via Stripe). Converted to BTC at market rate.
  • Lightning (USDT)Coming Soon USDT via Taproot Assets on Lightning Network. Instant settlement when Phase 2 infrastructure is running.

All stablecoin and fiat deposits are converted to BTC and credited to the vault at the prevailing market rate after ops review.

Risk Parameters

All risk parameters are defined in basis points (bps) on-chain and enforced by the smart contract. The current parameter set is as follows:

  • Max LTV: 40% (4,000 bps)
  • Liquidation threshold: 50% (5,000 bps)
  • Interest rate: 8% APR (800 bps, base rate before KBY tier discounts)
  • Liquidation penalty: 15% (1,500 bps)
  • Minimum collateral: 50,000 sats

Oracle

The BTC/USD price oracle reports the price in USD cents. The oracle enforces a 6-block staleness check: if the price feed has not been updated within 6 blocks, credit operations that depend on the oracle are paused. A 10% maximum deviation guard rejects price updates that move more than 10% from the previous accepted value in a single update.

Collateral Thresholds for Yield Vault

  • Floor: 150% — Minimum collateralization ratio for the vault to maintain yield operations.
  • Warning: 160% — Advisory threshold that triggers operator alerts.
  • Critical: 133% — Below this level, defensive measures activate automatically.

Wallet Guide

KeyBay supports multiple Bitcoin wallets for deposits, withdrawals, and contract interactions. The following wallets are compatible:

  • OP_WALLET — The OP_NET native wallet extension for Chrome and Brave. Required for all OP_NET smart contract interactions including vault deposits, withdrawals, and credit operations.
  • UniSat — Popular Bitcoin wallet with broad ecosystem support. Supports BTC L1 deposits to the vault.
  • Xverse — Self-custody Bitcoin wallet that supports both payment and ordinals addresses. Compatible with vault deposits and position monitoring.
  • Phantom — Multi-chain wallet with a Bitcoin provider. Connects to KeyBay through its Bitcoin interface for deposits and monitoring.
  • Coinbase Wallet — Multi-chain wallet with Bitcoin support. Enables vault deposits through its Bitcoin integration.

Watch-Only Mode

Users can enter any BTC address or extended public key (xpub/zpub) to monitor a position without connecting a signing wallet. Watch-only mode displays vault share balances, accrued yield, lock period status, and credit position health. No transactions can be initiated from watch-only mode.

Architecture

The system currently presents two OP_NET vaults: a concentrated BTC L1 Alpha Vault and the flagship Bitcoin Yield Vault, both flowing through the existing KeyBayVault contract path today. Arkade remains a future protocol expansion and will share BTC/USD price oracle and settlement infrastructure once launched. OP_NET wallets connect through the WASM transaction layer; Arkade will use VTXOs with self-custodial exit.

┌─────────────────────────────────────────────────────┐
│                    User Wallet                      │
│  OP_WALLET | UniSat | Xverse | Phantom | Coinbase  │
└──────────┬──────────────────────┬───────────────────┘
           │                      │
     BTC Deposit             BTC Collateral
           │                      │
           ▼                      ▼
   ┌───────────────┐      ┌───────────────┐
   │ KeyBayVault   │      │ CreditVault   │
   │  (Yield)      │      │  (Lending)    │
   │               │      │               │
   │ kbBTC shares  │      │ Debt tracking │
   │ Exchange rate │      │ LTV monitor   │
   │ Withdrawal Q  │      │ Liquidation   │
   └───────┬───────┘      └───────┬───────┘
           │                      │
           └──────┬───────────────┘
                  │
           ┌──────┴──────┐
           │  Oracle     │
           │ BTC/USD     │
           │ Price Feed  │
           └──────┬──────┘
                  │
    ┌─────────────┴─────────────┐
    │                           │
    ▼                           ▼
┌──────────┐            ┌──────────────┐
│ Rail A   │            │ Rail B       │
│ OP_20S   │            │ Taproot USDT │
│ (L1)     │            │ (Lightning)  │
└──────────┘            └──────────────┘

The KeyBayVault handles BTC deposits, kbBTC share minting, exchange rate updates, and the withdrawal queue. The CreditVault manages BTC collateral, debt issuance, LTV monitoring, interest accrual, and liquidation execution. Both contracts query the Oracle for the current BTC/USD price. Stablecoin disbursements route through Rail A (OP_20S on L1) or Rail B (Taproot Assets USDT on Lightning) depending on which rail is active.

OTC Desk — Cross-Protocol Execution

The OTC Desk is an institutional cross-protocol BTC execution service enabling transfers between OP_NET and Arkade protocols. It provides a managed pathway for moving BTC-denominated assets across protocol boundaries with manual operations oversight.

Current State

The OTC Desk is in Gated Preview. Arkade-side operations use the @arkade-os/skill SDK for automated deposit detection and settlement via VTXOs. OP_NET-side operations require manual ops review.

Supported Directions

  • OP_NET → Arkade — OP_NET source: manual review. Arkade destination: SDK-automated via VTXO send.
  • Arkade → OP_NET — Arkade source: SDK-monitored boarding address. OP_NET destination: manual review.

How It Works

Request a quote for the desired swap direction and amount, accept the quoted rate and fee. Arkade-side settlement uses the Ark protocol SDK (@arkade-os/sdk v0.3) for instant offchain BTC via VTXOs. Deposits arrive at a boarding address and are onboarded to VTXOs. Sends use offchain Arkade transfers for instant settlement. OP_NET-side operations remain manual in Phase 1.

Reserve Model

OTC reserves are entirely separate from vault depositor capital. Your vault deposits are never used for OTC settlement. The OTC Desk maintains its own isolated reserve pool to fulfill cross-protocol transfers.

KBY Fee Integration

Fee rates are tiered based on KBY token holdings. Higher KBY holdings unlock lower execution fees:

  • Tier 0: 0.50%
  • Tier 1: 0.45%
  • Tier 2: 0.35%
  • Tier 3: 0.25%
  • Tier 4: 0.15%

Compliance

Institutional-sized swaps require manual KYC/KYB review before approval. The ops team reviews identity and business verification before any large swap is settled.

Arkade SDK Integration

The Arkade adapter uses @arkade-os/skill v0.2 with the following capabilities:

  • ArkadeBitcoinSkill — Offchain BTC via VTXOs, boarding addresses, onboard/offboard ramps.
  • ArkaLightningSkill — Lightning send/receive via Boltz submarine swaps (Phase 2).
  • LendaSwapSkill — BTC ↔ USDC/USDT swaps on Polygon, Ethereum, Arbitrum (Phase 2).

Node Infrastructure (CLI Integration)

KeyBay integrates with three external node daemons for full-stack Bitcoin operations:

  • Bitcoin Core (bitcoind) — JSON-RPC client for L1 node interaction. UTXO queries, transaction broadcasting, fee estimation, address validation, and deposit verification. Accessed via services/bitcoind.js.
  • LND (Lightning Network Daemon) — REST client for Lightning Network operations. Invoice generation, payment processing, channel balance monitoring, and Taproot Assets USDT rail. Accessed via services/lnd.js.
  • THORNode (THORChain) — REST client for cross-chain swap infrastructure. Swap quoting, inbound vault addresses, transaction tracking, and Mimir network parameters. Accessed via services/thornode.js.

All node connections are configured via environment variables. The config/nodes.js module centralizes connection parameters. No secrets are hardcoded. Status is displayed on the dashboard and available via /api/node-status.

API Endpoints

  • GET /api/node-status — Health check for all three node services (public).
  • GET /api/thorchain/pools — Active THORChain liquidity pools (public).
  • GET /api/thorchain/quote — Cross-chain swap quote (public). Params: from_asset, to_asset, amount.
  • GET /api/thorchain/inbound-addresses — THORChain vault addresses per chain (public).
  • GET /api/ops/bitcoind/info — Detailed bitcoind blockchain info (ops-authenticated).
  • GET /api/ops/lnd/info — LND node info + channel balance (ops-authenticated).

Phase 2 Roadmap

  • OP_NET automated settlement — Programmatic OP_NET-side execution once on-chain events are available.
  • Lightning Network integration — ArkaLightningSkill for Boltz-backed Lightning send/receive.
  • Stablecoin swaps — LendaSwapSkill for BTC ↔ USDC/USDT cross-chain swaps.
  • THORChain cross-chain OTC — BTC ↔ ETH/USDT swaps via THORChain as alternative OTC settlement path.
  • LND invoice streaming — WebSocket-based real-time deposit confirmation via subscribeInvoices().

Not Included in v1

  • Trustless bridge messaging
  • kbBTC burn-and-mint
  • Retail DEX integration