Feature/singleton dex flash accounting#225
Conversation
- Add Singleton DEX project in typescript folder - Include README with project description - Set up package.json with basic metadata - Add .gitignore for build artifacts
…s, a frontend application, and a bot.
|
Hello @darren-liu @emailtovamos @VamshiVerma @miya-ww @robot-ux @Tianaliu @vivixu-cmd |
Shemse1
left a comment
There was a problem hiding this comment.
0x811009f3aB27f5Ea1292decD152325103b249bdc
Tks you email? |
BNBSwap - Smart DeFi Hub 🚀
Singleton DEX on BNB Chain with Flash Accounting and Native Limit Orders
BNBSwap combines Uniswap V2's simplicity with Uniswap V4's efficiency, adding unique features that make it the most gas-efficient and user-friendly DEX on BNB Chain.
🌟 Key Features
⚡ Flash Accounting
Save 33-44% gas on multi-hop swaps
Unlike traditional DEXes that transfer tokens on every hop, BNBSwap uses internal balance tracking (similar to Uniswap V4). Tokens only move at the end of the transaction, drastically reducing gas costs.
Example: A 3-hop swap (BNB → USDT → BTCB) uses ~56% less gas than traditional routing.
📊 Native Limit Orders
CEX-style limit orders on BNB Chain
Set "buy at X price" orders directly on-chain. Orders are automatically executed by keeper bots when the AMM price crosses your target.
🏗️ Singleton Architecture
One contract to rule them all
All liquidity pools share a single contract, enabling:
💰 Standard AMM
📦 Project Structure
🚀 Quick Start
1. Contracts
Deployment:
.env.exampleto.envand addPRIVATE_KEYandBNB_TESTNET_RPC.forge script script/Deploy.s.sol --rpc-url $BNB_TESTNET_RPC --broadcast2. Frontend
3. Order Execution Bot
🧪 Test Results
37/37 tests passing ✅
We maintain strict 100% test coverage for critical paths:
Run tests with trace:
forge test -vv🔗 Deployed Addresses (BNB Testnet)
0xBdae0CF292881D00520263f35E4450E72a8187830x323...0x948...🎯 Why BNBSwap?
📚 Documentation
🔧 Tech Stack
📄 License
MIT
Built for BNB Chain Hackathon