hackquest logo

omeswap

Update soon

Videos

Tech Stack

Next
Web3
Solidity
Shadcn

Description

# ๐ŸŒŠ Omeswap โ€” Mantle DEX

**Omeswap** is a next-generation decentralized exchange (DEX) and DeFi platform built natively on **Mantle Network (L2)**. It combines a fully functional Uniswap V2-style Automated Market Maker (AMM) with advanced portfolio analytics, token research tools, and a visual AI agent builder โ€” all wrapped in a stunning, modern interface.


## ๐Ÿ“– Project Overview

Omeswap is designed to be the all-in-one DeFi hub for traders, liquidity providers, and developers on Mantle. Unlike traditional DEXs that only offer swapping functionality, Omeswap provides:

1. **Decentralized Trading** โ€” Swap tokens with optimal routing through multi-hop paths
2. **Liquidity Management** โ€” Provide liquidity to pools and earn trading fees
3. **Portfolio Tracking** โ€” Real-time wallet analysis across multiple chains
4. **Token Research** โ€” Deep token analytics with audit scores, charts, and fundamental analysis
5. **DEX Explorer** โ€” Browse all pools, tokens, and transactions on the protocol
6. **AI Agent Builder** โ€” Visually design and deploy automated trading strategies

### ๐ŸŽฏ Why Omeswap?

| Feature | Traditional DEX | Omeswap |
|---------|----------------|---------|
| Token Swaps | โœ… | โœ… |
| Multi-hop Routing | โŒ | โœ… |
| Portfolio Analytics | โŒ | โœ… |
| Token Research & Audits | โŒ | โœ… |
| AI Trading Agents | โŒ | โœ… |
| L2 Low Gas Fees | Varies | โœ… (Mantle) |
| Modern UI/UX | Basic | โœ… Premium |

---

## โœจ Core Features

### ๐Ÿ”„ Decentralized Exchange (AMM)- **Uniswap V2 Constant Product AMM** โ€” `x * y = k` formula for fair, permissionless trading
- **Multi-Hop Swap Router** โ€” Automatically routes through multiple pools to find the best price (e.g., tUSDC โ†’ tWETH โ†’ tWBTC in a single transaction)
- **0.3% LP Fees** โ€” Liquidity providers earn fees on every trade proportional to their share
- **Slippage Protection** โ€” Configurable slippage tolerance to protect against price movements
- **10 Testnet Tokens** โ€” tUSDC, tUSDT, tDAI, tWETH, tWBTC, tLINK, tUNI, tAAVE, tCRV, tMKR

### ๐Ÿ’ง Liquidity Provision- **Add Liquidity** โ€” Deposit token pairs to liquidity pools and receive LP tokens
- **Remove Liquidity** โ€” Burn LP tokens to withdraw your proportional share anytime
- **Pool Analytics** โ€” View reserves, total supply, your position value, and fee earnings
- **Dual Token Approval** โ€” Streamlined UX for approving both tokens before adding liquidity

### ๐Ÿ“Š DEX Explorer- **Tokens Table** โ€” Browse all tokens with price, 24h volume, liquidity, and sparkline charts
- **Pools Table** โ€” View all liquidity pools with TVL, volume, APR estimates, and composition
- **Transactions Feed** โ€” Real-time feed of swaps, adds, and removes across the protocol
- **Global Stats** โ€” Total Value Locked (TVL), 24h volume, and protocol-wide metrics
- **Advanced Filtering** โ€” Search, sort, and filter by multiple criteria

### ๐Ÿ’ผ Portfolio Dashboard- **Wallet Analysis** โ€” Connect your wallet to see real-time token holdings and values
- **Multi-Chain Support** โ€” Track assets across Ethereum, Polygon, and other EVM chains
- **Net Worth Tracking** โ€” Aggregated portfolio value with historical charts
- **Custom Address Analysis** โ€” Analyze any wallet address without connecting
- **Dust Filtering** โ€” Hide low-value tokens for a cleaner view
- **Agent Wallet Cards** โ€” Dedicated tracking for AI agent-managed funds

### ๐Ÿ” Token Detail Pages- **Comprehensive Analytics** โ€” Price charts, market cap, volume, circulating supply
- **Audit Scores** โ€” Financial, fundamental, social, and security ratings (0-100)
- **Fundamental Analysis** โ€” AI-generated insights on tokenomics and project health
- **Technical Analysis** โ€” Chart indicators and trading signals
- **Volume Breakdown** โ€” CEX vs DEX volume distribution
- **Related Tokens** โ€” Discover similar tokens and alternatives
- **Integrated Swap** โ€” Trade directly from the token detail page

### ๐Ÿค– AI Agent Builder (No-Code Trading Bots)
Build automated trading strategies visually with a drag-and-drop flow canvas:

#### Block Types:- **Triggers** โ€” Price threshold, price change %, time-based, manual, on-chain events
- **Conditions** โ€” If/else logic, comparisons, AND/OR gates, range checks
- **Actions** โ€” Buy, sell, swap, limit orders, stop-loss, take-profit
- **Strategies** โ€” DCA, grid trading, arbitrage, market making, trailing stops
- **Indicators** โ€” RSI, MACD, moving averages, Bollinger Bands, volume

#### Agent Features:- Visual flow-based editor (React Flow)
- Parameter configuration for each block
- Save, load, and manage multiple agents
- Execution status tracking
- Draft โ†’ Testing โ†’ Active โ†’ Paused lifecycle

### ๐ŸŽจ Premium UI/UX- **3D Spline Animations** โ€” Interactive 3D scenes on the landing page
- **Liquid Ether Background** โ€” Fluid simulation background effects
- **GSAP Animations** โ€” Smooth scroll-triggered animations
- **Framer Motion** โ€” Delightful micro-interactions throughout
- **Variable Font Proximity** โ€” Text that reacts to cursor position
- **Dark Theme** โ€” Optimized for night trading sessions
- **Responsive Design** โ€” Seamless experience from mobile to 4K displays
- **shadcn/ui Components** โ€” Accessible, customizable UI primitives

---

## ๐Ÿ—๏ธ Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        FRONTEND (Next.js 15)                    โ”‚
โ”‚  React 19 โ€ข Tailwind CSS โ€ข shadcn/ui โ€ข Framer Motion โ€ข GSAP    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Pages:                          โ”‚  Components:                 โ”‚
โ”‚  โ€ข Landing (3D Hero + Bento)     โ”‚  โ€ข SwapCard                  โ”‚
โ”‚  โ€ข Trade (Swap/Liquidity/Mint)   โ”‚  โ€ข AddLiquidityCard          โ”‚
โ”‚  โ€ข Explore (Tokens/Pools/Txns)   โ”‚  โ€ข TokensTable / PoolsTable  โ”‚
โ”‚  โ€ข Portfolio (Holdings/Analysis) โ”‚  โ€ข AgentBlockNode / Canvas   โ”‚
โ”‚  โ€ข Token Detail (Charts/Audits)  โ”‚  โ€ข WalletAnalysisPanel       โ”‚
โ”‚  โ€ข Agent Builder (Flow Editor)   โ”‚  โ€ข PriceChart / RadarChart   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ”‚ wagmi v2 + viem v2 + RainbowKit
                    โ”‚ TanStack Query (caching)
                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  WEB3 / BLOCKCHAIN LAYER                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Custom Hooks:              โ”‚  External APIs:                   โ”‚
โ”‚  โ€ข use-dex-swap             โ”‚  โ€ข CoinGecko (prices/metadata)    โ”‚
โ”‚  โ€ข use-liquidity            โ”‚  โ€ข Wallet Analysis Service        โ”‚
โ”‚  โ€ข use-token-mint           โ”‚  โ€ข OpenAI (agent logic)           โ”‚
โ”‚  โ€ข use-dex-pools            โ”‚                                   โ”‚
โ”‚  โ€ข use-wallet-analysis      โ”‚                                   โ”‚
โ”‚  โ€ข use-pool-details         โ”‚                                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ”‚ JSON-RPC (https://rpc.sepolia.mantle.xyz)
                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              MANTLE SEPOLIA TESTNET (Chain ID: 5003)            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Smart Contracts (Solidity 0.8.20):                             โ”‚
โ”‚                                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    โ”‚
โ”‚  โ”‚   MultiTokenLiquidityPools (0xe635...) โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข createPool()                        โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข addLiquidity() / removeLiquidity() โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข swap() โ€” single-hop swaps          โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข getReserves() / getUserPosition()  โ”‚                    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚
โ”‚                                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    โ”‚
โ”‚  โ”‚   MultiHopSwapRouter (0xFe21...)       โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข swapExactTokensForTokens()          โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข getAmountsOut() โ€” path simulation   โ”‚                    โ”‚
โ”‚  โ”‚   โ€ข Multi-hop routing (2-3+ hops)       โ”‚                    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚
โ”‚                                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    โ”‚
โ”‚  โ”‚   10 Test ERC20 Tokens (Mintable)       โ”‚                    โ”‚
โ”‚  โ”‚   tUSDC, tUSDT, tDAI, tWETH, tWBTC...   โ”‚                    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

---

## ๐Ÿ“ Smart Contracts

### Deployed on Mantle Sepolia Testnet

| Contract | Address | Description |
|----------|---------|-------------|
| **MultiTokenLiquidityPools** | `0xe63514C2B0842B58A16Ced0C63668BAA91B033Af` | AMM pools, liquidity, single-hop swaps |
| **MultiHopSwapRouter** | `0xFe2108798dC74481d5cCE1588cBD00801758dD6d` | Multi-hop routing engine |
| **tUSDC** | `0x6D13968b1Fe787ed0237D3645D094161CC165E4c` | Test USDC token |
| **tUSDT** | `0x0828b7774ea41Db0fCbf13ADe31b5F61624A1364` | Test USDT token |
| **tDAI** | `0x907fF6a35a3E030c11a02e937527402F0d3333ee` | Test DAI token |
| **tWETH** | `0x95829976c0cd4a58fBaA4802410d10BDe15E3CA0` | Test Wrapped ETH |
| **tWBTC** | `0xD781bf79d86112215F7bF141277f5782640cad5D` | Test Wrapped BTC |
| **tLINK** | `0xCEbBd58F40c8CE0739327fDde1A52bb67557e37a` | Test Chainlink token |
| **tUNI** | `0xe771E51F90D7176B6bd17a123f7D78c2231158a0` | Test Uniswap token |
| **tAAVE** | `0x6b1F4e0Eea462745750dddaEB11FB85B968a87F6` | Test Aave token |
| **tCRV** | `0xa6bAeA5811Bd070AeF343537b03A909597002526` | Test Curve token |
| **tMKR** | `0x4296e3e1d3efbb5bac66a66f1E463BAc25Ec6189` | Test Maker token |

[View on Mantle Sepolia Explorer โ†’](https://explorer.sepolia.mantle.xyz)

---

## ๐ŸŽฏ Use Cases

### For Traders- Swap tokens with minimal slippage via intelligent multi-hop routing
- Research tokens with comprehensive analytics and audit scores
- Track your portfolio value and holdings in real-time
- Build automated trading strategies without coding

### For Liquidity Providers- Earn 0.3% fees on all swaps in pools you provide liquidity to
- Track your LP positions and accumulated fees
- Add/remove liquidity anytime with no lock-up periods

### For Developers- Study a production-grade AMM implementation
- Learn wagmi v2, viem v2, and modern React patterns
- Explore visual programming concepts with the agent builder
- Fork, customize, and deploy your own DEX

## ๐Ÿš€ Quick Start

### 1. Install Dependencies

```bash
npm install
```

### 2. Setup Environment

Create `.env.local`:

```bash
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id
```

Get your WalletConnect Project ID from: https://cloud.walletconnect.com/

### 3. Start Development Server

```bash
npm run dev
```

Visit: **http://localhost:3000**

### 4. Connect & Trade

1. **Connect Wallet** (top right corner)
2. **Switch to Mantle Sepolia Testnet**3. **Get testnet MNT** from https://faucet.sepolia.mantle.xyz
4. **Mint test tokens** (Mint Tokens tab)
5. **Add liquidity** or **start swapping**!

## ๐Ÿ“‹ Prerequisites

- Node.js 18+
- MetaMask or compatible wallet
- Testnet MNT (for gas fees)

## ๐Ÿ—๏ธ Tech Stack

### Frontend- **Framework:** Next.js 15 (App Router)
- **UI Library:** React 19
- **Styling:** Tailwind CSS + shadcn/ui
- **Web3:** wagmi v2 + viem v2
- **Wallet:** RainbowKit

### Smart Contracts- **Language:** Solidity 0.8.20
- **Framework:** Hardhat
- **Network:** Mantle Sepolia Testnet
- **Testing:** Chai + Ethers.js

## ๐Ÿ“ Smart Contracts

### Deployed on Mantle Sepolia

| Contract | Address |
|----------|---------|
| **Liquidity Pools** | `0xe63514C2B0842B58A16Ced0C63668BAA91B033Af` |
| **Swap Router** | `0xFe2108798dC74481d5cCE1588cBD00801758dD6d` |

[View on Explorer โ†’](https://explorer.sepolia.mantle.xyz)

## ๐ŸŽฏ Use Cases

### For Traders- Swap tokens with minimal slippage
- Multi-hop routing finds best paths
- Low gas costs on L2

### For Liquidity Providers- Earn 0.3% on all swaps
- Receive LP tokens
- Remove liquidity anytime

### For Developers- Learn AMM mechanics
- Study DeFi integration
- Fork and customize

## ๐Ÿ“š Documentation

- **[Implementation Summary](./IMPLEMENTATION_SUMMARY.md)** - Complete technical overview and implementation details

## ๐Ÿงช Testing

### Frontend Testing```bash
npm run dev
```

### Smart Contract Testing```bash
cd ../Mantel_contract
npx hardhat test
```

### Backend Scripts```bash
# Mint test tokens
npm run hardhat:mint

# Add liquidity
npm run hardhat:liquidity

# Execute swap
npm run hardhat:swap

# Multi-hop swap
npm run hardhat:multihop

# Complete setup
npm run hardhat:quickstart
```

## ๐Ÿ”’ Security

โš ๏ธ **Testnet Only**: This DEX is deployed on Mantle Sepolia Testnet. All tokens are for testing purposes and have **no real value**.

For production use:
- Professional security audit required
- Implement additional safety checks
- Add protocol fee mechanism
- Enable emergency pause functionality

## ๐Ÿ› ๏ธ Development

### Project Structure

```
Mantle_Dex/
โ”œโ”€โ”€ app/                  # Next.js pages
โ”œโ”€โ”€ components/           # React components
โ”‚   โ”œโ”€โ”€ trade/           # DEX trading components
โ”‚   โ”œโ”€โ”€ portfolio/       # Portfolio management
โ”‚   โ””โ”€โ”€ features/        # Wallet integration
โ”œโ”€โ”€ contracts/           # Contract ABIs & config
โ”œโ”€โ”€ hooks/               # Custom React hooks
โ”œโ”€โ”€ lib/                 # Utilities
โ””โ”€โ”€ scripts/             # Hardhat interaction scripts
```

### Available Scripts

```bash
npm run dev              # Start dev server
npm run build           # Build for production
npm run start           # Start production server
npm run lint            # Run linter
npm run hardhat:*       # Hardhat operations
```

## ๐ŸŒ Network Configuration

### Mantle Sepolia Testnet

- **Chain ID:** 5003
- **RPC URL:** https://rpc.sepolia.mantle.xyz
- **Explorer:** https://explorer.sepolia.mantle.xyz
- **Faucet:** https://faucet.sepolia.mantle.xyz

Add to MetaMask:
1. Networks โ†’ Add Network โ†’ Add Manually
2. Enter the details above
3. Save

## ๐ŸŽจ Features Walkthrough

### 1. Token Swapping- Select input/output tokens
- Enter amount
- Review estimated output
- Approve & swap
- Track transaction on explorer

### 2. Liquidity Management- Choose token pair
- Enter amounts (auto-calculated ratio)
- Approve both tokens
- Add liquidity
- Receive LP tokens

### 3. Multi-Hop Routing- Swap tokens without direct pools
- Example: DAI โ†’ USDC โ†’ WETH โ†’ WBTC
- Atomic transaction (all-or-nothing)
- Automatic path finding

## ๐Ÿค Contributing

Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request

## ๐Ÿ“„ License

MIT License - see [LICENSE](./LICENSE) file

## ๐Ÿ™ Acknowledgments

- Uniswap V2 for the AMM design
- Mantle Network for L2 infrastructure
- shadcn/ui for beautiful components
- wagmi & viem for Web3 integration

## ๐Ÿ“ž Support

- **Issues:** GitHub Issues
- **Docs:** [Integration Guide](./DEX_INTEGRATION_GUIDE.md)
- **Explorer:** https://explorer.sepolia.mantle.xyz

## ๐ŸŽ‰ Getting Started

Ready to try it out?

```bash
npm install
npm run dev
```

Then visit **http://localhost:3000/trade** and start trading!

---

**Built with โค๏ธ on Mantle Network**

โญ Star this repo if you found it helpful!

Progress During Hackathon

# ๐ŸŒŠ Omeswap โ€” Mantle DEX **Omeswap** is a next-generation decentralized exchange (DEX) and DeFi platform built natively on **Mantle Network (L2)**. It combines a fully functional Uniswap V2-style Automated Market Maker (AMM) with advanced portfolio analytics, token research tools, and a visual AI agent builder โ€” all wrapped in a stunning, modern interface. ![Mantle DEX](https://img.shields.io/badge/Mantle-DEX-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Next.js](https://img.shields.io/badge/Next.js-15-black) ![React](https://img.shields.io/badge/React-19-blue) --- ## ๐Ÿ“– Project Overview Omeswap is designed to be the all-in-one DeFi hub for traders, liquidity providers, and developers on Mantle. Unlike traditional DEXs that only offer swapping functionality, Omeswap provides: 1. **Decentralized Trading** โ€” Swap tokens with optimal routing through multi-hop paths 2. **Liquidity Management** โ€” Provide liquidity to pools and earn trading fees 3. **Portfolio Tracking** โ€” Real-time wallet analysis across multiple chains 4. **Token Research** โ€” Deep token analytics with audit scores, charts, and fundamental analysis 5. **DEX Explorer** โ€” Browse all pools, tokens, and transactions on the protocol 6. **AI Agent Builder** โ€” Visually design and deploy automated trading strategies ### ๐ŸŽฏ Why Omeswap? | Feature | Traditional DEX | Omeswap | |---------|----------------|---------| | Token Swaps | โœ… | โœ… | | Multi-hop Routing | โŒ | โœ… | | Portfolio Analytics | โŒ | โœ… | | Token Research & Audits | โŒ | โœ… | | AI Trading Agents | โŒ | โœ… | | L2 Low Gas Fees | Varies | โœ… (Mantle) | | Modern UI/UX | Basic | โœ… Premium | --- ## โœจ Core Features ### ๐Ÿ”„ Decentralized Exchange (AMM) - **Uniswap V2 Constant Product AMM** โ€” `x * y = k` formula for fair, permissionless trading - **Multi-Hop Swap Router** โ€” Automatically routes through multiple pools to find the best price (e.g., tUSDC โ†’ tWETH โ†’ tWBTC in a single transaction) - **0.3% LP Fees** โ€” Liquidity providers earn fees on every trade proportional to their share - **Slippage Protection** โ€” Configurable slippage tolerance to protect against price movements - **10 Testnet Tokens** โ€” tUSDC, tUSDT, tDAI, tWETH, tWBTC, tLINK, tUNI, tAAVE, tCRV, tMKR ### ๐Ÿ’ง Liquidity Provision - **Add Liquidity** โ€” Deposit token pairs to liquidity pools and receive LP tokens - **Remove Liquidity** โ€” Burn LP tokens to withdraw your proportional share anytime - **Pool Analytics** โ€” View reserves, total supply, your position value, and fee earnings - **Dual Token Approval** โ€” Streamlined UX for approving both tokens before adding liquidity ### ๐Ÿ“Š DEX Explorer - **Tokens Table** โ€” Browse all tokens with price, 24h volume, liquidity, and sparkline charts - **Pools Table** โ€” View all liquidity pools with TVL, volume, APR estimates, and composition - **Transactions Feed** โ€” Real-time feed of swaps, adds, and removes across the protocol - **Global Stats** โ€” Total Value Locked (TVL), 24h volume, and protocol-wide metrics - **Advanced Filtering** โ€” Search, sort, and filter by multiple criteria ### ๐Ÿ’ผ Portfolio Dashboard - **Wallet Analysis** โ€” Connect your wallet to see real-time token holdings and values - **Multi-Chain Support** โ€” Track assets across Ethereum, Polygon, and other EVM chains - **Net Worth Tracking** โ€” Aggregated portfolio value with historical charts - **Custom Address Analysis** โ€” Analyze any wallet address without connecting - **Dust Filtering** โ€” Hide low-value tokens for a cleaner view - **Agent Wallet Cards** โ€” Dedicated tracking for AI agent-managed funds ### ๐Ÿ” Token Detail Pages - **Comprehensive Analytics** โ€” Price charts, market cap, volume, circulating supply - **Audit Scores** โ€” Financial, fundamental, social, and security ratings (0-100) - **Fundamental Analysis** โ€” AI-generated insights on tokenomics and project health - **Technical Analysis** โ€” Chart indicators and trading signals - **Volume Breakdown** โ€” CEX vs DEX volume distribution - **Related Tokens** โ€” Discover similar tokens and alternatives - **Integrated Swap** โ€” Trade directly from the token detail page ### ๐Ÿค– AI Agent Builder (No-Code Trading Bots) Build automated trading strategies visually with a drag-and-drop flow canvas: #### Block Types: - **Triggers** โ€” Price threshold, price change %, time-based, manual, on-chain events - **Conditions** โ€” If/else logic, comparisons, AND/OR gates, range checks - **Actions** โ€” Buy, sell, swap, limit orders, stop-loss, take-profit - **Strategies** โ€” DCA, grid trading, arbitrage, market making, trailing stops - **Indicators** โ€” RSI, MACD, moving averages, Bollinger Bands, volume #### Agent Features: - Visual flow-based editor (React Flow) - Parameter configuration for each block - Save, load, and manage multiple agents - Execution status tracking - Draft โ†’ Testing โ†’ Active โ†’ Paused lifecycle ### ๐ŸŽจ Premium UI/UX - **3D Spline Animations** โ€” Interactive 3D scenes on the landing page - **Liquid Ether Background** โ€” Fluid simulation background effects - **GSAP Animations** โ€” Smooth scroll-triggered animations - **Framer Motion** โ€” Delightful micro-interactions throughout - **Variable Font Proximity** โ€” Text that reacts to cursor position - **Dark Theme** โ€” Optimized for night trading sessions - **Responsive Design** โ€” Seamless experience from mobile to 4K displays - **shadcn/ui Components** โ€” Accessible, customizable UI primitives --- ## ๐Ÿ—๏ธ Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ FRONTEND (Next.js 15) โ”‚ โ”‚ React 19 โ€ข Tailwind CSS โ€ข shadcn/ui โ€ข Framer Motion โ€ข GSAP โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Pages: โ”‚ Components: โ”‚ โ”‚ โ€ข Landing (3D Hero + Bento) โ”‚ โ€ข SwapCard โ”‚ โ”‚ โ€ข Trade (Swap/Liquidity/Mint) โ”‚ โ€ข AddLiquidityCard โ”‚ โ”‚ โ€ข Explore (Tokens/Pools/Txns) โ”‚ โ€ข TokensTable / PoolsTable โ”‚ โ”‚ โ€ข Portfolio (Holdings/Analysis) โ”‚ โ€ข AgentBlockNode / Canvas โ”‚ โ”‚ โ€ข Token Detail (Charts/Audits) โ”‚ โ€ข WalletAnalysisPanel โ”‚ โ”‚ โ€ข Agent Builder (Flow Editor) โ”‚ โ€ข PriceChart / RadarChart โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ wagmi v2 + viem v2 + RainbowKit โ”‚ TanStack Query (caching) โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ WEB3 / BLOCKCHAIN LAYER โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Custom Hooks: โ”‚ External APIs: โ”‚ โ”‚ โ€ข use-dex-swap โ”‚ โ€ข CoinGecko (prices/metadata) โ”‚ โ”‚ โ€ข use-liquidity โ”‚ โ€ข Wallet Analysis Service โ”‚ โ”‚ โ€ข use-token-mint โ”‚ โ€ข OpenAI (agent logic) โ”‚ โ”‚ โ€ข use-dex-pools โ”‚ โ”‚ โ”‚ โ€ข use-wallet-analysis โ”‚ โ”‚ โ”‚ โ€ข use-pool-details โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ JSON-RPC (https://rpc.sepolia.mantle.xyz) โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ MANTLE SEPOLIA TESTNET (Chain ID: 5003) โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Smart Contracts (Solidity 0.8.20): โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ MultiTokenLiquidityPools (0xe635...) โ”‚ โ”‚ โ”‚ โ”‚ โ€ข createPool() โ”‚ โ”‚ โ”‚ โ”‚ โ€ข addLiquidity() / removeLiquidity() โ”‚ โ”‚ โ”‚ โ”‚ โ€ข swap() โ€” single-hop swaps โ”‚ โ”‚ โ”‚ โ”‚ โ€ข getReserves() / getUserPosition() โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ MultiHopSwapRouter (0xFe21...) โ”‚ โ”‚ โ”‚ โ”‚ โ€ข swapExactTokensForTokens() โ”‚ โ”‚ โ”‚ โ”‚ โ€ข getAmountsOut() โ€” path simulation โ”‚ โ”‚ โ”‚ โ”‚ โ€ข Multi-hop routing (2-3+ hops) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ 10 Test ERC20 Tokens (Mintable) โ”‚ โ”‚ โ”‚ โ”‚ tUSDC, tUSDT, tDAI, tWETH, tWBTC... โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` --- ## ๐Ÿ“ Smart Contracts ### Deployed on Mantle Sepolia Testnet | Contract | Address | Description | |----------|---------|-------------| | **MultiTokenLiquidityPools** | `0xe63514C2B0842B58A16Ced0C63668BAA91B033Af` | AMM pools, liquidity, single-hop swaps | | **MultiHopSwapRouter** | `0xFe2108798dC74481d5cCE1588cBD00801758dD6d` | Multi-hop routing engine | | **tUSDC** | `0x6D13968b1Fe787ed0237D3645D094161CC165E4c` | Test USDC token | | **tUSDT** | `0x0828b7774ea41Db0fCbf13ADe31b5F61624A1364` | Test USDT token | | **tDAI** | `0x907fF6a35a3E030c11a02e937527402F0d3333ee` | Test DAI token | | **tWETH** | `0x95829976c0cd4a58fBaA4802410d10BDe15E3CA0` | Test Wrapped ETH | | **tWBTC** | `0xD781bf79d86112215F7bF141277f5782640cad5D` | Test Wrapped BTC | | **tLINK** | `0xCEbBd58F40c8CE0739327fDde1A52bb67557e37a` | Test Chainlink token | | **tUNI** | `0xe771E51F90D7176B6bd17a123f7D78c2231158a0` | Test Uniswap token | | **tAAVE** | `0x6b1F4e0Eea462745750dddaEB11FB85B968a87F6` | Test Aave token | | **tCRV** | `0xa6bAeA5811Bd070AeF343537b03A909597002526` | Test Curve token | | **tMKR** | `0x4296e3e1d3efbb5bac66a66f1E463BAc25Ec6189` | Test Maker token | [View on Mantle Sepolia Explorer โ†’](https://explorer.sepolia.mantle.xyz) --- ## ๐ŸŽฏ Use Cases ### For Traders - Swap tokens with minimal slippage via intelligent multi-hop routing - Research tokens with comprehensive analytics and audit scores - Track your portfolio value and holdings in real-time - Build automated trading strategies without coding ### For Liquidity Providers - Earn 0.3% fees on all swaps in pools you provide liquidity to - Track your LP positions and accumulated fees - Add/remove liquidity anytime with no lock-up periods ### For Developers - Study a production-grade AMM implementation - Learn wagmi v2, viem v2, and modern React patterns - Explore visual programming concepts with the agent builder - Fork, customize, and deploy your own DEX ## ๐Ÿš€ Quick Start ### 1. Install Dependencies ```bash npm install ``` ### 2. Setup Environment Create `.env.local`: ```bash NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id ``` Get your WalletConnect Project ID from: https://cloud.walletconnect.com/ ### 3. Start Development Server ```bash npm run dev ``` Visit: **http://localhost:3000** ### 4. Connect & Trade 1. **Connect Wallet** (top right corner) 2. **Switch to Mantle Sepolia Testnet** 3. **Get testnet MNT** from https://faucet.sepolia.mantle.xyz 4. **Mint test tokens** (Mint Tokens tab) 5. **Add liquidity** or **start swapping**! ## ๐Ÿ“‹ Prerequisites - Node.js 18+ - MetaMask or compatible wallet - Testnet MNT (for gas fees) ## ๐Ÿ—๏ธ Tech Stack ### Frontend - **Framework:** Next.js 15 (App Router) - **UI Library:** React 19 - **Styling:** Tailwind CSS + shadcn/ui - **Web3:** wagmi v2 + viem v2 - **Wallet:** RainbowKit ### Smart Contracts - **Language:** Solidity 0.8.20 - **Framework:** Hardhat - **Network:** Mantle Sepolia Testnet - **Testing:** Chai + Ethers.js ## ๐Ÿ“ Smart Contracts ### Deployed on Mantle Sepolia | Contract | Address | |----------|---------| | **Liquidity Pools** | `0xe63514C2B0842B58A16Ced0C63668BAA91B033Af` | | **Swap Router** | `0xFe2108798dC74481d5cCE1588cBD00801758dD6d` | [View on Explorer โ†’](https://explorer.sepolia.mantle.xyz) ## ๐ŸŽฏ Use Cases ### For Traders - Swap tokens with minimal slippage - Multi-hop routing finds best paths - Low gas costs on L2 ### For Liquidity Providers - Earn 0.3% on all swaps - Receive LP tokens - Remove liquidity anytime ### For Developers - Learn AMM mechanics - Study DeFi integration - Fork and customize ## ๐Ÿ“š Documentation - **[Implementation Summary](./IMPLEMENTATION_SUMMARY.md)** - Complete technical overview and implementation details ## ๐Ÿงช Testing ### Frontend Testing ```bash npm run dev ``` ### Smart Contract Testing ```bash cd ../Mantel_contract npx hardhat test ``` ### Backend Scripts ```bash # Mint test tokens npm run hardhat:mint # Add liquidity npm run hardhat:liquidity # Execute swap npm run hardhat:swap # Multi-hop swap npm run hardhat:multihop # Complete setup npm run hardhat:quickstart ``` ## ๐Ÿ”’ Security โš ๏ธ **Testnet Only**: This DEX is deployed on Mantle Sepolia Testnet. All tokens are for testing purposes and have **no real value**. For production use: - Professional security audit required - Implement additional safety checks - Add protocol fee mechanism - Enable emergency pause functionality ## ๐Ÿ› ๏ธ Development ### Project Structure ``` Mantle_Dex/ โ”œโ”€โ”€ app/ # Next.js pages โ”œโ”€โ”€ components/ # React components โ”‚ โ”œโ”€โ”€ trade/ # DEX trading components โ”‚ โ”œโ”€โ”€ portfolio/ # Portfolio management โ”‚ โ””โ”€โ”€ features/ # Wallet integration โ”œโ”€โ”€ contracts/ # Contract ABIs & config โ”œโ”€โ”€ hooks/ # Custom React hooks โ”œโ”€โ”€ lib/ # Utilities โ””โ”€โ”€ scripts/ # Hardhat interaction scripts ``` ### Available Scripts ```bash npm run dev # Start dev server npm run build # Build for production npm run start # Start production server npm run lint # Run linter npm run hardhat:* # Hardhat operations ``` ## ๐ŸŒ Network Configuration ### Mantle Sepolia Testnet - **Chain ID:** 5003 - **RPC URL:** https://rpc.sepolia.mantle.xyz - **Explorer:** https://explorer.sepolia.mantle.xyz - **Faucet:** https://faucet.sepolia.mantle.xyz Add to MetaMask: 1. Networks โ†’ Add Network โ†’ Add Manually 2. Enter the details above 3. Save ## ๐ŸŽจ Features Walkthrough ### 1. Token Swapping - Select input/output tokens - Enter amount - Review estimated output - Approve & swap - Track transaction on explorer ### 2. Liquidity Management - Choose token pair - Enter amounts (auto-calculated ratio) - Approve both tokens - Add liquidity - Receive LP tokens ### 3. Multi-Hop Routing - Swap tokens without direct pools - Example: DAI โ†’ USDC โ†’ WETH โ†’ WBTC - Atomic transaction (all-or-nothing) - Automatic path finding ## ๐Ÿค Contributing Contributions are welcome! Please: 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Submit a pull request ## ๐Ÿ“„ License MIT License - see [LICENSE](./LICENSE) file ## ๐Ÿ™ Acknowledgments - Uniswap V2 for the AMM design - Mantle Network for L2 infrastructure - shadcn/ui for beautiful components - wagmi & viem for Web3 integration ## ๐Ÿ“ž Support - **Issues:** GitHub Issues - **Docs:** [Integration Guide](./DEX_INTEGRATION_GUIDE.md) - **Explorer:** https://explorer.sepolia.mantle.xyz ## ๐ŸŽ‰ Getting Started Ready to try it out? ```bash npm install npm run dev ``` Then visit **http://localhost:3000/trade** and start trading! --- **Built with โค๏ธ on Mantle Network** โญ Star this repo if you found it helpful!

Fundraising Status

na
Team Leader
Aanik200365
Project Link
Sector
DeFiAI