From 25d90d5ce81b316380399b6c040428c388454e3c Mon Sep 17 00:00:00 2001 From: Robert Seitz Date: Wed, 3 Jun 2026 14:47:36 -0400 Subject: [PATCH 1/2] add arc-mainnet (5042) support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Arc (chainId 5042) is Circle's USDC-native L1: native gas token is USDC, no wrapped native, so pairs pair against native USDC and USDC is the reference token. Since the reference token IS the dollar, getEthPriceInUSD() returns 1 (no reference/stable pair exists) — opted in by including REFERENCE_TOKEN in STABLE_TOKEN_PAIRS; the guard only fires on that, so other chains are unaffected. - pricing.ts: return ONE_BD when STABLE_TOKEN_PAIRS.includes(REFERENCE_TOKEN) - config/arc-mainnet: V2 factory 0x89e5db8b... @ startBlock 1948011; REFERENCE_TOKEN = USDC, STABLECOINS = [USDC], WHITELIST = [USDC, EURC, USYC, cirBTC] - register arc-mainnet in the NETWORK enum Addresses per Uniswap/contracts deployments/5042.md; startBlock from explorer.arc.io. cirBTC (0x171A4217...) is BTC-pegged so it's whitelisted but excluded from STABLECOINS. --- config/arc-mainnet/.subgraph-env | 2 ++ config/arc-mainnet/chain.ts | 38 ++++++++++++++++++++++++++++++++ config/arc-mainnet/config.json | 5 +++++ script/utils/prepareNetwork.ts | 1 + src/common/pricing.ts | 6 +++++ 5 files changed, 52 insertions(+) create mode 100644 config/arc-mainnet/.subgraph-env create mode 100644 config/arc-mainnet/chain.ts create mode 100644 config/arc-mainnet/config.json diff --git a/config/arc-mainnet/.subgraph-env b/config/arc-mainnet/.subgraph-env new file mode 100644 index 00000000..fd06f97f --- /dev/null +++ b/config/arc-mainnet/.subgraph-env @@ -0,0 +1,2 @@ +V2_TOKEN_SUBGRAPH_NAME="uniswap-v2-tokens-arc-mainnet" +V2_SUBGRAPH_NAME="uniswap-v2-arc-mainnet" diff --git a/config/arc-mainnet/chain.ts b/config/arc-mainnet/chain.ts new file mode 100644 index 00000000..26b14ea5 --- /dev/null +++ b/config/arc-mainnet/chain.ts @@ -0,0 +1,38 @@ +import { Address, BigDecimal, BigInt } from '@graphprotocol/graph-ts/index' + +export const FACTORY_ADDRESS = '0x89e5db8b5aa49aa85ac63f691524311aeb649eba' + +// Arc (chainId 5042) is Circle's USDC-native L1: the native gas token is USDC and there is no +// wrapped native (the deployment's "WETH9" slot is the UnsupportedProtocol stub), so pairs pair +// against native USDC and USDC is the reference token. Because the reference token IS the dollar, +// getEthPriceInUSD() returns 1 — opted in by including REFERENCE_TOKEN in STABLE_TOKEN_PAIRS. +const USDC = '0x3600000000000000000000000000000000000000'.toLowerCase() +const EURC = '0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a'.toLowerCase() +const USYC = '0xe9185F0c5F296Ed1797AaE4238D26CCaBEadb86C'.toLowerCase() +const CIRBTC = '0x171A4217b86A807A64eB94757Db6849fb4bDbAA0'.toLowerCase() // cirBTC (BTC-pegged) — whitelist only, not a USD stable + +export const REFERENCE_TOKEN = USDC +export const STABLE_TOKEN_PAIRS = [REFERENCE_TOKEN] + +// token where amounts should contribute to tracked volume and liquidity +export const WHITELIST: string[] = [USDC, EURC, USYC, CIRBTC] + +// USD-pegged stablecoins only (EURC is EUR-pegged, USYC is yield-bearing → excluded) +export const STABLECOINS = [USDC] + +// minimum liquidity required to count towards tracked volume for pairs with small # of Lps +export const MINIMUM_USD_THRESHOLD_NEW_PAIRS = BigDecimal.fromString('40000') + +// minimum liquidity for price to get tracked +export const MINIMUM_LIQUIDITY_THRESHOLD_ETH = BigDecimal.fromString('2000') + +export class TokenDefinition { + address: Address + symbol: string + name: string + decimals: BigInt +} + +export const STATIC_TOKEN_DEFINITIONS: TokenDefinition[] = [] + +export const SKIP_TOTAL_SUPPLY: string[] = [] diff --git a/config/arc-mainnet/config.json b/config/arc-mainnet/config.json new file mode 100644 index 00000000..138581a7 --- /dev/null +++ b/config/arc-mainnet/config.json @@ -0,0 +1,5 @@ +{ + "network": "arc-mainnet", + "factory": "0x89e5db8b5aa49aa85ac63f691524311aeb649eba", + "startblock": "1948011" +} diff --git a/script/utils/prepareNetwork.ts b/script/utils/prepareNetwork.ts index 96c00665..aeafd35c 100644 --- a/script/utils/prepareNetwork.ts +++ b/script/utils/prepareNetwork.ts @@ -5,6 +5,7 @@ import * as process from 'process' export enum NETWORK { ARBITRUM = 'arbitrum-one', + ARC = 'arc-mainnet', AVALANCHE = 'avalanche', BASE = 'base', BLAST = 'blast-mainnet', diff --git a/src/common/pricing.ts b/src/common/pricing.ts index 095a8e63..ca8b8220 100644 --- a/src/common/pricing.ts +++ b/src/common/pricing.ts @@ -13,6 +13,12 @@ import { import { ADDRESS_ZERO, ONE_BD, ZERO_BD } from './constants' export function getEthPriceInUSD(): BigDecimal { + // On chains where the reference token is itself a USD stablecoin (e.g. Arc, whose native gas + // token is USDC and which has no wrapped-native / reference-stable pair), the reference token's + // USD price is 1 by definition. Such chains opt in by including REFERENCE_TOKEN in STABLE_TOKEN_PAIRS. + if (STABLE_TOKEN_PAIRS.includes(REFERENCE_TOKEN)) { + return ONE_BD + } // create an array with same length as STABLE_TOKEN_PAIRS let stableTokenPairs = new Array(STABLE_TOKEN_PAIRS.length) let stableTokenReserves = new Array(STABLE_TOKEN_PAIRS.length) From 020e0434e9ac3188552dc768e296da99ccbb531c Mon Sep 17 00:00:00 2001 From: Robert Seitz Date: Wed, 3 Jun 2026 16:22:17 -0400 Subject: [PATCH 2/2] arc: whitelist WETH (0x128cC466B61f542da60c70e3aA11c10e19B84EDB) --- config/arc-mainnet/chain.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/arc-mainnet/chain.ts b/config/arc-mainnet/chain.ts index 26b14ea5..03104ab8 100644 --- a/config/arc-mainnet/chain.ts +++ b/config/arc-mainnet/chain.ts @@ -10,12 +10,13 @@ const USDC = '0x3600000000000000000000000000000000000000'.toLowerCase() const EURC = '0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a'.toLowerCase() const USYC = '0xe9185F0c5F296Ed1797AaE4238D26CCaBEadb86C'.toLowerCase() const CIRBTC = '0x171A4217b86A807A64eB94757Db6849fb4bDbAA0'.toLowerCase() // cirBTC (BTC-pegged) — whitelist only, not a USD stable +const WETH = '0x128cC466B61f542da60c70e3aA11c10e19B84EDB'.toLowerCase() // bridged ETH — whitelist only (not the native/reference; Arc's native is USDC) export const REFERENCE_TOKEN = USDC export const STABLE_TOKEN_PAIRS = [REFERENCE_TOKEN] // token where amounts should contribute to tracked volume and liquidity -export const WHITELIST: string[] = [USDC, EURC, USYC, CIRBTC] +export const WHITELIST: string[] = [USDC, EURC, USYC, CIRBTC, WETH] // USD-pegged stablecoins only (EURC is EUR-pegged, USYC is yield-bearing → excluded) export const STABLECOINS = [USDC]