Crossline
Cross-chain on/off-ramp powered by custom order matching using state channels and limit orders.
Problem Statement
Crossline is a decentralized trading interface designed to enable gasless, cross-chain limit orders across EVM-compatible blockchains — starting with Ethereum Sepolia and Monad testnets.The core idea is to allow users to place limit orders to trade tokens across chains (e.g., sell WETH on Ethereum and receive USDC on Monad) without paying gas and without having to execute the transaction themselves. Instead, the system uses off-chain order books, signed messages, and a backend matching engine that automatically identifies matching orders, then executes the trade across chains using LayerZero for messaging.Here’s what makes Crossline unique:Zero gas cost for users: Users don’t need to hold native tokens for gas or sign transactions manually. They just sign an EIP-712 typed message once, and the system handles the rest.Cross-chain execution: The system utilizes LayerZero to pass matched order data and execution confirmation between chains, allowing settlement across different chains without user intervention.Off-chain matching engine: All limit orders are collected and matched off-chain in real time. This design prevents MEV attacks and front-running, which are common in on-chain order books.Secure by design: Trades are only executed if both parties sign their intent off-chain. On-chain settlement is trustless and executed via smart contracts once a valid match is found.Modular architecture: The backend handles matching, order management, and execution triggers. The frontend is a fully responsive React app with WebSocket-driven updates for real-time feedback on trade status (e.g., "matching", "executing", "cross-chain", "completed").Seamless UX: Through wallet integrations (RainbowKit and Wagmi), users can easily switch networks and place trades with one signature. A centralized dashboard helps track order history and live order status.Ultimately, Crossline is built to show what a next-generation DEX could look like — one that:removes the technical friction of gas and manual execution,protects users from MEV,and scales trustlessly across multiple chains.This project is not just a demo — it lays the foundation for scalable, efficient, and accessible decentralized finance across ecosystems.
Solution
Core Architecture Crossline is a full-stack, production-ready decentralized limit order protocol with real cross-chain settlement. It supports gasless order creation, off-chain matching, and cross-chain execution using LayerZero.Technology Stack Frontend Next.js 14 (TypeScript)RainbowKit + Wagmi for wallet supportViem as Ethereum clientTailwind CSS (custom design system)Socket.io-client for real-time updatesRecharts for ETH price chartsBackend Express.js with helmet, compression, rate limitingMongoDB + Mongoose for persistent storageSocket.io for WebSocket communicationnode-cron for 5-second matching intervalsEIP-712 signature verificationEthers.js for contract interactionSmart Contracts Solidity (Hardhat)EIP-712 typed data signingLayerZero + Axelar for cross-chain messagingCrossChainManager abstracts bridgesCross-Chain Architecture Flow User signs EIP-712 order (gasless)Backend matches compatible ordersCross-chain message sent (LayerZero/Axelar)Contracts settle trade on both chainsMatching Engine Runs every 5 seconds via cronMatches orders using price-time priorityUses MongoDB aggregation for matching logicEmits WebSocket events on status changeGasless Trading (EIP-712) Users sign structured order data (no gas)Backend verifies signature, stores orderOnly matched orders are broadcast on-chain Deployment Sepolia testnet: contracts deployed, LayerZero + Axelar liveMonad testnet: EVM-compatible, custom adapter usedNotable Implementations Contract detection by chain IDWebSocket-backed demo mode for hackathonPrice precision calculation based on ETH valueGraceful MongoDB connection fallbackProduction Readiness MongoDB persistenceReal signature verificationRate limiting, error handlingCross-chain message handlingWebSocket-driven updatesMulti-network support
Hackathon
ETHGlobal Unite
2025
Contributors
- frosty2702
54 contributions