Skip to content

bug: MetaMask shows "Network fee: Unavailable" for all Arc Testnet transactions — USDC-as-native-gas breaks wallet fee estimation #188

Description

@osr21

Summary

Every transaction on Arc Testnet shows "Network fee ⚠ Unavailable" in MetaMask (and likely other EIP-1193 wallets). The "Review alert" warning is surfaced, which adds friction and discourages users from completing the transaction.

MetaMask showing Network fee Unavailable on Arc Testnet

The root cause: Arc Testnet uses USDC as the native gas token, not ETH. MetaMask's fee estimation calls eth_gasPrice / eth_maxPriorityFeePerGas and can compute a wei value, but it cannot display a human-readable USD/token amount because it doesn't know the exchange rate or symbol for USDC-as-gas. This causes the fee display to fall back to "Unavailable".


Reproduction

  1. Add Arc Testnet to MetaMask (Chain ID 5042002, native currency USDC)
  2. Open any DApp that calls eth_sendTransaction or wallet_sendCalls on Arc
  3. Observe: MetaMask fee row shows "⚠ Unavailable" with no USDC amount and a "Review alert" badge

Root Cause

MetaMask assumes the native gas token is ETH (or a token with a known CoinGecko price feed). When the native currency is USDC:

  • eth_gasPrice returns a valid wei value
  • MetaMask cannot map that to a USD display amount or even a USDC amount without explicit metadata
  • The "Unavailable" fallback is triggered

This is compounded when DApps omit the gas field from transaction objects — MetaMask then attempts eth_estimateGas internally and may fail or return an unreliable value, making the situation worse.


Workaround (DApp-side fix)

Explicitly include a gas limit in every transaction object. MetaMask can then compute fee = gas × gasPrice and display the raw USDC gas cost even without price-feed lookup:

// viem writeContract — add gas explicitly for all Arc Testnet calls
await walletClient.writeContract({
  address: CONTRACT_ADDRESSES.CONDITIONAL_ESCROW,
  abi: CONDITIONAL_ESCROW_ABI,
  functionName: "createEscrow",
  args: [...],
  chain: ARC_TESTNET,
  gas: 350_000n,  // ← explicit gas limit clears the "Unavailable" warning
});

Recommended gas limits per operation type:

Operation Recommended gas
ERC-20 approve 80_000
Escrow createEscrow / Vesting createSchedule 350_000
Escrow release / Vesting claim 120_000
CCTP initiateConditionalTransfer 400_000

We applied this fix in osr21/arc-stablecoin-dapp across all contract-calling pages and the "Unavailable" warning no longer appears.


Suggested Platform Fix

The cleanest long-term solution is for the Arc node / wallet provider metadata to include USDC's price feed in the chain's EIP-3085 wallet_addEthereumChain response, so that wallets can price the gas token correctly:

{
  "chainId": "0x4CE052",
  "chainName": "Arc Testnet",
  "nativeCurrency": { "name": "USDC", "symbol": "USDC", "decimals": 6 },
  "rpcUrls": ["https://rpc.testnet.arc.network"],
  "blockExplorerUrls": ["https://testnet.arcscan.app"],
  "iconUrls": [...],
  "nativeCurrencyPriceFeedId": "usd-coin"  // ← non-standard but some wallets support this
}

Alternatively, Circle could publish an official wallet_addEthereumChain snippet that includes any wallet-specific metadata needed for proper USDC fee display.


References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions