A full-stack decentralized exchange (DEX) built with Hardhat and Next.js, featuring token faucets and AMM swapping.
- Token Swapping: AMM-based swapping using constant product formula (x * y = k)
- Token Faucet: Built-in faucet for easy testing (100 tokens every 24 hours)
- Liquidity Management: Add liquidity to the pool
- Multi-Network: Local development and Sepolia testnet support
- Blockchain Explorer: Integrated Blockscout for transaction monitoring
- Responsive UI: Modern interface with wallet connection
- Verified Contracts: Source code verified on Etherscan
git clone https://github.com/frhanjav/mini-dex.git
cd mini-dex
cd blockchain && npm install
cd ../frontend && npm installcd blockchain
npx hardhat nodecd blockchain
npm run deploy:localgit clone https://github.com/blockscout/blockscout.git
cd blockscout/docker-compose
docker-compose -f hardhat-network.yml up -dAccess at: http://localhost:80
cd frontend
cp .env.local.example .envcd frontend
npm run devVisit: http://localhost:3000
-
Add Hardhat Network:
- Network: Hardhat Localhost
- RPC URL: http://127.0.0.1:8545
- Chain ID: 31337
-
Import Test Account: Use any private key from Hardhat node output
- TOM Token:
0xFda6691C96F1b48819EE16A782aAecC720237E2b - BEN Token:
0x16D3f4D3631E275b4D3c89Fa80DcCdd360E5d3Bc - SimpleDEX:
0x5Ed6038971F5a7Cd05a5BC2b37a2eFa7547eeB8B
- Switch MetaMask to Sepolia Testnet
- Get Sepolia ETH from faucet
- Visit the dex faucet tab to get test tokens
- Start swapping!
