Lumina is a high-performance cross-chain liquidity router that treats the global financial landscape as a directed graph. By bridging legacy fiat rails (Wise, Stripe, SWIFT) with decentralized finance (DEXs, Stablecoins), Lumina finds the absolute cheapest and fastest path for value transfer in real-time.
Most payment routers are "Black Boxes." Lumina provides total transparency and execution through:
- Rust-Powered Brain: A multi-threaded engine using the Bellman-Ford algorithm to calculate multi-hop routes across fiat and crypto in microseconds.
- Hybrid Data Sourcing: Concurrent batch fetching that merges central bank FX rates with real-time on-chain spot prices.
- Atomic Execution Layer: A custom Solidity LuminaRouter that executes complex DeFi swaps with built-in slippage protection.
The project is organized into three primary modules:
The backend "Brain" written in Rust.
- Graph Logic: Models currencies as nodes and payment rails (DEXs, Wise, etc.) as edges.
- Concurrency: Leverages
Tokioandreqwestfor parallel API polling of Coinbase and ExchangeRate-API. - Path Reconstruction: Backtracks from destination to source to reveal intermediate hops (e.g.,
USD -> USDC -> INR).
The execution layer built with Foundry.
- LuminaRouter.sol: An atomic meta-router that interacts with Uniswap V2 to execute the optimal crypto legs of a calculated route.
- Security: Implements
minAmountOutchecks to protect users from front-running and high slippage.
A modern, reactive frontend built with Next.js.
- Interactive Routing: Visualizes the "Liquidity Route" (Currencies) and the "Execution Path" (Rails).
- Web3 Integration: Connects to MetaMask using
Wagmito trigger the LuminaRouter on-chain.
| Layer | Technology |
|---|---|
| System Language | Rust ( Tokio, Serde) |
| Blockchain | Solidity, Foundry, Sepolia Testnet |
| Frontend | Next.js, Tailwind CSS |
| APIs | Coinbase Pro, ExchangeRate-API |
- Rust (Edition 2021)
- Node.js (v18+)
- Foundry (for WSL/Linux)
- Clone the Repo
git clone [https://github.com/your-username/lumina.git](https://github.com/your-username/lumina.git) cd lumina - Run the Engine
cd engine cargo run - Deploy Contracts
cd contracts forge build forge create --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY> src/LuminaRouter.sol:LuminaRouter
- Launch the UI
cd ui npm install npm run dev