Share this article

Bitcoin-Ethereum Atomic Swap Code Now Open Source

Developers have directly traded bitcoin for ethereum using an in-progress technology that aims to replace cryptocurrency exchanges with code.

Updated Sep 13, 2021, 7:01 a.m. Published Oct 11, 2017, 3:00 p.m.
arrow, sign

A team of cryptocurrency startup developers is open-sourcing technology that enables trustless trading between the bitcoin and ethereum blockchains.

Now available on GitHub, the code has already been used to execute what startup Altcoin Exchange claims is the first so-called "atomic swap" between the largest cryptocurrencies by market value. As a result of the release, a now larger community of developers can play around with and build on top of the code.

STORY CONTINUES BELOW
Don't miss another story.Subscribe to the Crypto Daybook Americas Newsletter today. See all newsletters

For example, using Altcoin Exchange's tech, developers can lock ether tokens in an ethereum smart contract that specifies the funds will only be sent if an equal amount of bitcoin is sent to a bitcoin address during a specific time window.

At a high level, that's how the developer team at Altcoin Exchange executed the trade (the ethereum code for the transfer can be viewed on the ethereum block explorer Etherscan), which shows how 0.12345 ether was traded for 0.12345 bitcoin.

But while that might seem experimental or complex, developers instead see the milestone as another step toward the tangible goal of replacing centralized cryptocurrency exchanges with the ability to swap assets directly between blockchains.

Long theorized, the idea of atomic swaps has been around since at least 2013, but it's seen a burst of new activity of late, with developers testing the technique to trade bitcoin for litecoin and bitcoin for zcash.

'Stepping stone'

Still, it's important to note the technology is in its early stages.

This means there are practical reasons atomic swaps might not be viable today, including the fact that one-to-one bitcoin-to-ether exchanges aren't exactly fair trades given the price disparity between the assets.

To this, Altcoin Exchange CEO Andrew Gazdecki told CoinDesk that the team set up the demonstration this way for "testing purposes," though the likely next step will be to trade bitcoin to ether for their respective U.S. dollar amounts or another fiat currency equivalent.

Further, though Gazdecki believes this marks a "milestone" for atomic swaps, he admitted developers still have plenty of problems to iron out before this new type of trade sees everyday use.

As such, he framed today's release as a small step toward a better alternative, adding:

"Decentralized trading is the next step forward in this industry."

Two-way sign image via Shutterstock

More For You

KuCoin Hits Record Market Share as 2025 Volumes Outpace Crypto Market

16:9 Image

KuCoin captured a record share of centralised exchange volume in 2025, with more than $1.25tn traded as its volumes grew faster than the wider crypto market.

What to know:

  • KuCoin recorded over $1.25 trillion in total trading volume in 2025, equivalent to an average of roughly $114 billion per month, marking its strongest year on record.
  • This performance translated into an all-time high share of centralised exchange volume, as KuCoin’s activity expanded faster than aggregate CEX volumes, which slowed during periods of lower market volatility.
  • Spot and derivatives volumes were evenly split, each exceeding $500 billion for the year, signalling broad-based usage rather than reliance on a single product line.
  • Altcoins accounted for the majority of trading activity, reinforcing KuCoin’s role as a primary liquidity venue beyond BTC and ETH at a time when majors saw more muted turnover.
  • Even as overall crypto volumes softened mid-year, KuCoin maintained elevated baseline activity, indicating structurally higher user engagement rather than short-lived volume spikes.

More For You

Gold tops $5,000 as bitcoin stalls near $87,000 in widening macro-crypto split: Asia Morning Briefing

Stacked gold bars (Scottsdale Mint/Unsplash/Modified by CoinDesk)

Bitcoin’s onchain data points to supply overhang and weak participation, while gold’s breakout is priced by markets as a durable macro regime shift.

What to know:

  • Gold’s surge above $5,000 an ounce is increasingly seen as a durable regime shift, with investors treating the metal as a persistent hedge against geopolitical risk, central bank demand and a weaker dollar.
  • Bitcoin is stuck near $87,000 in a low-conviction market, as on-chain data show older holders selling into rallies, newer buyers absorbing losses and a heavy supply overhang capping moves toward $100,000.
  • Derivatives and prediction markets point to continued consolidation in bitcoin and sustained strength in gold, with thin futures volumes, subdued leverage and weak demand for higher-beta crypto assets like ether reinforcing the cautious tone.