ZSwap

ZSwap Documentation

Welcome to the ZSwap documentation. ZSwap is a privacy-first, intent-based cryptocurrency swap platform that enables users to trade crypto across 20+ networks without compromising their privacy or financial sovereignty.

Unlike traditional DEXs and centralized exchanges, ZSwap uses an intent-based architecture where users express what they want to achieve, not how to achieve it. This approach enables optimal execution through competitive solver networks while maintaining complete privacy.

Key Features

  • Privacy-first: No KYC, no account restrictions, no surveillance
  • Intent-based: Express what you want, not how to get it
  • Multi-chain: Trade across 20+ networks
  • Optimal execution: Solvers compete for the best rates
  • Dark pool: Intents are published privately to solvers

How It Works

1

Enter Your Swap Intent

Select the tokens and networks you want to swap between, and enter the amount you want to send.

2

Get a Quote

The system fetches a real-time tentative quote from the API, showing you the exchange rate and the amount you'll receive. Quotes expire after a certain time period to ensure accuracy.

3

Create Swap Intent

Once you're satisfied with the quote, enter your settlement address and create the swap intent. This publishes your intent to the dark pool where solvers can see it.

4

Deposit & Execution

Send your tokens to the provided deposit address. Solvers monitor the dark pool and compete to execute your swap at the best rate. Once executed, you'll receive your tokens at the settlement address.

Intent-Based Trading

What Are Intents?

An intent is a declarative statement of what you want to achieve, rather than a specific set of instructions on how to achieve it. In traditional DeFi, you might need to specify exact routes, liquidity pools, and execution parameters. With intents, you simply state:

"I want to swap 1 ETH on Ethereum for BTC on Bitcoin"

The system and solvers figure out the optimal way to execute this intent, potentially routing through multiple chains, DEXs, or liquidity sources to get you the best rate.

Order Types

ZSwap currently supports only one order type:

Fill-or-Kill Market Orders

Fill-or-kill market orders are orders to buy or sell tokens as soon as possible at the current market rate. The entire order must be executed at the quoted rate in its entirety, or not at all. Solvers must find liquidity for the complete order or wait to execute until enough liquidity becomes available. Partial fills are not supported.

Benefits of Intent-Based Trading

  • Optimal Execution: Solvers compete to find the best execution path, potentially better than what you could find manually.
  • Simplicity: No need to understand complex routing, slippage, or gas optimization. Just state what you want.
  • Privacy: Your intent is published to a dark pool, not a public blockchain, protecting your trading strategy.
  • Flexibility: Solvers can use any combination of chains, DEXs, and liquidity sources to fulfill your intent.

Architecture Schema

The following diagram illustrates how an intent-based DEX works:

1. User Creates Intent
User specifies: token pair, amount, settlement address
2. Quote Request
API provides tentative quote with exchange rate and expiration
3. Intent Published to Dark Pool
Intent broadcast via WebSocket to authorized solvers only (settlement address hidden)
4. Solver Claims Intent
Solver claims intent and gains access to settlement address. Claiming commits solver to fulfill before expiration or face slashing
5. User Deposits Tokens
User sends exact amount to deposit address from quote
6. Execution (Fill-or-Kill)
Claimed solver executes complete order at quoted rate before expiration or faces slashing
7. Settlement
Tokens delivered to user's settlement address
┌─User Interface (Web App)
├─API Server (Quote Generation, Intent Management)
├─Dark Pool (WebSocket Broadcast)
├─Solver 1, Solver 2, ... Solver N
└─Blockchain Networks (Execution & Settlement)

The Swap Process

Step 1: Enter Your Intent

On the swap page, select:

  • • The token and network you want to send from
  • • The token and network you want to receive
  • • The amount you want to send

The interface will automatically fetch supported tokens and networks from the API. You can swap tokens using the swap button to reverse the direction.

Step 2: Get a Quote

Once you enter an amount, the system automatically requests a tentative quote from the API. The quote includes:

  • • Exchange rate between the two tokens
  • • Exact amounts for both sides of the swap
  • • Expiration time (quotes are time-limited for accuracy)

Quotes update automatically as you change amounts or tokens. The system debounces your input to avoid excessive API calls.

Step 3: Create Swap Intent

After reviewing the quote, you need to:

  1. Enter your settlement address (where you want to receive tokens)
  2. Click "Swap" to create the intent

Creating the intent generates a fixed shift using the quote ID. You'll receive a deposit address where you need to send your tokens. The intent is immediately published to the dark pool where solvers can see it.

Step 4: Deposit & Execution

Once your intent is created:

  1. Send the exact amount of tokens to the provided deposit address
  2. Solvers monitor the dark pool and compete to execute your swap
  3. When a solver executes, you receive tokens at your settlement address

The execution happens automatically once you deposit. You can monitor your swap status through the account page or by staying on the swap page.

Dark Pool & Solvers

The Dark Pool

The dark pool is a private, off-chain system where swap intents are published. Unlike public blockchains where all transactions are visible, the dark pool provides privacy by:

  • • Keeping intents private until execution
  • • Not revealing your trading strategy publicly
  • • Preventing front-running and MEV attacks
  • • Allowing only authorized solvers to see intents
  • • Hiding your settlement address from solvers until they claim the intent
  • • Solvers maintain your swaps privacy by maintaining a strict contract-enforced no logging policy

Intents are broadcast via WebSocket to connected solvers, enabling real-time competition for execution.

Solvers

Solvers are specialized participants in the ZSwap ecosystem who compete to execute user intents at the best rates. To become a solver, you must:

  • • Stake $20,000 worth of ZSWAP tokens
  • • Submit an application and sign an NDA
  • • Review the Rust implementation example
  • • Connect to the WebSocket dark pool endpoint

Solvers monitor the WebSocket endpoint for new intents and compete to find optimal execution paths. They can route through multiple chains, DEXs, and liquidity sources to provide the best rates. Important privacy and security features:

  • Address Privacy: Solvers cannot see your settlement address before claiming an intent. This prevents address-based tracking and analysis.
  • Claim Commitment: Once a solver claims an intent, they are committed to fulfilling it before expiration or face slashing of their staked tokens.
  • Execution Guarantee: The slashing mechanism ensures solvers fulfill their commitments, protecting users from failed executions.

Successful solvers earn rewards for their executions, while those who fail to fulfill claimed intents face penalties.

WebSocket Integration

The dark pool uses WebSocket connections for real-time intent broadcasting. The WebSocket endpoint is available at:

ws://api.zswap.xyz/ws/intents

Message types include:

  • connected - Connection confirmation
  • swap_intent - New intent published

You can monitor the dark pool in real-time using the Monitor page, which displays all active intents.

Privacy & Security

Privacy Features

  • Dark Pool: Intents are published privately, not on public blockchains
  • No Public Order Book: Your trading intentions remain private until execution
  • Intent-Based: You don't reveal your execution strategy
  • Solver Competition: Multiple solvers compete, preventing any single entity from seeing all intents

No KYC Required

ZSwap operates without KYC (Know Your Customer) requirements. This means:

  • • No identity verification
  • • No account restrictions
  • • No surveillance or tracking
  • • Complete financial sovereignty

You maintain full control over your funds and trading activity. The only requirement is having a valid wallet address for settlement.

Security Measures

  • Solver Staking: Solvers must stake $20,000 worth of ZSWAP tokens, ensuring commitment and providing security
  • Fixed Quotes: Exchange rates are locked in at quote time, preventing slippage
  • Time-Limited Quotes: Quotes expire to ensure accuracy and prevent stale rates

Supported Networks & Tokens

ZSwap supports trading across 20+ networks. Supported networks include:

  • Bitcoin (Mainnet)
  • Ethereum
  • Solana
  • Arbitrum
  • Optimism
  • Base
  • Polygon
  • Avalanche
  • And many more...

Supported tokens include majors like BTC, ETH, USDT, USDC, and many others. You can browse all supported tokens on our dedicated page.

Card Accounts

Overview

ZSwap offers virtual pre-paid Mastercard accounts that allow you to top up and manage funds for spending. Card accounts provide a seamless way to convert cryptocurrency into spendable balance while maintaining privacy and security.

Global Acceptance:

Your virtual Mastercard is accepted at 150M+ merchants worldwide, including online stores, physical retailers, and service providers.

Key features:

  • • Virtual pre-paid Mastercard accepted at 150M+ merchants
  • • Secure card balance management
  • • Complete transaction history
  • • Privacy-focused design
  • • Easy top-up from any supported network (automatically routed through Zcash)

Top-Ups & Funding

You can top up your card account using any of the supported networks available for swaps (Bitcoin, Ethereum, Solana, Arbitrum, and many more). All card top-ups are automatically routed through Zcash internally, ensuring maximum privacy for your transactions. Zcash's shielded transactions provide enhanced privacy protection, making it ideal for card funding operations.

To top up your card account:

  • • Navigate to your account page
  • • Access the Card Information section
  • • Follow the top-up instructions
  • • Send funds from any supported network (BTC, ETH, USDT, USDC, etc.)

Your funds are automatically routed through Zcash's privacy-preserving network internally, ensuring your funding activity remains private regardless of which network you use to send funds.

Limits & Restrictions

No KYC Required: Card accounts do not require KYC (Know Your Customer) verification for top-ups up to $2,000 USD per month. This means you can use the service without providing personal identification information.

Monthly Top-Up Limit:

Up to $2,000 USD per month without KYC

Geographic Restrictions: Card accounts are not available for US citizens or residents of OFAC sanctioned countries. These restrictions are in place due to regulatory requirements.

⚠️ Important:

Card accounts are not available for:

  • • US citizens
  • • Residents of OFAC sanctioned countries:
  • - Cuba
  • - Iran
  • - North Korea
  • - Syria
  • - Crimea region of Ukraine

Additionally, individuals and entities listed on the U.S. Treasury's Specially Designated Nationals and Blocked Persons (SDN) List are also restricted.

Transaction History

All card account transactions are securely stored and accessible through your account page. The transaction history includes:

  • • Deposit transactions (top-ups)
  • • Withdrawal transactions
  • • Transfer transactions
  • • Refund transactions

Each transaction shows the amount, currency, timestamp, status, and description. Transaction data is protected by your private key authentication, ensuring only you can access your transaction history.

To view your transaction history, navigate to your account page and access the Card Information section. Your balance and recent transactions will be displayed there.