Skip to main content
Status: Live on Devnet The 0xio DEX is live at dex.0xio.xyz. Cross-chain swaps between OCT and ETH are available on devnet.

Overview

0xio DEX is a cross-chain swap protocol that enables users to swap native tokens across chains, starting with OCT ↔ ETH between Octra and Ethereum Sepolia. The protocol uses a solver-based architecture with on-chain escrow and oracle verification.

How It Works

OCT → ETH

1

Connect Wallets

Connect your 0xio wallet (Octra) and MetaMask (Sepolia)
2

Get Quote

Enter the OCT amount and the solver provides a real-time quote with TWAP pricing
3

Lock OCT

OCT is locked in the SwapVault contract on Octra with a minimum receive commitment
4

Solver Fills

The solver detects the lock, sends ETH to your Sepolia address (~30s)
5

Oracle Attests

The oracle independently verifies the ETH was sent and attests on-chain
6

Settlement

After a challenge window, the solver claims the locked OCT

ETH → OCT

1

Connect Wallets

Connect MetaMask (Sepolia) and 0xio wallet (Octra)
2

Lock ETH

ETH is locked in the EthEscrow contract on Sepolia
3

Solver Sends OCT

The solver detects the lock and sends OCT to your Octra address
4

Solver Records the Fill

The solver calls fill() on the escrow with the Octra transaction hash
5

Oracle Attests + Settlement

The oracle verifies the OCT payout and attest() is recorded; after the challenge window the solver settles and receives the locked ETH
You are paid first: the solver sends OCT before it claims anything on Ethereum. If the solver never pays, the ETH stays in the escrow and you refund it after the lock expiry. The timing risk sits with the solver: a lock that expires before fill() is recorded can no longer be claimed.

Features

  • Cross-Chain Swaps: OCT ↔ ETH between Octra and Ethereum Sepolia
  • TWAP Pricing: 5-minute time-weighted average prices from CoinGecko + DexScreener
  • On-Chain Rate Protection: min_receive committed at lock time, so the solver can’t underpay
  • Slippage Control: Configurable slippage tolerance (0.1%, 0.5%, 1%, or a custom value up to 5%)
  • Liquidity Display: Real-time solver balance shown before swap
  • Network Detection: Auto-prompts MetaMask to switch to Sepolia
  • Live swap tracking: Every swap shows three steps (sent from your wallet, on the way, arrived) with a timer, survives a page reload, and offers a one-click refund when a swap can’t be filled
  • Activity: Live-updating transaction list with on-chain state at dex.0xio.xyz/history
  • DEX Stats: Volume, fees, solver status at dex.0xio.xyz/stats
  • Price Chart: Live OCT/USD chart next to the swap card (a compact price strip on phones)

Security

The protocol is built around a layered defense model: at no point can the solver underpay or the user lose locked funds.

5-Layer Defense

Key Security Properties

  • Pay first, claim later: The solver delivers the destination tokens before it records fill(), and claims the locked funds only after the oracle attests and the challenge window passes
  • Idempotent payouts: Every solver transaction is stored before broadcast and retried with the same bytes, so a crash or timeout never pays twice; an unclear payout stops for manual review instead of being resent
  • Fee snapshot: Fee rate locked at swap time, can’t be changed retroactively
  • Reentrancy guard: All ETH transfer functions protected
  • Emergency refund: Owner can refund unfilled swaps (blocked after fill)
  • Reconciliation: The solver periodically reconciles its database with on-chain state and only ever moves a swap forward

Contract Addresses (Devnet)

Architecture

Swap Lifecycle (OCT → ETH)

Swap Lifecycle (ETH → OCT)

Fee Structure

Services

Solver API

GET /api/quote

Get a swap quote with current TWAP pricing.
Response includes: rate, receive amount, fee, liquidity availability, intent hash.

GET /api/swap/:id

One swap by id: the quote intent_hash for OCT→ETH, or escrow_ plus the lowercase keccak256 of the intent hash for ETH→OCT. Returns 404 when the solver has not seen it yet.

GET /api/swaps

List recent swaps with status tracking. ?address= filters by source or destination address (case-insensitive).

GET /api/chains

Supported chains/tokens, the live contract addresses (SwapVault, EthEscrow), solver wallets and the lock limits (min_lock_oct, min_lock_eth). The DEX frontend locks only into its pinned contracts and pauses swaps if this endpoint reports different ones.

GET /api/health

Solver status: RPC connectivity, bond amount, liquidity on both chains.

GET /api/price

Proxied oracle price feed (no API key needed from frontend).

Refund Mechanisms

Roadmap

Near Term

  • Solana support (SOL ↔ OCT)
  • Multi-token support (wOCT, USDC)
  • Multi-solver competition
  • Mainnet deployment

Medium Term

  • Liquidity pools (CLMM)
  • Limit orders
  • Advanced routing (multi-hop, split orders)

Long Term: Cross-Chain Privacy Layer

  • Accept wETH/wSOL on their native chains, encrypt via Octra’s FHE, transfer privately, withdraw anywhere
  • Octra becomes a privacy middleware: users put in wETH, get out wETH, with full amount privacy in between
  • FHE-powered private swaps (AMM operating on encrypted data)
  • Relayer network for gasless, unlinkable withdrawals
  • Compliance via selective disclosure (viewing keys)

Cross-Chain Privacy Layer: Full Design

Deep dive into how 0xio uses Octra’s FHE as a privacy backend for any blockchain. Architecture, phases, and comparison with Umbra, Railgun, and Aztec.