Why Polygon?
Low fees
Transaction costs under $0.01
Fast finality
2-second block times
EVM compatible
Works with Ethereum tools
Native USDC
Direct USDC support
Network details
Polygon Mainnet
| Parameter | Value |
|---|---|
| Network name | Polygon Mainnet |
| Chain ID | 137 |
| Currency | POL (formerly MATIC) |
| RPC URL | https://polygon-rpc.com |
| Block explorer | polygonscan.com |
| USDC address | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 |
Polygon Amoy (Testnet)
| Parameter | Value |
|---|---|
| Network name | Polygon Amoy |
| Chain ID | 80002 |
| Currency | POL (testnet) |
| RPC URL | https://rpc-amoy.polygon.technology |
| Block explorer | amoy.polygonscan.com |
| USDC address | 0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582 |
| Faucet | faucet.polygon.technology |
Add Polygon to MetaMask
Enter network details
Fill in the Polygon network parameters:
- Network name: Polygon Mainnet
- New RPC URL:
https://polygon-rpc.com - Chain ID: 137
- Currency symbol: POL
- Block explorer URL:
https://polygonscan.com
Programmatic network configuration
Using wagmi
Using ethers.js
Using web3.js
Get POL for gas
All transactions on Polygon require POL for gas fees (even though you trade in USDC).Mainnet
- Centralized exchanges
- Bridge from Ethereum
- On-ramp services
Buy POL on exchanges and withdraw to Polygon:
- Binance
- Coinbase
- Kraken
- OKX
Testnet (Amoy)
Get free test POL from the faucet:Visit faucet
Network configuration in code
Fromsrc/lib/network.ts:
src/lib/network.ts
RPC endpoints
Public RPCs
Free public endpoints (rate limited):Private RPC providers
For production bots, use dedicated RPC providers:Alchemy
300M requests/month free
Infura
100k requests/day free
QuickNode
High-performance nodes
Gas price optimization
- Get current gas price
- Set custom gas
- Wait for lower gas
Typical Polygon gas prices: 30-100 gwei (vs 15-50 gwei on Ethereum layer 2s).
Network health checks
Troubleshooting
Transactions stuck pending
Transactions stuck pending
Try:
- Increase gas price by 10-20%
- Cancel and resubmit transaction
- Check Polygon status
'Wrong network' error
'Wrong network' error
Solution:
- Ensure wallet is on Polygon (chain ID 137)
- Click “Switch Network” in wallet prompt
- Refresh page after switching
RPC timeout
RPC timeout
If public RPC is slow:
- Try alternative RPC endpoint
- Use private RPC provider (Alchemy/Infura)
- Implement retry logic with exponential backoff
Insufficient POL for gas
Insufficient POL for gas
You need POL even for USDC transactions:
- Buy POL on exchange
- Bridge from Ethereum
- Keep minimum 0.1 POL for gas
Next steps
USDC operations
Learn how to deposit and trade USDC
Smart contracts
View all contract addresses