A decentralized token swap interface supporting both mainnet and testnet environments. Built for developers who need to test contracts and traders who want a unified swapping experience.
NetSwap provides a simple interface for swapping ERC-20 tokens across multiple blockchain networks. The main feature is dual environment support—you can swap real tokens on mainnet or test your integrations on testnet networks without switching apps.
If you're developing DApps, you need to test token swaps before going live. NetSwap lets you do that on testnets with the same interface you'd use in production. For traders, it's a straightforward DEX that works across multiple chains.
- MetaMask or another Web3 wallet
Get these credentials from:
- Infura: https://infura.io (free tier available)
- Alchemy: https://alchemy.com (free tier available)
- WalletConnect: https://cloud.walletconnect.com
Production:
- Ethereum (ETH)
- Polygon (MATIC)
- Binance Smart Chain (BSC)
- Arbitrum
- Optimism
Testing:
- Goerli (Ethereum testnet)
- Mumbai (Polygon testnet)
- Sepolia (Ethereum testnet)
- Arbitrum Goerli
- Optimism Goerli
Basic Swap:
- Connect your wallet
- Make sure you're on the right network
- Select tokens and enter amount
- Check the exchange rate and slippage
- Confirm in your wallet
For Developers:
- Switch to a testnet in your wallet
- Get testnet tokens from a faucet
- Test your swap logic
- When ready, switch to mainnet
Settings:
- Slippage tolerance: 0.1% to 1% (default 0.5%)
- Transaction deadline: 10-30 minutes
- Expert mode: Skip confirmation screens (be careful with this)
Frontend:
- React with TypeScript
- Ethers.js for blockchain interaction
- Wagmi for React hooks
- Tailwind CSS for styling
Infrastructure:
- Infura/Alchemy for node access
- The Graph for transaction history
- WalletConnect for mobile wallets
- IPFS for decentralized hosting
Smart Contracts:
- Swap router for token exchanges
- Price oracle for real-time rates
- Custom liquidity pools
Testnet:
- Testnet tokens are worthless
- Networks can reset without notice
- Always verify you're on testnet before testing
- Don't send real tokens to testnet addresses
Mainnet:
- Always verify token contract addresses
- Start with small amounts for unfamiliar tokens
- Check slippage settings
- Review gas fees before confirming
- Use a hardware wallet for large amounts
General:
- Never share your private keys or seed phrase
- Double-check URLs (watch for phishing sites)
- Verify contract addresses on Etherscan
- Keep your wallet software updated
You'll need testnet ETH or MATIC to test:
- Goerli ETH: https://goerlifaucet.com
- Mumbai MATIC: https://faucet.polygon.technology
- Sepolia ETH: https://sepoliafaucet.com
Most faucets give you enough for several test transactions.
"Insufficient funds for gas"
- Get more testnet/mainnet tokens
- Lower the gas price if network isn't congested
"Transaction failed"
- Check you have enough of the input token
- Increase slippage tolerance
- Make sure you're on the correct network
"Cannot read properties of undefined"
- Wallet not connected
- Wrong network selected
- RPC endpoint issue (try switching networks)
Fork the repo, make changes, and open a pull request. Please:
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Follow the existing code style
MIT License - see LICENSE file
- Check the Issues page
- Read the Wiki for detailed guides
- Ask in Discussions
This is experimental software. Always verify transactions before confirming. The developers are not responsible for lost funds due to user error, bugs, or smart contract vulnerabilities. Never trade more than you can afford to lose.