Skip to main content
Kuest operates on Polygon (formerly Matic), a layer-2 scaling solution for Ethereum that provides fast and low-cost transactions.

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

ParameterValue
Network namePolygon Mainnet
Chain ID137
CurrencyPOL (formerly MATIC)
RPC URLhttps://polygon-rpc.com
Block explorerpolygonscan.com
USDC address0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359

Polygon Amoy (Testnet)

ParameterValue
Network namePolygon Amoy
Chain ID80002
CurrencyPOL (testnet)
RPC URLhttps://rpc-amoy.polygon.technology
Block exploreramoy.polygonscan.com
USDC address0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582
Faucetfaucet.polygon.technology

Add Polygon to MetaMask

1

Open MetaMask

Click the MetaMask extension in your browser.
2

Open network menu

Click the network dropdown at the top (default: “Ethereum Mainnet”).
3

Add network

Click “Add network” or “Add network manually”.
4

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
5

Save and switch

Click “Save” and MetaMask will automatically switch to Polygon.
Most modern wallets support automatic network switching when connecting to Kuest.

Programmatic network configuration

Using wagmi

import { polygon, polygonAmoy } from 'wagmi/chains'
import { useSwitchChain, useAccount } from 'wagmi'

function NetworkSwitcher() {
  const { chain } = useAccount()
  const { switchChain } = useSwitchChain()

  const switchToPolygon = async () => {
    await switchChain({ chainId: polygon.id })
  }

  return (
    <div>
      <p>Current network: {chain?.name}</p>
      <button onClick={switchToPolygon}>Switch to Polygon</button>
    </div>
  )
}

Using ethers.js

import { ethers } from 'ethers'

const polygonNetwork = {
  chainId: 137,
  name: 'Polygon',
  rpcUrls: ['https://polygon-rpc.com'],
  nativeCurrency: {
    name: 'POL',
    symbol: 'POL',
    decimals: 18,
  },
  blockExplorerUrls: ['https://polygonscan.com'],
}

// Add network to wallet
await window.ethereum.request({
  method: 'wallet_addEthereumChain',
  params: [polygonNetwork],
})

Using web3.js

import Web3 from 'web3'

const web3 = new Web3('https://polygon-rpc.com')
const chainId = await web3.eth.getChainId()

console.log('Connected to chain:', chainId) // 137

Get POL for gas

All transactions on Polygon require POL for gas fees (even though you trade in USDC).

Mainnet

Buy POL on exchanges and withdraw to Polygon:
  • Binance
  • Coinbase
  • Kraken
  • OKX
Select Polygon network when withdrawing, not Ethereum!

Testnet (Amoy)

Get free test POL from the faucet:
1

Visit faucet

2

Select network

Choose “Polygon Amoy” from dropdown
3

Enter address

Paste your wallet address
4

Submit

Complete captcha and submit. You’ll receive test POL in ~1 minute.

Network configuration in code

From src/lib/network.ts:
src/lib/network.ts
import { defaultNetwork } from '@/lib/appkit'

export const POLYGON_MAINNET_CHAIN_ID = 137
export const AMOY_CHAIN_ID = 80_002

export const IS_TEST_MODE = defaultNetwork.id === AMOY_CHAIN_ID

export const POLYGON_SCAN_BASE = IS_TEST_MODE
  ? 'https://amoy.polygonscan.com'
  : 'https://polygonscan.com'
This determines which network contracts to use based on environment.

RPC endpoints

Public RPCs

Free public endpoints (rate limited):
const publicRpcs = [
  'https://polygon-rpc.com',
  'https://rpc-mainnet.polygon.technology',
  'https://polygon-bor.publicnode.com',
]

Private RPC providers

For production bots, use dedicated RPC providers:

Alchemy

300M requests/month free

Infura

100k requests/day free

QuickNode

High-performance nodes
import { createPublicClient, http } from 'viem'
import { polygon } from 'viem/chains'

const client = createPublicClient({
  chain: polygon,
  transport: http('https://polygon-mainnet.g.alchemy.com/v2/YOUR-API-KEY'),
})

Gas price optimization

import { useGasPrice } from 'wagmi'

const { data: gasPrice } = useGasPrice()
console.log('Current gas price:', gasPrice)
Typical Polygon gas prices: 30-100 gwei (vs 15-50 gwei on Ethereum layer 2s).

Network health checks

import { publicClient } from '@/lib/wagmi'

export async function checkNetworkHealth() {
  const [blockNumber, gasPrice, chainId] = await Promise.all([
    publicClient.getBlockNumber(),
    publicClient.getGasPrice(),
    publicClient.getChainId(),
  ])

  console.log('Block number:', blockNumber)
  console.log('Gas price:', gasPrice)
  console.log('Chain ID:', chainId)

  // Check if network is responsive
  if (blockNumber === 0n) {
    throw new Error('Network not responding')
  }
}

Troubleshooting

Try:
  1. Increase gas price by 10-20%
  2. Cancel and resubmit transaction
  3. Check Polygon status
Solution:
  1. Ensure wallet is on Polygon (chain ID 137)
  2. Click “Switch Network” in wallet prompt
  3. Refresh page after switching
If public RPC is slow:
  1. Try alternative RPC endpoint
  2. Use private RPC provider (Alchemy/Infura)
  3. Implement retry logic with exponential backoff
You need POL even for USDC transactions:
  1. Buy POL on exchange
  2. Bridge from Ethereum
  3. Keep minimum 0.1 POL for gas

Next steps

USDC operations

Learn how to deposit and trade USDC

Smart contracts

View all contract addresses

Build docs developers (and LLMs) love