StableX LogoStableX

StableX Whitepaper

Cross-Chain Stablecoin Exchange on IOTA

Version 1.0 | Last Updated:

Overview

StableX is a cross-chain stablecoin exchange platform built on IOTA, supporting both IOTA L1 (Move) and IOTA EVM (Solidity). The exchange addresses fragmented liquidity for regional stablecoins by allowing users to deposit USDC or regional stablecoins, earn unified yield, and receive SBX tokens that can be withdrawn as any currency (with asymmetric withdrawal rules).

Unified Basket

All currencies (USDC + CHFX + TRYB + SEKX) in one pool, providing deep liquidity across all pairs.

SBX Token

Single fungible token (1 SBX = 1 USD) with rebasing mechanism representing your share of the pool.

Unified APY

All depositors earn the same APY (higher than USDC alone) regardless of which currency they deposit.

Asymmetric Withdrawal

Regional depositors can withdraw USDC or regionals; USDC depositors can only withdraw regionals.

Pool Mechanics

Unified Basket

All currencies (USDC + CHFX + TRYB + SEKX) exist in one unified pool. This creates deep liquidity for all trading pairs and allows for direct swaps between any two currencies without intermediate steps.

SBX Token

When users deposit into the pool, they receive SBX tokens at a 1:1 ratio with USD value. SBX tokens represent a share of the entire pool and can be withdrawn as any supported currency (subject to asymmetric withdrawal rules).

Asymmetric Withdrawal

To maintain pool balance and incentivize regional stablecoin deposits:

  • Regional depositors: Can withdraw any regional stablecoin OR USDC
  • USDC depositors: Can only withdraw regional stablecoins (cannot withdraw USDC)

Unified APY

All depositors earn the same APY regardless of which currency they deposit. This APY is typically higher than what USDC alone would provide, as it represents a weighted average of yields from all currencies in the pool.

Chart 5: Pool Architecture

Unified PoolUnified BasketAll CurrenciesUSDC + CHFX + TRYB + SEKXUSDCCHFXTRYBSEKXSBX Token1 SBX = 1 USDUserDepositUserWithdrawDepositMint SBXWithdrawBurn SBXAsymmetric Withdrawal Rules• Regional depositors: Can withdraw any regional OR USDC• USDC depositors: Can only withdraw regional stablecoinsUnified APY• All depositors earn same APY• Weighted average of all currency yields

Price Feed Architecture

API-Based Price Feeds

Prices are queried off-chain via API and passed as parameters to contract functions. This approach provides better flexibility and lower gas costs compared to on-chain oracle queries.

  • No Onchain Queries: Removed dependency on Pyth Network onchain queries
  • Price Format: All prices in micro-USD (1e6 = $1.00)
  • Off-Chain Queries: Frontend queries API before submitting transactions
  • Parameter Passing: Prices passed as function parameters

Chart 9: Price Feed Architecture

Price Feed APIOff-Chain ServiceExternal Data SourceReal-time pricesFrontendUser InterfacePrice FetchingHTTP GET requestFormat ConversionConvert to micro-USDSmart ContractPool / BridgeFunction ParametersPrices as params1User initiatestransaction2Frontend queriesPrice API3Submit transactionwith pricesUser actionHTTP GETPrice dataTransactionPrice Format: Micro-USD• 1 micro-USD = 1,000,000 (1e6)• $1.00 = 1,000,000 micro-USD• All prices converted before passing to contract• No on-chain oracle queries requiredBenefits• Lower gas costs (no on-chain queries)• Better flexibility (multiple data sources)• Faster transaction processing• Reduced dependency on oracle networksExample: Swap Transactionswap(currencyA, currencyB, amount, priceA, priceB)• priceA and priceB are fetched off-chain and passed as parameters

Swapping Mechanism

Direct A→B Swaps (Infinity Pool Core)

Unlike traditional DEXs that require routing through intermediate tokens, StableX enables direct swaps between any two regional stablecoins. This is the core of the infinity pool concept.

  • No USD intermediate - direct exchange between regional stablecoins
  • Rate calculation: rate_A_to_B = price_B / price_A (both in USD/[CURRENCY] format)
  • Single fee applied based on target asset depth
  • True infinity pool mechanics - all assets in one unified pool
  • Prices passed as parameters - queried from API off-chain before transaction

Chart 7: Direct A→B Swap Flow

UserWants to swapCurrency Ae.g., CHFXPrice APIOff-ChainUnified PoolAll CurrenciesUSDC + CHFX + TRYB + SEKXPool BalanceUpdates after swapFee calculatedCurrency Be.g., TRYB1User sendsCurrency A2Query prices3Calculate raterate = price_B / price_A4Calculate feeBased on pool depth5Direct transferNo intermediateSend AQuery pricesPrice paramsReceive BDirect A→B SwapNo intermediate token required

Fee Structure

Three-Tier Fee System (80%/30% Thresholds)

Tier 1: ≥80% Coverage

Fixed cheap rate for stablecoins when pool has sufficient depth.

Fee = floor + base (no deviation penalty)
Example: 7 bps (0.07%) - optimal for healthy pools

Tier 2: 30-80% Coverage

Linear/pricewise fee that scales with deviation from target.

Fee = floor + base + k * deviation
Example: 7-32 bps range

Tier 3: <30% Coverage

Sudden jump - dramatic fee increase to discourage draining.

Fee = (floor + base) * 10x + exponential term
No cap - fees can exceed 14%+ to discourage draining
Example: 77 bps at 29%, up to 1432 bps at 1%

Chart 6: Three-Tier Fee Curve

030060090012001500Fee (bps)0%20%40%60%80%100%Pool Coverage (%)30%80%TiersTier 1: ≥80% (7 bps)Tier 2: 30-80% (7-32 bps)Tier 3: <30% (exponential)7 bps @ 80%32 bps @ 30%77 bps @ 29%1432 bps @ 1%

System Architecture

System Overview

StableX operates on a dual-chain architecture, leveraging both IOTA L1 (Move-based) and IOTA EVM (Solidity-based) to provide unified liquidity across chains. The system consists of pool contracts, bridge contracts, token contracts, and a relayer service that facilitates cross-chain transfers.

Chart 1: System Architecture Overview

UsersWallets & FrontendPrice Feed APIOff-Chain QueriesIOTA L1 LayerMove ContractsPoolsbx_pool.moveBridgebridge_l1.moveTokensIOTA EVM LayerSolidity ContractsPoolStableXPool.solBridgeEVMBridge.solERC-20BridgeRelayerEvent WatcherPrice QueriesEventsUnified Liquidity

Component Diagram

Detailed breakdown of all system components and their interactions.

Chart 2: Component Diagram

IOTA L1 (Move)Shared ObjectsPool RegistryToken RegistryBridge Registrysbx_pool.move• stake()• unstake()• swap()bridge_l1.move• lock_*()• unlock()• emit eventsflash_vault.move• flash_loan()Native TokensUSDC, CHFX, TRYBSEKX, SBXIOTA EVM (Solidity)StableXPool.sol• stake()• unstake()• swap()EVMBridge.sol• mint()• burn()• emit eventsERC-20 TokensUSDC, CHFX, TRYBSEKX, wSBXToken ContractsCHFX.sol, TRYB.sol, SEKX.solUSDC.sol, wSBX.solCross-ChainComponent RelationshipsFunction callsData flowCross-chainContractRegistry

Data Flow

How data and transactions flow through the system for different operations.

Chart 3: Data Flow Diagram

UserWalletPrice APIOff-ChainPool Contractsbx_pool / StableXPoolUnified BasketBridge L1bridge_l1.moveLock/UnlockBridge EVMEVMBridge.solMint/BurnRelayerServiceEvent Watcher1. StakingUser → Pool → SBX2. SwappingCurrency A → Pool → Currency B3. BridgingL1 ↔ EVM via RelayerDepositMint SBXSwap A→BReceive BQuery PricesPrice paramsLock EventWatch EventMintBurn EventUnlock123

Cross-Chain Bridge

Bridge Flow

The bridge enables seamless token transfers between IOTA L1 and IOTA EVM, maintaining unified liquidity across both chains.

L1 → EVM (Lock → Mint)

  1. User calls bridge_l1::lock_*() on L1 with token coin and recipient EVM address
  2. L1 bridge locks tokens in escrow and emits LockEvent
  3. Relayer watches L1 events and calls EVMBridge::mint() on EVM
  4. EVM bridge mints wrapped tokens to recipient

EVM → L1 (Burn → Unlock)

  1. User calls EVMBridge::burn() on EVM with token type, amount, and recipient L1 address
  2. EVM bridge burns wrapped tokens and emits BurnEvent
  3. Relayer watches EVM events and calls bridge_l1::unlock() on L1
  4. L1 bridge unlocks tokens from escrow and transfers to recipient

Chart 8: Cross-Chain Bridge Flow

IOTA L1bridge_l1.move• lock_*() - Lock tokens• unlock() - Unlock tokensEscrowLocked tokensNative Tokens (USDC, CHFX, etc.)IOTA EVMEVMBridge.sol• mint() - Mint wrapped tokens• burn() - Burn wrapped tokensWrapped TokensERC-20 (wSBX, wUSDC, etc.)ERC-20 StandardBridge RelayerServiceEvent Watcher & ExecutorNonce verificationL1 → EVM Flow1User callslock_*()2Lock tokensEmit LockEvent3Relayer watchesEvent4Relayer callsmint()5Mint wrappedtokensEVM → L1 Flow1User callsburn()2Burn tokensEmit BurnEvent3Relayer watchesEvent4Relayer callsunlock()5Unlock tokensfrom escrowLockEventBurnEvent

Multi-Chain Architecture

L1 Components (Move-based)

  • Native tokens: CHFX, TRYB, SEKX, USDC, SBX
  • Pool contract: sbx_pool.move
  • Bridge contract: bridge_l1.move (locks/unlocks tokens)
  • Flash vault: flash_vault.move
  • Shared objects: Pool and Registry created as shared objects

EVM Components (Solidity-based)

  • ERC-20 tokens: CHFX, TRYB, SEKX, USDC, wSBX (wrapped SBX)
  • Pool contract: StableXPool.sol
  • Bridge contract: EVMBridge.sol (mints/burns wrapped tokens)
  • Standard ERC-20: All tokens follow ERC-20 standard

Unified Liquidity

While pools exist separately on L1 and EVM, they are bridged via cross-chain transfers, allowing users to access liquidity from either chain seamlessly.

Chart 4: Multi-Chain Architecture

IOTA L1Move-based Contractssbx_pool.move• Unified basket• Shared objectbridge_l1.move• Lock/Unlock tokens• Emit eventsNative Tokens• USDC• CHFX, TRYB, SEKX• SBX• Flash vaultIOTA EVMSolidity-based ContractsStableXPool.sol• Unified basket• Standard contractEVMBridge.sol• Mint/Burn wrapped tokens• Emit eventsERC-20 Tokens• USDC• CHFX, TRYB, SEKX• wSBX (wrapped SBX)• Standard ERC-20BridgeLock → MintL1 → EVMBurn → UnlockEVM → L1RelayerEvent WatcherUnified LiquiditySeamless access across both chains

Security & Audits

Reentrancy Protection

All contracts implement reentrancy guards to prevent recursive calls and ensure atomic operations.

Nonce System

Bridge contracts use a nonce system to prevent replay attacks and ensure each bridge operation can only be executed once.

Event Verification

The relayer verifies events from both chains before executing cross-chain operations, ensuring the integrity of bridge transfers.

Tokenomics

SBX Token

SBX is the unified token representing shares in the pool. It maintains a 1:1 peg with USD and uses a rebasing mechanism to reflect yield accrual.

Rebasing Mechanism

SBX tokens automatically rebase to reflect earned yield, maintaining the 1:1 USD peg while allowing holders to see their balance grow over time.

Yield Distribution

All yield generated from the pool is distributed proportionally to all SBX holders, regardless of which currency they originally deposited.

Roadmap

Current Status

Production Ready - Multi-Chain Support

  • ✅ Multi-currency staking on both L1 and EVM
  • ✅ Direct A→B swaps on both chains
  • ✅ Cross-chain token transfers
  • ✅ Multi-wallet support (IOTA L1 and EVM)
  • ✅ Unified basket architecture
  • ✅ Shared objects (L1)
  • ✅ Asymmetric withdrawal rules
  • ✅ Unified APY
  • ✅ Flash loan vault (L1)
  • ✅ Complete frontend dApp

Future Development

1. Additional Regional Stablecoins

Expand support to more regional currencies to increase global accessibility and liquidity.

  • Target Currencies: JPYX (Japanese Yen), GBPX (British Pound), AUDX (Australian Dollar), CADX (Canadian Dollar), and more
  • Enhanced Multi-Currency Pools: Support for 10+ regional stablecoins in unified liquidity pool
  • Regional Market Features: Currency-specific features tailored to local market needs
  • Regulatory Compliance: Ensure each currency meets regional regulatory requirements

2. Enhanced Yield Strategies

Implement automated yield generation across multiple DeFi protocols.

  • Automated Yield Farming: Integrate with lending protocols, DEXs, and yield aggregators
  • Multi-Strategy Vault: Allocate funds across multiple strategies based on risk/return profiles
  • Auto-Compounding: Automatically reinvest yields to maximize returns
  • Strategy Performance Tracking: Real-time APY tracking per strategy with historical analytics
  • Risk Management: Slippage controls, impermanent loss protection, and strategy rebalancing

3. Payment/Offramp Protocol Integration

Enable real-world usage through partnerships with payment processors and offramp services.

  • Merchant Acceptance: Enable businesses to accept regional stablecoins as payment
  • Point-of-Sale Integration: Connect with payment terminals and e-commerce platforms
  • Fiat Conversion: Convert SBX and regional stablecoins to local fiat currencies
  • Bank Transfers: Direct bank account integration for withdrawals
  • Card Issuance: Debit/credit cards linked to SBX balances
  • Cross-Border Payments: Low-cost international remittances
  • Corporate Treasury: B2B payment solutions for businesses

4. Additional Enhancements

  • • Governance mechanisms
  • • Advanced analytics dashboard
  • • Mobile application
  • • Enhanced security audits and monitoring

StableX Whitepaper v1.0 | Built on IOTA