Introduction to BCHMesh Protocol
A non-custodial, active market-making and shared liquidity protocol engineered with native CashScript covenants, CashTokens, and zero-inventory solver execution.
BCHMesh Core ·
Introduction to BCHMesh Protocol
The Next Generation of Liquidity & Intent Execution on Bitcoin Cash
A non-custodial, active market-making and shared liquidity protocol engineered with native CashScript covenants, CashTokens, and zero-inventory solver execution.
1. Executive Summary
Liquidity on decentralized exchanges has long suffered from rigid capital locking, impermanent loss, and socialized fee dilution. On Bitcoin Cash (BCH), developers historically faced an added dilemma: how to create dynamic, highly capital-efficient market-making on a UTXO chain where balances cannot be passively referenced across multiple concurrent transactions.
BCHMesh is a modular liquidity and intent settlement protocol built directly on Bitcoin Cash using native P2SH32 covenants and CashTokens (CHIP-2021-02).
Instead of forcing Liquidity Providers (LPs) to deposit paired tokens into monolithic AMM pools, BCHMesh empowers users to deploy isolated, active strategy covenants that:
- Capture 100% of trading fees exclusively for the deployer.
- Auto-recycle capital into reverse buy orders when filled.
- Enable atomic bulk rebalancing of dozens of positions in one transaction for ~$0.01 USD.
- Power zero-inventory solvers that seamlessly match trader intents against active on-chain strategies.
2. The Problem with Traditional AMM DEXs
Traditional Automated Market Makers (such as Uniswap v2 and Cauldron on BCH) established decentralized trading, but they carry severe structural liabilities:
1. Socialized Fee Dilution
When you deposit capital into a pooled AMM, you receive generic LP pool tokens. Trading fees generated by high-volume swings are split proportionally among all pool participants—including passive, stale capital and just-in-time (JIT) fee snipers.
2. Capital Inefficiency & Idle Funds
In standard constant-product AMMs ($x \cdot y = k$), capital is distributed across the entire infinite price curve ($0 \to \infty$). Over 90% of your deposited funds sit idle, failing to earn yield while still being fully exposed to impermanent loss.
3. Rigid 50/50 Dual-Asset Requirements
Depositing requires holding both sides of a pair (e.g., 50% BCH and 50% pUSD). If you only hold BCH, you must manually sell half your stack, incurring taxable events, slippage, and swap fees before you can even begin earning.
4. High Gas Friction for Rebalancing (EVM vs. UTXO)
On EVM chains, adjusting multiple limit orders or concentrated ranges requires sequential contract invocations, easily costing $15 to $80 per rebalance. This prices individual LPs out of active market making.
3. The BCHMesh Paradigm: Strategy-UTXO Mesh
BCHMesh introduces a UTXO-native architecture where every trading strategy is an isolated covenant UTXO paired with an immutable 39-byte Parameter NFT.
| Dimension | Traditional Pooled AMM | EVM Shared Liquidity (e.g. 1inch Aqua) | BCHMesh Strategy Mesh |
|---|---|---|---|
| Custody & Vaulting | Locked in master contract | In user wallet (ERC-20 allowance) | Isolated P2SH32 Covenant UTXO |
| Fee Entitlement | Socialized pro-rata | 100% to strategy owner | 100% to strategy owner |
| Asset Requirement | Mandatory 50/50 pair | Multi-token allowance | Single-asset deposit (ship()) |
| Capital Recycling | Manual withdrawal & swap | Dependent on wallet balance | Automatic covenant-enforced reverse order |
| Rebalance Cost | High (burn + redeploy) | High ($10–$80 in gas) | ~$0.01 USD (atomic multi-UTXO batch) |
| Exit Guarantee | Pro-rata pool redemption | Revoke allowance | Instant unilateral spend (dock()) |
| Reentrancy Risk | High without careful guards | High (requires EIP-1153 locks) | Structurally Zero (Pure UTXO) |
4. How BCHMesh Extends Liquidity Usage
BCHMesh fundamentally expands how liquidity operates on Bitcoin Cash:
A. Single-Asset, Multi-Market Deployment (100% Shared Liquidity Across All Routes)
With BCHMesh, you do not need paired inventory, nor do you fragment your capital across isolated pools. A market maker holding pure BCH can call ship() in a single transaction to deploy liquidity across multiple trading pairs simultaneously, where 100% of the single-asset inventory is concurrently available to satisfy all configured routes:
- 100% available to
BCH -> pUSD(Stablecoin pair) - 100% available to
BCH -> mUSD(Algorithmic stable pair) - 100% available to
BCH -> FUR(Ecosystem token pair)
Instead of fragmenting a 10 BCH balance into $4\text{ BCH} / 3\text{ BCH} / 3\text{ BCH}$, the entire 10 BCH backs all three routes at once—generating 3x virtual liquidity depth (30 BCH equivalent market depth). Whichever route gets filled first consumes the inventory (or partial fills atomically adjust the remaining balance), and the incoming payment tokens automatically recycle into the appropriate counter-strategy!
B. Closed-Loop Capital Recycling
When a taker buys BCH from your BCH -> pUSD strategy covenant, the covenant rules enforce that the received payment tokens ($pUSD$) are not deposited into a passive pool or sent to an idle address. Instead, the transaction atomically outputs a brand new Reverse Strategy UTXO (pUSD -> BCH) at your pre-configured buy spread.
Your capital remains perpetually in motion: $\text{BCH Deposit} \xrightarrow{\text{Fill}} \text{pUSD Buy Order} \xrightarrow{\text{Fill}} \text{BCH Buy Order (with Compounded Fees)}$
C. Sub-Cent Atomic Bulk Rebalancing
When market prices drift outside your strategy's active range, you can reconfigure your entire grid (e.g., closing 10 stale UTXOs and opening 12 new tight-spread UTXOs) in a single transaction costing less than one penny (~$0.01 USD).
D. Zero-Inventory Solver Integration
Decentralized intent solvers and relayers monitor the BCH mempool and UTXO set. When a trader submits a swap intent (or Dutch auction order), solvers atomically route the trade directly through the best-priced BCHMesh strategy covenants. Solvers need zero inventory of their own—the covenant introspects the trade in real time and settles atomically.
5. How It Works: The Lifecycle of Liquidity
1. ship() — Deploying Strategy
The LP deposits assets into a P2SH32 script and mints a 39-byte Parameter NFT encoding:
- Owner PKH (Public Key Hash)
- Curve Type (Constant Price, Concentrated Band, Oracle-Linked)
- Trading Fee in basis points (e.g., $30\text{ bps} = 0.3%$)
- Price Numerator & Denominator
- Min/Max range bounds
2. fill() — Atomic Taker Execution
A trader or solver fills against the UTXO. CashScript covenant introspection verifies:
- The exact amount of required counter-asset is provided.
- The fee is correctly computed and preserved.
- A successor UTXO is created according to protocol rules (holding the remaining reserve or reverse pair).
3. dock() — Unconditional Instant Exit
At any second, without requiring permission from relayers or solvers, the LP can invoke the dock covenant branch with their private key to recover 100% of the funds and accumulated fees directly into their personal wallet.