Protocol Documentation

MoneroSwap Whitepaper

A technical overview of the decentralized exchange protocol enabling privacy-preserving atomic swaps via Ring Signatures.

Abstract

MoneroSwap leverages Monero's proven ring signature technology to provide transaction privacy unmatched by transparent DEXs. It facilitates trustless exchange between different blockchains without requiring a centralized intermediary or identity verification.

Privacy By Default

Ring signatures, stealth addresses, and confidential transactions obscure origin, destination, and amount.

Cross-Chain Execution

Atomic swaps via HTLCs ensure settlement occurs on both chains simultaneously or not at all.

ASCII Architecture
+-----------------------------------------------------------+ | MONEROSWAP PROTOCOL | +--------------+--------------+--------------+---------------+ | Frontend | Privacy | Swap | Multi-Chain | | Interface | Layer | Engine | Bridge | +--------------+--------------+--------------+---------------+ | React | Ring Sigs | HTLC | EVM | | Next.js | Stealth | Atomic | Solana | | Tailwind | RingCT | Swaps | Monero | +--------------+--------------+--------------+---------------+

Getting Started

Prerequisites

  • Modern Browser (Chrome, Brave, Firefox)
  • Wallet Extension (MetaMask for EVM, Phantom for SOL)
  • Gas Tokens for Network Fees

Execution Flow

01

Connect

Authenticate via Web3 Wallet (Zero-Knowledge Auth)

02

Route

Select asset pair. The engine calculates the optimal privacy path.

03

Initiate

Sign the initial HTLC creation transaction.

04

Settlement

Wait for the atomic swap to finalize on both chains.

javascript
// Example: Connecting to the Protocol await window.ethereum.request({ method: 'eth_requestAccounts' }); // Initializing the Swap Intent const swapIntent = await protocol.createIntent({ from: 'ETH', to: 'XMR', amount: '1.5' });

Asset Support

Native Layer 1s

AssetSymbolChain IDPrecision
EthereumETH118
MoneroXMRN/A12
SolanaSOLN/A9
PolygonMATIC13718
AvalancheAVAX4311418

ERC-20 Standards

TokenSymbolContract Hash
USD CoinUSDC0xA0b8...eB48
TetherUSDT0xdAC1...1ec7
Dai StablecoinDAI0x6B17...1d0F
Wrapped BTCWBTC0x2260...bc2C

Guardrails & Limits

RouteMin AmountMax Amount
XMR → ETH0.01 XMR1,000 XMR
XMR → USDC1 XMR50,000 XMR
ETH → XMR0.001 ETH100 ETH
SOL → XMR0.1 SOL5,000 SOL

Privacy Mechanism

Ring Signatures

Ring signatures allow any member of a group to sign a transaction. When a user initiates a swap, their digital signature is cryptographically mixed with 10+ past transaction outputs (decoys). It becomes computationally infeasible to determine which key actually signed the transaction.

typescript
interface RingSignature { type: 'CLSAG' | 'MLSAG'; version: number; inputs: string[]; // Decoy Public Keys keyImage: string; // Double-spend prevention signatures: string[]; // The mathematical proof }

Stealth Addresses

Every transaction generates a unique one-time destination address. Even if a user publishes their "Public Address", the blockchain only records these random stealth addresses, breaking the link between user identity and transaction history.

RingCT (Confidential Transactions)

Transaction amounts are hidden using Pedersen Commitments. Validators can verify that Input Amount equals Output Amount without ever knowing the actual value being transferred.

Atomic Swaps

Hash Time-Locked Contracts (HTLCs) enable trustless exchange. Funds are locked cryptographically and can only be released if the recipient reveals a secret preimage within a specific timeframe.

solidity
interface IHTLC { // Locks funds with a hash of the secret function lock(bytes32 secretHash, address recipient, uint256 timelock) external payable returns (bytes32 swapId); // Releases funds if secret is provided function claim(bytes32 swapId, bytes32 secret) external; // Returns funds if time expires function refund(bytes32 swapId) external; }

State Machine

StateDescription
IDLESystem waiting for intent
NEGOTIATINGMatching with market maker
CREATING_HTLCDeploying contract to chain
LOCKING_FUNDSAssets deposited in escrow
CLAIMINGSecret revealed, funds released
COMPLETEDSettlement finalized
REFUNDEDTimelock expired, funds returned

Security Audit

Smart Contract Integrity

Contracts audited by Trail of Bits and OpenZeppelin. Implementation includes Reentrancy Guards, Overflow Protection, and Emergency Pause functionality managed by a multi-sig.

Client-Side Isolation

Cryptographic operations (signing, key generation) run in ephemeral WASM sandboxes. Private keys exist only in browser memory and are zeroed out immediately after use.

Verification Protocols

  • Verify SSL Certificate (moneroswap.io)
  • Use Hardware Wallets for amounts > $1,000
  • Verify Contract Addresses against Documentation

API Reference

GET/api/v1/rate

Fetch real-time atomic swap rates.

json
{ "pair": "ETH-XMR", "rate": 15.234, "fee": 0.003, "slippage": 0.01, "expiresAt": 1704067200 }
POST/api/v1/quote

Request a firm quote for execution.

json
// Request Payload { "from": "eth", "to": "xmr", "amount": "1.5", "slippage": 1 }

Diagnostics

E10

Connection Failure

Verify wallet extension is active and unlocked. Check network allowlist.

E20

Stuck in "LOCKING"

Chain congestion detected. Wait for block confirmations (usually 2-10 mins).

E30

High Slippage

Liquidity pools may be volatile. Increase slippage tolerance in settings.

Support Channels

Last Updated: JAN 2026 | Protocol Version 1.0.4