Closed-Loop Auto-Recycling: Perpetual Market Making on Bitcoin Cash

How self-funding CashScript covenants automatically instantiate reverse buy orders when sells fill, enabling autonomous perpetual compounding without bots.

BCHMesh Core ·

Closed-Loop Auto-Recycling: Perpetual Market Making on Bitcoin Cash

How self-funding CashScript covenants transform discrete limit orders into perpetual market-making machines without reliance on off-chain bot infrastructure.


1. The Bottleneck of Traditional Limit Orders

In classical order-book trading and conventional decentralized exchanges, a limit order is a one-way trip:

For market makers who run high-frequency grid strategies, this requires maintaining continuous, 24/7 cloud servers with automated bot keys exposed to hot-wallet vulnerabilities.


2. The Auto-Recycling Architecture

BCHMesh leverages the programmable state transitions of CashScript covenants to achieve Closed-Loop Auto-Recycling.

              ┌────────────────────────┐
              │   BCH Sell Bin ($320)  │
              └───────────┬────────────┘
                          │
                   Market Fill Event
                          │
                          ▼
              ┌────────────────────────┐
              │  pUSD Received + Fee   │
              └───────────┬────────────┘
                          │
             Covenant Reconstitution (Auto)
                          │
                          ▼
              ┌────────────────────────┐
              │   pUSD Buy Bin ($310)  │
              └────────────────────────┘

When a solver matches an incoming swap against your BCH sell bin:

  1. The covenant introspects the transaction outputs.
  2. It verifies that the counter-party delivered the exact required amount of counter-tokens (pUSD) plus the agreed LP fee.
  3. Instead of sending the funds to a dormant wallet address, the covenant rule mandates the creation of a new reverse UTXO.
  4. This newly minted UTXO is immediately configured as a limit buy order at a lower designated price rung (e.g., $310).

3. Perpetual Compounding Without Hot Keys

Because the recycling logic is baked into the on-chain UTXO covenant rules, market makers enjoy massive structural benefits:


4. Configuring Asymmetrical Grid Spreads

LPs can customize the behavior of the auto-recycling loop based on their market outlook:

The Accumulator Grid (Bullish BCH)

The Cashflow Harvester (Neutral / Sideways)


5. Unilateral Exit at Any Point in the Cycle

At any time—regardless of whether your capital currently sits as BCH, as counter-tokens, or in a half-filled intermediate stage—the Unilateral Docking covenant path allows you to withdraw everything in a single transaction.


Conclusion

Closed-Loop Auto-Recycling turns Bitcoin Cash into the most cost-effective and secure automated market-making platform in decentralized finance.

Topics