Monzero DEX · atomic swap

How a XMZ swap works

On the Monzero DEX, two strangers trade XMZ against ETH, BNB, SOL or USDT (on Solana as an SPL token, and on BNB Chain as a BEP-20 token) without an exchange, an escrow agent or trusting each other. Each trade is an atomic swap: either both sides get paid, or both get their coins back. Nobody holds your coins in between, there is no bridge and no wrapped token: your coin waits in an open swap contract (a program on Solana), your XMZ on the Monzero chain, and the two blockchains enforce every step.

Live, with small limits. The DEX is new: each trade is capped at a small amount, and the swap contract and program have not been independently audited. Bitcoin and Litecoin are not offered yet. If a trade of yours is stuck, see the recovery guide.

The two traders

Bob · buying XMZ

Pays with ETH, BNB, SOL or USDT

His coin goes into the swap contract on Ethereum or BNB Chain, or the swap program on Solana. Only the rules written there can release it: to Alice if she claims in time, or back to Bob.

Alice · selling XMZ

Gets paid in that coin

She locks her XMZ on the Monzero chain in a key that she and Bob share. Either of them can be the one who posted the offer; the steps are the same.

Step by step

Every trade has two deadlines of two hours each, counted from Bob's lock: timeout 1 and timeout 2. Your wallet takes every protective step by itself; the only click you make is approving the trade.

STEP 1 · OFFER

A signed offer goes to the public relays

The maker (Bob or Alice) posts an offer: the pair, the amounts and an expiry, signed with the maker's trading key. It goes to the open relays, relay1.monzero.org and relay2.monzero.org, which copy offers from each other. Anyone can run another relay. A relay holds nothing and signs nothing: it can delay or drop an offer, but it cannot change one.

STEP 2 · TAKE

The taker answers in sealed relay mail

The other trader takes the offer by leaving a sealed letter in the maker's relay mailbox; the relays see only scrambled bytes. An offer may allow partial fills: you can take part of it, from the minimum the maker set, and the maker's wallet posts the rest again as a new offer at the same price.

STEP 3 · AGREE AND APPROVE

The wallets agree keys; you approve the trade

The two wallets swap the keys for this one trade, each with a proof that it is built correctly, and both build the same trade from the offer. Then your wallet shows you the amounts and asks you to approve. Nothing is locked on any chain before that, and a web page cannot approve for you.

STEP 4 · BOB LOCKS HIS COIN

The coin goes into the swap contract

Bob's wallet locks the agreed ETH, BNB, SOL or USDT in the swap contract (the Solana program for SOL and Solana USDT). The lock records both deadlines. The contract has no owner, no admin key and no pause button.

→ETH · BNB · SOLlock confirms
Monzero←XMZ lock confirms
STEP 5 · ALICE LOCKS XMZ

XMZ goes to a key both traders share

Alice's wallet first checks Bob's lock against every agreed term, and that enough time is left before timeout 1. Then it sends the XMZ to an address whose spending key is split in two: Alice holds one half, Bob the other, so neither can move it alone.

STEP 6 · BOB CONFIRMS READY

"The XMZ is there"

Bob's wallet checks that exactly the agreed XMZ arrived and confirmed, then marks the swap ready in the contract, before timeout 1. From now on Bob can no longer take his coin back early.

→contractready
ETH · BNB · SOL←claim published
STEP 7 · ALICE CLAIMS THE COIN

The coin is paid to Alice

Alice's wallet claims the coin from the contract, well before timeout 2. To claim, it has to hand the contract her secret: her half of the XMZ key, which the claim publishes on chain.

STEP 8 · BOB SWEEPS THE XMZ

The XMZ is Bob's

Bob's wallet reads Alice's secret from her claim, joins it with its own half and sweeps the XMZ into his own wallet.

←swap done

Why neither side can cheat

Alice can only take the coin by publishing the very thing Bob needs to take the XMZ. If she never claims, timeout 2 passes and Bob gets his coin back, and his refund in turn publishes his half of the key, so Alice gets her XMZ back.

Your wallet does the protective steps

No click needed to stay safe

You approve a trade once. After that, marking ready, claiming, refunding and sweeping the XMZ happen by themselves. Keep the wallet open, or reopen it, until the trade says swapped or refunded.

Saved before it is sent

Each trade keeps a journal. Every transaction is signed once and saved before it is broadcast; a reopened wallet sends the same transaction again, so nothing is paid twice. A crash or power cut means picking up where it left off.

Each wallet checks the chains itself

Neither wallet takes the other trader's word for a payment. Each reads the contract and the Monzero chain directly, and never sends a claim or refund the contract would refuse, since even a failed one would publish its secret.

If something does go wrong

The recovery guide covers backups of your trading keys, reopening the wallet mid-trade, coin left in your trade account, a lost device, and the last-resort path without any Monzero software.

Where you trade

The swap always runs inside your own Monzero wallet; your keys never leave your device.

The desktop wallet's Exchange page

The Monzero wallet for Linux has a built-in Exchange page for every live market. So does the Windows wallet, a 64-bit unsigned beta (no mining), so Windows may warn before it opens.

The web page: monzero.org/dex

On the DEX page you connect MetaMask (ETH, BNB, USDT on BNB Chain) or Phantom (SOL, USDT on Solana) together with the Monzero wallet running on the same device. Both show the same six-digit code when you connect. The page is only the screen: it can ask, but only the wallet signs.

On an Android phone

Turn on the DEX link in the Monzero wallet app, then open monzero.org/dex in MetaMask's or Phantom's built-in browser on the same phone. The wallet asks for approvals through notifications.

Your trade account

ETH, BNB, SOL or USDT is paid into your wallet's own trade account before a trade and paid out after it. For a web-page trade the wallet sends what is left back to the MetaMask or Phantom account you connected. The page never holds a key, cannot approve a trade and cannot choose where money goes.

Technical detail

For readers who want to check the mechanism. The source is open in Monzero-source, under gui/dex-contracts.

PartHow it works
Swap contractXmzSwap.sol, the same code on Ethereum and BNB Chain. Stages: pending → ready → completed. No owner, admin, proxy or pause. Tokens that take a fee on transfer are refused by checking the balance change.
Solana programThe same stages and timing rules (lock, ready, claim, refund; two timeouts), for SOL and USDT (SPL).
Deadlinestimeout1 = lock time + 2 h, timeout2 = timeout1 + 2 h. Ready only before timeout 1. Claim while ready, or from timeout 1 if ready was never set, and never at or after timeout 2. Refund before timeout 1 while not ready, or from timeout 2.
SecretsEach trader has a secret number k for the trade, derived from its trading keys and the offer, so it never opens another offer's lock. k·B (ed25519) is its half of the shared XMZ spend key. On Ethereum and BNB Chain the contract holds the address of k·G (secp256k1), and a cross-curve proof shows both points hide the same k. On Solana the program checks k·B itself, the same curve as XMZ. A claim reveals the seller's k; a refund reveals the buyer's.
Shared XMZ addressSpend key = sum of both halves; view key = sum of both view shares, which the traders exchange so both wallets can watch the lock. Only incoming XMZ with no unlock time counts as a lock.
Safety marginsThe seller locks XMZ only if the coin lock matches every agreed term and at least 1 h is left before timeout 1. The buyer refunds early on a wrong amount, or if no confirmed XMZ lock exists 30 min before timeout 1, and never marks ready that late. No claim in the last 30 min before timeout 2. No claim or refund on an unread contract stage.
Offers and relaysSigned offers (at most 24 h long) on the open relays, copied between relays and checked again by signature. Takes and answers travel as sealed relay mail (X25519, ChaCha20-Poly1305). Completed trades shown on the chart are checked on chain by the relays.
Partial fillsAn offer may set a minimum (at least 1 XMZ). A take names its amount: at least the minimum, leaving nothing or at least the minimum. The coin side is rounded in the maker's favour; the rest is reposted as a new offer at the same price.
LimitsOwner-signed control documents per network, published at monzero.org/dex/control/ and checked by the wallet against a pinned key. They set the per-trade limits and can pause new trades; trades already started always finish or refund.

Not offered yet

Bitcoin and Litecoin

A Bitcoin and Litecoin swap with XMZ has been built and tested on test networks, but neither is listed on the DEX. In October 2026 the Bitcoin swap ran to completion on Bitcoin's signet, refunded after its timelock, and finished after the buyer's app was stopped and after its machine lost power. They follow later; no date is set.

Monero

Trading XMZ against Monero is planned, not built into the DEX yet. No date is set.

Honest limits

Small amounts while it is new

Every trade is capped at a small amount (about $25 per trade when the DEX opened), set in the owner-signed control documents. They are raised only by a newly signed document. Each chain's normal network fee applies too; the DEX page shows the current fees.

Not independently audited

The swap contract, the Solana program and the wallet's swap engine are open source and tested, but no independent security audit has been done. Trade only amounts you can afford to have tied up for a few hours, or to lose. Found a problem? See the security page.

Stuck mid-trade? Read the swap recovery guide.

Follow progress on the Monzero roadmap.