Skip to content
Astrohacker

Bitcoin Cash in EarthBucks: The History and What Comes Next

October 25, 2026 · Ryan X. Charles · From EarthBucks Blog

This is the third post of three about EarthBucks Swap. The first post explains the contracts, and the second post explains the app. This post tells how Bitcoin Cash (BCH) came into EarthBucks, and what comes next.

Why Bitcoin Cash

EBX needs a market. A currency that nobody can buy or sell has no real price. But a normal centralized exchange holds the coins of its users, and it has many legal problems.

In July 2024, I wrote that the first currency pair of an EarthBucks exchange would most likely be Bitcoin Cash. In December 2024, the first trade of EarthBucks occurred: EBX for BCH, at $1.00 for each EBX. That trade was done by hand.

BCH was the natural first choice:

  • It is a UTXO blockchain, like EBX. Coins are outputs of transactions, locked by scripts. Thus the two chains can use the same kind of contract.
  • It has a strong script language, with the operations that a swap needs, and more since its 2022 upgrade.
  • It has low fees, so small trades are practical.
  • It is real money, with its own markets, so a trade for BCH gives EBX a real price.

In February 2025, I wrote Towards EarthBucks 2.0, with the plan to put a self-custodial BCH wallet inside EarthBucks, and to build a decentralized exchange on top of it. In May 2026, the plan for EarthBucks 2.0 had three steps: a peer-to-peer network of mines, a BCH wallet, and atomic swaps between EBX and BCH. Then the BCH work waited while we worked on the other parts of EarthBucks.

Seven weeks, from a library to a market

The BCH work started again in September 2026, and it went fast. These are the main steps.

September 9 and 10: a BCH library. We wrote bchlib, a new BCH library in TypeScript, from the start: keys, CashAddr addresses, scripts, transactions, signatures, a script interpreter and a transaction verifier. It also signs the claim and the refund of a hash time lock contract.

September 11 to 18: the swap design. We studied the ways to do an atomic swap between two different chains. We considered adaptor signatures and proofs that connect different hash functions. We selected the simplest way: the same SHA-256 hash in a contract on each chain. The order book would be on a server, and the wallets would do the settlement.

September 18: SHA-256 in EBX. EBX uses BLAKE3. BCH does not have BLAKE3, so we added the OP_SHA256 opcode to the EBX script language.

September 18 to 25: an offline prototype. The new ebxswap library ran complete swaps with real EBX and BCH transactions on simulated chains, in 29 test scenarios, many of them failures. We wrote about it in Progress On Atomic Swaps With Bitcoin Cash.

October 13 and 14: a BCH node. We started our own Bitcoin Cash Node server, with a full copy of the BCH blockchain. The EarthBucks server gets each new BCH transaction and block from it as they occur.

October 14 and 15: the BCH wallet. Every EarthBucks account got a self-custodial BCH wallet, from the same master key as its EBX. We wrote about it in You Already Have a Bitcoin Cash Wallet.

October 17: BCH in Pay. You could send BCH to a name, with a message, from server to server. We wrote about it in EarthBucks Pay Supports Bitcoin Cash Now.

October 17: the Swap room. The first version of the room had chat, trade cards and simulated trades.

October 18: real swaps. Both users now sign the terms of each card and each take. The EBX lock got its recovery and expiry, as every EBX output has. On the same day, the first trade on the real BCH and EBX networks settled: 1 EBX for 0.00376407 BCH. The EBX price index also started on that day.

October 19 to 24: hardening. Most of the work of the last week was on what happens when a step goes wrong: prefunds, refunds, missed claims, reorganizations, lost messages and deadlines. We audited the swap code eight times, and we fixed each problem that the audits found.

October 24: the fee and the limits. We added the 1% taker fee, which is enforced in the lock scripts on both chains. For this, we added three introspection opcodes to the EBX script language: OP_INPUTINDEX, OP_OUTPUTVALUE and OP_OUTPUTBYTECODE, the same opcodes as on BCH. We also set the trade limits and the rules for verified users. Then we removed the simulated trades, so Swap has real trades only.

October 25: launch. Swap is live.

What we learned

The successful swap was the easy part. It worked in the prototype in the first week. The hard part was everything else: a wallet that closes, a transaction that drops out of the mempool, a block that comes late, a message that gets no answer, a lock that comes after the deadline.

An atomic swap protects you only while your wallet acts before each deadline. Most of our work was to make sure that the wallet always knows what to do next, never signs a step that cannot finish in time, and never forgets a secret that it saw.

What comes next: wallet nodes for everybody

Today, Swap, Pay and the wallets run on one server: earthbucks.com. Your keys are in your browser, but your wallet uses our server to see the blockchains and to send transactions. Our next goal is that nobody has to depend on our server.

Open-source wallet software

We will publish open-source wallet node software. Anybody will be able to run a wallet node on their own domain, for their own users. A wallet node will support:

  • EBX, the EarthBucks currency.
  • BCH, as today.
  • Other UTXO blockchains. We already started the libraries for Bitcoin (BTC), Litecoin (LTC), Dogecoin (DOGE), eCash (XEC) and Bitcoin SV (BSV). These chains have the same model of coins and scripts as EBX and BCH.

A federated network

Wallet nodes will connect in a federated network, in the same way as email. Each user has an address with a name and a domain, such as alice@earthbucks.com. Alice’s wallet node and Bob’s wallet node talk directly. Thus alice@earthbucks.com can send to bob@example.com:

  • Payments in EBX, BCH and the other coins, to a name and not to an address.
  • Messages, encrypted in the browser.
  • Swaps, such as Alice’s EBX for Bob’s BCH, from one wallet node to a different wallet node.

Much of this is already built for one server. Pay already sends each message from server to server, with the same steps that it will use between two different domains. Our tests already send messages between two servers with different domains. The swap contracts do not depend on a server at all: they are on the blockchains. What remains is to make the software that anybody can run, and to let wallet nodes find each other’s cards and send each other’s messages.

EarthBucks 2.0

All of this is part of EarthBucks 2.0. EarthBucks 2.0 is a new network of mines, which we are building for a very large number of transactions with a fast final answer for each one. Wallet nodes connect to the mines, and each wallet node tracks only the transactions of its own users.

The EarthBucks 2.0 software does not have the three new opcodes of the swap fee yet. It needs them before swaps can run on it.

We wrote more about this direction in EarthBucks Is Becoming a Messenger for a Federated Economy and Towards One Million Transactions Per Second.

Try Swap now

Swap is the first market for EBX that runs from wallet to wallet. Open Swap, and make your first trade.

← Back to EarthBucks Blog