Skip to content

USDC decimal ambiguity: 18 decimals as native gas token vs 6 decimals as ERC-20 — undocumented, causes silent value bugs #91

@osr21

Description

@osr21

Summary

USDC on Arc has two distinct decimal representations depending on context:

Context Decimals Example: 1 USDC
Native gas token (used for gas fees) 18 1000000000000000000
ERC-20 transfer / contract interaction 6 1000000

This distinction is not documented anywhere in the Arc Network developer resources. Developers who look up the USDC contract decimals correctly get 6, but gas fee calculations from the node return values in 18-decimal format. The mismatch causes silent incorrect value display if not handled explicitly.

Impact

Developers building on Arc will hit this without any error message — values will just be wrong by a factor of 10^12. Specific scenarios:

  1. Gas fee display — reading gasPrice * gasUsed from a receipt gives an 18-decimal value; displaying it as USDC without converting produces values like "0.000000000001 USDC" instead of "0.01 USDC"
  2. Balance displayeth_getBalance returns the native USDC balance in 18 decimals while balanceOf on the ERC-20 contract returns 6 decimals for the same token, same address
  3. Transfer amount validation — a developer testing whether a gas fee exceeds a transfer amount will compare two values in different scales and get incorrect results

Suggested Fix

Add a dedicated section in the developer documentation that explicitly states:

  • Arc's native gas token is USDC with 18 decimals (used in gasPrice, value, eth_getBalance, receipts)
  • The USDC ERC-20 contract (0x3600000000000000000000000000000000000000) uses 6 decimals for balanceOf, transfer, and transferFrom
  • When displaying gas costs to users, convert from 18-decimal native to 6-decimal display using nativeAmount / 10^12

Context

Discovered while building Arc Pay. We document this in our internal replit.md as a known gotcha: "Always use 6 decimals for application-level transfers."

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