raw

Buying and selling Monero for Bitcoin inside Logos Basecamp: can we use eigenwallet's atomic swaps?

27 November 2026.

What we are trying to do, and why

Logos Basecamp is a desktop app that runs Logos modules. Among them are a Bitcoin wallet and node and a Monero wallet and node, which Logos teams are building now. Someone holding BTC in Basecamp who wants XMR (or the other way round) today has to leave Basecamp for an exchange: usually custodial, often with identity checks.

An atomic swap removes that middleman. Two people trade BTC for XMR directly, and the protocol ensures that either both payments happen or neither does: nobody can run off with the other's coins. For BTC↔XMR the working, mainnet implementation is eigenwallet, formerly UnstoppableSwap, a GPL-3.0 project in Rust. It ships a desktop app built with the Tauri framework, and a market of independent sellers already runs on it.

A swap has two roles:

This report answers three questions:

  1. Could eigenwallet's swap engine run inside Basecamp, if eigenwallet separated it from its Tauri app?
  2. Would that give us both roles, buying and selling, in Basecamp?
  3. What would the Logos Bitcoin and Monero wallets and nodes need for each role? In particular, is the Bitcoin wallet work under way what the seller side needs?

Method. I read the source code at these commits:

Nothing was built or run. "Missing" means "I could not find it in the code or docs at those commits". Effort figures are my estimates.

Caveats

What (almost) works today

Today, with no code changes. Both of these work now, but nothing runs inside Basecamp:

How
Buy XMR, with Logos wallets at the edges 1. Run the eigenwallet desktop app beside Basecamp.
2. Pay its BTC deposit address from the Logos Bitcoin wallet (a normal reviewed send).
3. Set the XMR receive address to the Logos Monero wallet's address.
4. Optionally point eigenwallet at the Monero node Basecamp runs: monerod_module serves RPC on loopback, e.g. 127.0.0.1:18081 on mainnet (monerod README).
eigenwallet's Bitcoin side needs Electrum servers, and Basecamp's node offers none, so it keeps using its own.
Sell XMR, with the BTC landing in a Logos wallet 1. Run the maker (asb) on a server with eigenwallet's generated Docker Compose (bitcoind + electrs + monerod + asb).
2. Point its BTC income at a Logos Bitcoin wallet receive address with the controller call set_external_bitcoin_redeem_address (controller API).
3. Top up its XMR from the Logos Monero wallet with a normal send.

Almost: a buyer module inside Basecamp. This is the first thing worth building. It needs three changes from eigenwallet (E1–E3 below) and nothing from the Logos teams:

  1. The swap module keeps a small BTC wallet of its own.
  2. The user funds it with a normal, reviewed send from the Logos Bitcoin wallet.
  3. The bought XMR goes straight to the Logos Monero wallet's address.
  4. The module uses Basecamp's own Monero node for chain data.

That is how eigenwallet's own users work today: they fund eigenwallet's internal wallet first.

Short answers

1. Could eigenwallet's swap engine run inside Basecamp without its Tauri app? Yes, and it's closer than it looks.

eigenwallet's swap engine is already mostly separate from its GUI:

Three upstream changes would make the engine embeddable in a Basecamp module:

2. Would that allow both sides in Basecamp? In code, yes: one set of crates serves both roles.

In practice the two sides differ:

3. Is the work the Logos Bitcoin team is doing what the seller side needs? Only a small part.

The two sides lean on different Logos modules:

Long answers

1. How a swap works (enough to follow the rest)

Two roles:

The steps:

  1. Bob locks BTC in a 2-of-2 output.
  2. Both sides pre-sign the cancel, refund and punish transactions, each with its own timelock.
  3. Alice locks XMR to an address whose key is split between them, and sends Bob a transfer proof: the txid plus the transaction key.
  4. Bob gives Alice an adaptor-encrypted signature.
  5. When Alice publishes her BTC redeem transaction, it reveals her half of the Monero key, and Bob sweeps the XMR.

Failure paths:

Mainnet timelocks: cancel after 30 blocks (≈5 h), punish 144 blocks after that (≈24 h) (env.rs).

The key point for Basecamp: the swap's own BTC transactions are signed with per-swap keys held by the swap engine, not by anyone's wallet. A wallet only enters at the edges:

2. How close eigenwallet already is

Finding Where
The Bitcoin wallet is an interface: trait BitcoinWallet covers balance, addresses, building the lock transaction, signing, the ownership proof, watching scripts, broadcast and fees bitcoin-wallet/src/lib.rs#L67-L196
Both roles take Arc<dyn BitcoinWallet>, not a concrete wallet alice.rs#L14-L26, bob.rs#L22-L37
The maker never asks its Bitcoin wallet to sign a swap transaction. It uses the wallet for addresses, watching, broadcast, fees and checking the buyer's inputs. Its one sign_and_finalize is the operator's withdraw command swap-asb/src/main.rs#L528-L539
The UI is behind an interface, TauriEmitter (approvals, maker choice, progress events)… tauri_bindings.rs#L603
…but it is implemented only for Option<TauriHandle>, a struct wrapping tauri::AppHandle. Without one, the buyer's maker selection fails with "No Tauri handle available" tauri_bindings.rs#L268-L278, #L806-L812
Tauri is already an optional Cargo feature of the swap crate swap/Cargo.toml#L12
The command-line buy-xmr was removed ("will be re-added once the CLI is more flexible to allow for interactivity"), so today only the GUI starts a buy CHANGELOG.md#L364
The Monero side is concrete, not an interface. monero::Wallets always opens a wallet2 "main wallet" and holds the daemon connection wallets.rs#L32-L89
The buyer uses the main wallet only for its address (the default XMR destination). Verifying the maker's lock and sweeping it need only daemon RPC (monero-wallet-ng) bob/common.rs#L164, wallets.rs#L446-L470
The seller uses the main wallet for a lot:
• the XMR lock: one transfer to the lock address + a Hermes funding output + an optional tip, returning the tx key for the transfer proof;
• reserve proofs for quotes;
• balances
alice/swap.rs#L225-L252, event_loop.rs#L2227-L2239
The maker can host its own onion service through its embedded Arti (eigenwallet's fork) config.rs#L107, Cargo.toml#L100-L108

What eigenwallet would change upstream

# Change Size (my estimate)
E1 Make TauriHandle a trait object (or make the swap code generic over TauriEmitter), so a host can answer approvals and maker selection and receive progress events. TauriHandle is referenced 68 times in 16 files of swap/src days to a couple of weeks
E2 A way for the buyer to start a swap without the GUI (library entry point or daemon API). Related open issue: #860 Refactor request types and Tauri commands days, on top of E1
E3 Monero: a daemon-only mode with an injectable receive address for the buyer, and a MoneroWallet interface for the seller (lock transfer with tx keys, reserve proof, balances, address) 1–3 weeks
E4 linux-arm64 builds; the static Monero build (monero-sys) is the hard part. Open: #213 unknown
E5 A supported library or API surface with versioning. The wire protocol is at swap_setup/5.0.0, and the 4.x→5.x releases came weekly, so a stale client can't trade with live makers ongoing

The maker-management RFC #202 "Interface for managing ASB instance" asks for what a Basecamp maker UI would be.

A note for whoever contacts them: eigenwallet's AI policy and its maintainers (#860) require human-written communication. This conversation should be held person to person.

3. The buyer side in Basecamp

B1. The swap module keeps its own small hot BTC wallet (possible with E1–E3 and nothing from Logos)

  1. The user funds the swap's deposit address from the Logos Bitcoin wallet. Any named module may call request_send, and the person approves it as usual (backend README#L16-L20).
  2. The engine builds and signs the lock itself, as eigenwallet does today.
  3. BTC refunds go back to a Logos receive address, which anyone may read.
  4. XMR is swept straight to the Logos Monero wallet's address.
  5. For Monero chain data the engine uses Basecamp's own node: monerod_module on loopback, or the node monero_node_module hands out, including over Tor (node README#L14-L19).
  6. To reach makers it uses eigenwallet's libp2p + Arti, or Logos tor_module's SOCKS port for dialling out (tor README#L84-L104).

This is what eigenwallet users do today, so the swap's security model is unchanged.

The open decision is a policy one: a module holding hot keys is an exception to Basecamp's "a person approves every signature". The deposit into it and the payout out of it still go through the normal reviewed sends.

B2. Lock BTC straight from the Logos Bitcoin wallet (what the Logos Bitcoin wallet would need)

The swap module would implement BitcoinWallet over the Logos wallet, which needs the following:

# Need Logos today
L1 Build the lock transaction on request and hand back the unsigned PSBT without broadcasting it. Output 0 pays the 2-of-2 lock (P2WSH), output 1 the Apollo backup, change last (lib.rs#L90-L105). The maker must see it, and both sides pre-sign the cancel/refund on its txid, before anything is signed The core already builds in two steps: build_send returns a preview with its txid, then sign_and_broadcast (core README#L521-L526). But only the backend may call the core (#L546-L547), and the backend's request_send builds, asks for approval and broadcasts on approval (backend README#L76-L89). Missing: a module-facing "build, return the PSBT and txid, hold the inputs" call
L2 Sign later, without broadcasting. Bob signs the lock only after he has Alice's pre-signed transactions; the engine broadcasts it itself (bob/swap.rs#L308) The signer manager already returns "the PSBT with signatures added" to the requester (signer manager spec#L37-L45). Missing: a wallet path that signs a held build and returns it without broadcasting
L3 Hold the inputs for minutes, while quote, setup and pre-signing run An approval offer nobody acknowledges expires in 60 s and its inputs unlock (backend README#L91-L93). Missing: a longer, explicit reservation
L4 No fee bump on the lock. RBF would change the txid and void the pre-signed cancel/refund request_fee_bump is open to any named module (backend README#L19). Missing: a "do not replace" mark on a send
L5 Ownership proof. Bob signs a domain-separated challenge with each lock input's key, so the maker knows the inputs are his (utxo-ownership-proof, bob/mod.rs#L579) A Bitcoin signing request "carries exactly one psbt leg"; digest and message legs are for EVM accounts (signer manager spec#L192-L197, signer interface#L93-L105). Missing: a Bitcoin message-signing leg (e.g. BIP322), or eigenwallet accepting BIP322 proofs
L6 Chain watching for the swap's own scripts (lock, cancel, refund, redeem, punish): subscribe_to, status_of_script The wallet core watches only its own descriptors. The node module only configures sources; it hands the core a route table and exposes no query API (node README#L17-L20). See the shared chain gap below

With B2, a swap costs the person two approvals: the ownership proof at setup and the lock signature. That's acceptable.

Verdict for the buyer:

4. The seller side in Basecamp

What the maker does, and what Logos offers for each:

Maker needs Logos today Gap
A BTC income address Any Logos receive address. eigenwallet already supports an external redeem address (controller API) none
BTC signing Not needed from a wallet: redeem and punish are signed with the per-swap keys none
Check the buyer's lock inputs exist and are unspent (verify_psbt_prevouts; eigenwallet asks Electrum listunspent, wallet.rs#L874) bitcoind_module lets other modules call 14 RPCs. gettxout is not among them (bitcoind README#L64-L69). A pruned node still answers gettxout (the UTXO set is complete) add gettxout to the allowlist, or keep Electrum
Watch scripts, broadcast, fees getblockfilter, getblock, getrawmempool, sendrawtransaction and estimatesmartfee are allowed, which is enough to build a block-filter-based watcher. No ready "watch this script" API a watcher (in the swap module or as a Logos service), or an Electrum server
Electrum (what eigenwallet's BitcoinWallet speaks today) Basecamp runs no Electrum server. eigenwallet's Compose runs electrs on an unpruned, -txindex bitcoind; Basecamp's bitcoind is pruned by default (bitcoind README#L86) either a BitcoinWallet backend over bitcoind RPC (eigenwallet side) + gettxout (Logos side), or keep external Electrum
A hot XMR wallet that locks XMR without a person approving each swap monero_wallet_core_module (wallet2 via monero_c):
• create_transaction takes one destination;
• returns no tx key;
• commit_transaction broadcasts itself (wallet_runtime.cpp#L687-L716);
• one wallet open at a time;
• a password-gated open (README#L8-L18)
M1 several destinations per transfer
M2 the tx key per destination (get_tx_key)
M3 reserve proofs (get_reserve_proof)
M4 a policy for sending without asking each time
M5 more than one open wallet, so the maker's hot wallet doesn't block the person's own
Unattended-signing policy (model for M4) The signer manager already has unlocks that let one app's requests sign "without asking", bounded in time and count, and listed in unattended_signatures (spec#L340-L356). That covers keystore accounts (EVM, Bitcoin), not the Monero wallet, which keeps its own keys apply the same model to Monero
Monero chain monerod_module runs monerod in-process; RPC on loopback none
Reachability (a public libp2p port, or an onion service) tor_module is a SOCKS client. I found no onion-service hosting in it (tor README#L84-L104) keep eigenwallet's own Arti onion service, or add hosting to tor_module
Always on, through the timelock windows (≈5 h to cancel, ≈24 h more to punish) and for quotes Basecamp is a desktop app; logosctl runs the same modules headless run it as a server

Verdict for the seller:

5. Who would do what

Party Work
eigenwallet E1–E3 (Tauri out, buyer entry point, Monero interface/daemon-only mode); E4 arm64; E5 a stable surface. Optional: a BitcoinWallet backend over bitcoind RPC, BIP322 ownership proofs
Logos Bitcoin team For B2: L1–L5 (module-facing build-hold-sign without broadcast, long input reservation, a no-RBF mark, a Bitcoin message-signing leg). For both sides: gettxout in the allowlist, and optionally a script-watch service over the local node
Logos Monero team For a maker on Logos wallets: M1–M5 (multi-destination, tx keys, reserve proofs, a send policy, several open wallets)
Logos Tor Optional: onion-service hosting, so a maker needn't bring its own Arti
Basecamp swap module (whoever builds it) A Rust module (as the Logos Bitcoin modules already are, with rust-lib) linking eigenwallet's crates:
• adapters for BitcoinWallet and the Monero interface;
• a QML view for the buyer (quotes, approvals, progress, recovery after restart);
• a maker management view;
• nix builds for linux-amd64, linux-arm64 and darwin-arm64.
Linking makes it GPL-3.0.

Effort (my estimate, one experienced developer, after E1–E3 exist):

Sources

eigenwallet/core at 9696d75:

Logos (github.com/logos-co):

Other: eigenwallet.org