Integration Reference
Overview
MonBridgeDex is a production-grade DEX aggregator deployed on Monad that supports both Uniswap V2 and V3 protocols. It provides optimal routing, multi-hop swaps, split trading, and advanced features like TWAP validation and adaptive slippage.
Contract Address: 0x7dd7fc9380e3107028a158f49bd25a8a8d48b225
Network: Monad Mainnet (Chain ID: 143)
Key Features
✅ Multi-DEX Aggregation: Compares V2 and V3 routers for best rates
✅ Split Trading: Automatically distributes large trades across 2-4 routers
✅ Multi-Hop Routing: Optimizes paths including WETH intermediary routes
✅ Adaptive Slippage: Dynamic slippage based on price impact
✅ Flash Loan Protection: TWAP validation for V3 pools
✅ Fee-on-Transfer Support: Handles tokens with transfer fees
React Integration Example
1. Setup & Dependencies
2. Contract Configuration
3. React Hook for Swapping
4. React Component Example
JavaScript (Vanilla) Integration Example
Complete Swap Implementation
Python Integration Example
Using Web3.py
Advanced Features
1. Split Trading (Multi-Router Execution)
For large trades, MonBridgeDex can automatically split orders across multiple routers:
2. Custom Slippage Configuration
3. Fee-on-Transfer Token Support
Important Notes
Security
Always validate addresses: Ensure token addresses are correct before swapping
Check slippage: Monitor price impact and adjust slippage accordingly
Test with small amounts: Test integration with small amounts first
Handle errors: Implement proper error handling for failed transactions
Gas Optimization
Approve once: Use
MaxUint256for approvals to avoid repeated approval transactionsBatch operations: Consider batching multiple swaps if possible
Monitor gas prices: Check network gas prices before executing large trades
Best Practices
Use auto-slippage (pass
0) for most cases - the contract calculates optimal slippageFor large trades, use
getBestSwapDataWithSplits()to check if splitting is beneficialAlways wait for confirmations before updating UI
Cache WETH address to avoid repeated calls
Contract Fees
Fee: 0.1% (10 basis points) on all swaps
Fee is automatically deducted from input amount
No additional gas overhead
Support & Resources
Explorer: MonadScan
Network: Monad Mainnet (Chain ID: 143)
RPC: https://rpc.monad.xyz
For integration support, ensure you:
Test on Monad testnet first if available
Monitor transaction receipts for errors
Implement proper wallet connection flow
Handle network switching to Chain ID 143
Last updated