Problem Statement
The Challenge
Cross-chain token liquidity is fragmented across multiple blockchains, creating significant inefficiencies:
- High Slippage - Users lose 1-5% on individual swaps due to low liquidity pools
- Expensive Routing - Multiple hops across chains incur compounding fees
- Centralized Solutions - Existing bridges are centralized, slow, and trust-dependent
- Poor Price Discovery - No unified view of best prices across chains
- User Complexity - Users manually check multiple platforms for best rates
Impact
- Users: Losing thousands in value daily due to suboptimal routing
- Protocols: Fragmented liquidity reduces trading volume per chain
- DeFi Ecosystem: Siloed chains reduce composability
Solution Overview
What is LiquidBridge?
LiquidBridge is a decentralized, algorithmic liquidity aggregator that:
- Scans Multiple Pools - Analyzes liquidity across all connected AMMs
- Calculates Optimal Routes - Uses advanced algorithms to find best swap paths
- Executes Efficiently - Batches swaps to minimize slippage
- Provides Real-time Quotes - Instant price discovery across chains
- Ensures Security - Non-custodial, transparent on-chain execution
How It Works
User Input (Token A → Token B)
↓
Scan All Liquidity Pools (5 Chains)
↓
Calculate Price Impact (18+ routes)
↓
Select Optimal Route
↓
Execute Swap (Smart Contract)
↓
Settle & Return Tokens
Key Features
Core Features
- Multi-Pool Liquidity Routing - Connects to Uniswap, Curve, Balancer, and custom pools
- Cross-Chain Swaps - Seamless token swaps across 5+ blockchains
- Real-Time Quotes - Dynamic pricing with 0 slippage tolerance options
- Optimal Route Finding - Smart algorithm calculates best execution path
- Price Impact Analysis - Transparent slippage and impact calculations
- Non-Custodial - Users maintain full control of funds
- Slippage Protection - Configurable slippage tolerance (0.1% - 50%)
- Gas Optimization - Minimal gas consumption through batching
Advanced Features
- Analytics Dashboard - Real-time statistics and performance metrics
- Security Audits - ReentrancyGuard and Pausable contract mechanisms
- User Profiles - Transaction history and activity tracking
- Multi-Chain Support - Ethereum, Polygon, Avalanche, BSC, Arbitrum
- High Performance - Sub-second quote generation
- Beautiful UI - Modern, responsive design
- Mobile Optimized - Fully responsive interface
- Notifications - Real-time transaction alerts
Technology Stack
Smart Contracts
┌─────────────────────────────────────┐
│ LiquidBridge Aggregator Contract │
├─────────────────────────────────────┤
│ • Solidity ^0.8.20 │
│ • OpenZeppelin Security Libraries │
│ • ReentrancyGuard Protection │
│ • Pausable Mechanism │
│ • Multi-Pool Integration │
└─────────────────────────────────────┘
Backend Stack
┌──────────────────────────────────┐
│ Node.js Express Server │
├──────────────────────────────────┤
│ • Express.js 4.18.2 │
│ • MongoDB 7.2 │
│ • Ethers.js 6.7.1 │
│ • Axios for HTTP │
│ • CORS & Security Middleware │
│ • Real-time Data Processing │
└──────────────────────────────────┘
Frontend Stack
┌──────────────────────────────────┐
│ Vanilla JavaScript Frontend │
├──────────────────────────────────┤
│ • HTML5 Semantic │
│ • CSS3 + Animations │
│ • Vanilla JS (No Framework) │
│ • Web3.js 1.10.0 │
│ • Ethers.js 6.0+ │
│ • Chart.js for Analytics │
│ • MetaMask Integration │
└──────────────────────────────────┘
Blockchain Networks
Ethereum (Chain ID: 1)
Polygon (Chain ID: 137)
Avalanche (Chain ID: 43114)
BSC (Chain ID: 56)
Arbitrum (Chain ID: 42161)
Development Tools
• Hardhat - Smart Contract Development
• Truffle - Contract Testing & Deployment
• Ethers.js - Blockchain Interaction
• Postman - API Testing
• VS Code - Development Environment
• Git & GitHub - Version Control
Project Structure
LiquidBridge/
│
├── contracts/ # Smart Contracts
│ ├── LiquidBridgeAggregator.sol # Main aggregator contract
│ ├── MockPools.sol # Testing pools
│ ├── interfaces/
│ │ ├── ILiquidityPool.sol # Pool interface
│ │ └── IRouter.sol # Router interface
│ └── lib/
│ └── SafeMath.sol # Math utilities
│
├── backend/ # Node.js Backend
│ ├── server.js # Express server entry
│ ├── config/
│ │ ├── database.js # MongoDB config
│ │ └── blockchain.js # RPC configs
│ ├── routes/
│ │ ├── quote.js # Quote endpoints
│ │ ├── swap.js # Swap endpoints
│ │ ├── pools.js # Pool endpoints
│ │ ├── stats.js # Statistics
│ │ └── user.js # User data
│ ├── controllers/
│ │ ├── quoteController.js # Quote logic
│ │ ├── swapController.js # Swap logic
│ │ ├── poolController.js # Pool management
│ │ └── statsController.js # Analytics
│ ├── models/
│ │ ├── Swap.js # Swap schema
│ │ ├── Pool.js # Pool schema
│ │ ├── User.js # User schema
│ │ └── PriceHistory.js # Price tracking
│ ├── services/
│ │ ├── routingService.js # Route calculation
│ │ ├── priceService.js # Price aggregation
│ │ └── blockchainService.js # Chain interaction
│ └── utils/
│ ├── logger.js # Logging
│ └── validators.js # Input validation
│
├── frontend/ # Web Frontend
│ ├── index.html # Main HTML
│ ├── styles.css # Complete styling
│ ├── app.js # Application logic
│ ├── components/
│ │ ├── wallet.js # Wallet integration
│ │ ├── swap.js # Swap component
│ │ ├── pools.js # Pool display
│ │ └── analytics.js # Analytics display
│ ├── utils/
│ │ ├── web3Utils.js # Web3 helpers
│ │ ├── formatters.js # Data formatting
│ │ └── api.js # API client
│
│ ├── backend/
│ │ ├── quote.test.js
│ │ ├── swap.test.js
│ │ └── pools.test.js
│ └── frontend/
│ ├── app.test.js
│ └── utils.test.js
│
├── scripts/ # Utility Scripts
│ ├── deploy.js # Contract deployment
│ ├── registerPools.js # Pool registration
│ ├── seed-data.js # Data seeding
│ └── migration.js # Data migration
│
├── .gitignore # Git ignore rules
├── README.md # This file
├── LICENSE # MIT License
└── CONTRIBUTION.md # Contribution guide
Prerequisites
System Requirements
- Node.js >= 18.0.0
- npm >= 9.0.0 or yarn >= 3.0.0
- MongoDB >= 5.0 (Local or Atlas)
- Git >= 2.30.0
Blockchain Requirements
- MetaMask wallet (or compatible Web3 wallet)
- Testnet Tokens on at least 2 chains for testing
- RPC Endpoints (Alchemy, Infura, or similar)
Log in or sign up for Devpost to join the conversation.