Atomic Swaps

Exchange coins across chains without trusted custody.

Atomic swaps allow two parties to exchange coins from different blockchains without relying on an exchange company or another trusted intermediary. The exchange is coordinated by contract transactions, hashes, a shared secret, and refund paths so that either both sides complete the swap or each side can recover funds after the time window.

Bitcoin contract
Shared secret
Judecoin contract
Refund path

How Atomic Swaps Work

An atomic swap is built around two separate contracts on independent chains. A hash is shared first, while the secret remains hidden until one side redeems. Once the secret is revealed, the other side can use it to complete the swap. If the swap is not completed, refund paths allow funds to be recovered after the required time window.

Bitcoin contract

The initiator locks coins into a contract transaction. The coins can be redeemed with the secret or recovered through the refund path if the swap does not finish.

Refund window: 48 hours

One secret connects both chains.

The hash lets both sides prepare compatible contract conditions before the secret itself is revealed through redemption.

Judecoin contract

The participant funds a matching contract. Redeeming this side reveals the secret needed to redeem the other side of the swap.

Refund window: 24 hours
Secret createdHash sharedContracts fundedSecret revealedRedeem or refund

Exchange Pairs

Atomic swap pairs are built around the same model: independent chains, compatible contract conditions, a shared secret, and direct settlement between the two parties.

Bitcoin ⇄ Judecoin

A cross-chain swap path between Bitcoin and Judecoin using contract transactions, hash locks, secret revelation, and timeout refunds.

Judecoin ⇄ Ethereum

A cross-chain swap path between Judecoin and Ethereum under the same atomic-swap model of independent chains, cryptographic conditions, and direct settlement.

Bitcoin ⇄ Judecoin Atomic Swap

Bitcoin and Judecoin can be exchanged without a cryptocurrency exchange company or another trusted intermediary. The swap relies on contract transactions, hashes, a shared secret, and refund paths, so the process either completes for both sides or gives each side a recovery path if it stops.

Supported coins and wallets

The Bitcoin-to-Judecoin swap flow uses Bitcoin on one side and Judecoin on the other. A compatible Bitcoin wallet and the Bitcoin-to-Judecoin atomic swap tool are used for the Bitcoin side, while Judecoin uses its own wallet and contract flow on the Judecoin side.

Before running wallet or swap software, users should verify the software build they are using. Atomic swaps remove the need for a trusted trading intermediary, but they do not remove the need to handle software and keys carefully.

Swap mechanics

The initiator creates a contract transaction that can be redeemed by revealing the secret or refunded after the longer timeout. The participant creates a matching contract on the other chain with a shorter timeout. When one side redeems, the secret becomes visible and can be used to redeem the other side.

In the Bitcoin-to-Judecoin example, the Bitcoin refund path uses a 48-hour window, while the Judecoin refund path uses a 24-hour window. This timing structure gives the participant enough time to react after the secret is revealed and helps protect both parties if the swap is not completed.

The important property is atomicity: either both parties can complete the exchange, or the contracts provide refund paths after the relevant time windows.