Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.
Use Arc’s ERC-20 USDC interface exclusively for all pool accounting, token
addresses, and reserve math. The native interface (address.balance,
msg.value) uses 18 decimals and is for gas operations only; mixing it with the
6-decimal ERC-20 interface silently breaks constant-product calculations by a
factor of 1012. The following steps apply this principle and address
five other changes required before deploying to Arc.
Step 1. Set the pool token to the ERC-20 USDC address
Use 0x3600000000000000000000000000000000000000 as the USDC pair address in all
pool and router configuration.On other EVM blockchains, protocols use a WETH-style adapter contract to give
the native asset an ERC-20 interface. Arc’s native USDC already has a built-in
ERC-20 interface, so no adapter is needed. The address
0x3600000000000000000000000000000000000000 is that interface. It already
implements transfer, approve, and transferFrom over the native balance.
Do not pair native USDC against the ERC-20 USDC interface as two separate pool
tokens. Both interfaces draw from the same underlying balance, so pairing them
is equivalent to pairing an asset with itself. A pool configured this way is
immediately insolvent.
Two additional mistakes to avoid:
The zero address (0x0000000000000000000000000000000000000000) is not USDC.
Do not use it as a token address. Value-bearing transfers to it revert on Arc;
see
Value transfer rules.
Any address other than 0x3600000000000000000000000000000000000000 used to
represent USDC creates a separate, unrelated token that does not share the
native balance. Because Arc’s native USDC already exposes a full ERC-20
interface, there is no WETH-equivalent address to configure.
Update your pool factory, router configuration, and any initialization scripts
to reference 0x3600000000000000000000000000000000000000 directly.
Step 2. Account for the 10¹² decimal offset in offchain tooling
Arc’s native USDC has 18 decimals (address.balance, eth_getBalance,
msg.value) and the ERC-20 interface has 6 decimals (balanceOf, transfer).
The conversion factor between them is 1012.Pool contracts that follow the ERC-20 prescription do not encounter this offset:
deposits go through transferFrom, reserves are read from balanceOf, and
nonpayable functions block native USDC from entering pool logic. The offset
matters in offchain code: monitoring scripts, indexers, and SDK integrations
that read eth_getBalance or address.balance must convert to 6-decimal units
before comparing or displaying values.Use these constants in your offchain scripts and SDK integrations:
const OFFSET: bigint = 12n; // native USDC decimals (18) minus ERC-20 USDC decimals (6)// Normalize a value from eth_getBalance or address.balance to 6-decimal ERC-20 units// before displaying or comparing with ERC-20 amountsfunction toERC20Units(nativeAmount: bigint): bigint { return nativeAmount / 10n ** OFFSET;}
On most EVM blockchains, the native asset has no ERC-20 interface, so pools use
a wrapper contract (WETH, WMATIC, and so on) with deposit() and withdraw()
functions. On Arc, native USDC already has a built-in ERC-20 interface. Any
WETH-style wrap/unwrap code paths are unnecessary and create double-accounting
bugs by crediting balances twice.Replace the wrapped native address constant and remove all deposit() and
withdraw() call sites:
// Wrapped native token address on the source chainaddress constant WRAPPED_NATIVE = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // ERC-20 USDC address on Arcaddress constant USDC = 0x3600000000000000000000000000000000000000; // Wrap before interacting with the poolIWETH(WRAPPED_NATIVE).deposit{value: msg.value}(); IERC20(WRAPPED_NATIVE).approve(address(pool), msg.value); pool.swap(WRAPPED_NATIVE, tokenOut, msg.value, minAmountOut); // Use ERC-20 USDC directly; no wrapping neededIERC20(USDC).approve(address(pool), amount); pool.swap(USDC, tokenOut, amount, minAmountOut); // Unwrap after receiving wrapped native from the poolpool.removeLiquidity(WRAPPED_NATIVE, lpAmount, minAmountOut); IWETH(WRAPPED_NATIVE).withdraw(wethReceived); // Remove liquidity directly; no unwrapping neededpool.removeLiquidity(USDC, lpAmount, minAmountOut);
Internal-only wrapping that is not exposed to users (for example, an internal
accounting abstraction similar to what Chainlink uses) is acceptable.
Arc’s native USDC already exposes a full ERC-20 interface at
0x3600000000000000000000000000000000000000. Any user-facing wrapped USDC
contract is unnecessary and fragments liquidity.
Step 4. Audit allowance-dependent sweep and security logic
ERC-20 allowances control transfers initiated through transferFrom. They do
not gate direct native transfers. A contract holding an approve from a user
can still have its native USDC balance moved by a direct native send
(call{value: ...}) without any allowance check.Any sweep mechanism or authorization boundary that relies on ERC-20 allowance
limits to protect the contract’s native USDC balance is ineffective. Audit your
pool’s security logic for this pattern and apply one of the following
approaches:
Mark the contract nonpayable on functions that should not receive native
USDC, preventing accidental native deposits.
Add an explicit receive() function that either reverts or records the
incoming balance, so the contract behaves predictably on both the native and
ERC-20 paths.
Step 5. Replace onchain randomness and audit emergency-shutdown patterns
Two EVM opcodes behave differently on Arc and require review before deployment.
PREVRANDAO always returns 0 on Arc. Any protocol that uses
block.difficulty or prevrandao for randomness receives a constant value,
making lottery mechanics, shuffle algorithms, and similar constructs
predictable and exploitable. Replace these with a verifiable random function
(VRF) or oracle-based randomness. See Oracles for
available providers on Arc.
Emergency-shutdown and escape-hatch patterns that use SELFDESTRUCT also
require review. On Arc, a contract’s USDC balance is its native balance, so
SELFDESTRUCT transfers that USDC to the beneficiary address. On Ethereum, the
ERC-20 USDC balance lives in the token contract and is unaffected by
SELFDESTRUCT.
SELFDESTRUCT moves native USDC on Arc. Protocols with emergency-shutdown
patterns that call SELFDESTRUCT will transfer the contract’s entire USDC
balance to the beneficiary. Audit every code path that calls SELFDESTRUCT
and verify that the USDC transfer is intentional.
Step 6. Test against an Arc RPC endpoint, not a local Anvil fork
Local EVM simulators run a standard EVM and cannot reproduce the following
Arc-specific behaviors:
Native-coin precompile behavior
EIP-7708 Transfer events on native USDC movements
Blocklist enforcement on value transfers
Arc’s native USDC value transfer rules
Run all pool invariant math and value transfer tests against
https://rpc.testnet.arc.io (chain ID 5042002). For a complete porting
walkthrough covering contract deployment and verification, see
Porting contracts to Arc.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Arc Docs","description":"Documentation for Arc, Circle's purpose-built blockchain for stablecoin-native financial applications.","colors":{"primary":"#3E74BB","light":"#ACC6E9","dark":"#ACC6E9"},"logo":{"light":"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/logo/ARC_Doc_FC.svg?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=6d67e0bee7674d1506373511501be1cd","dark":"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/logo/ARC_Doc_WHT.svg?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=9dcbd3e55a573935fd32d7396c2396dd"},"favicon":"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/favicon.ico?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=789e04a512ddc7c8a9d8a943e8d39c42","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://faucet.circle.com","label":"Faucet"},{"href":"https://explorer.arc.io","label":"Block explorer"}]},"footer":{"socials":{"x":"https://x.com/arc","discord":"https://discord.com/invite/buildonarc"},"links":[{"header":"Links","items":[{"label":"Network status","href":"https://status.arc.io"},{"label":"Blog","href":"https://arc.io/blog"},{"label":"Community","href":"https://arc.io/community"},{"label":"Arc homepage","href":"https://arc.io"}]},{"header":"Resources","items":[{"label":"Terms of service","href":"https://docs.arc.io/terms"},{"label":"Privacy policy","href":"https://www.circle.com/en/legal/privacy-policy"},{"label":"Cookie policy","href":"https://www.circle.com/en/legal/cookie-policy"},{"label":"llms.txt","href":"https://docs.arc.io/llms.txt"}]}]},"seo":{"metatags":{"og:image":"https://docs.arc.io/arc-docs.jpg","twitter:image":"https://docs.arc.io/arc-docs.jpg","canonical":"https://docs.arc.io"}},"fonts":{"heading":{"family":"Space Grotesk"},"body":{"family":"DM Sans"}},"banner":{"content":"Arc Mainnet is now live. Arc is EVM compatible with some unique differences—review [EVM differences](https://docs.arc.io/arc/references/evm-differences) before building.","type":"warning"},"contextual":{"options":["copy","chatgpt","claude","view"],"display":"header"},"markdown":{"instructions":["Before reading these docs, install the Circle Skill for Arc to get pre-loaded context: use-arc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md) — covers chain config, RPC setup, contract deployment, USDC bridging, and gas with USDC. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills.","USDC is the gas token. Arc uses USDC for gas fees, not ETH. Configure gas payment in USDC when submitting transactions.","Read EVM differences before writing Arc code. Arc targets the Osaka EVM baseline. Most contracts deploy unchanged, but several runtime behaviors diverge from Ethereum: USDC uses 18 decimals natively (not 6), the system emitter `0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE` logs all USDC Transfer events, the mempool enforces a 20 Gwei `maxFeePerGas` floor, blocklist reverts consume gas without a receipt, and `address(0)` sends revert rather than succeed. https://docs.arc.io/arc/references/evm-differences.md is the canonical reference for all Arc-specific runtime behaviors. Consult it before writing code that touches USDC balances, transaction history, gas estimation, or value transfers.","Sub-second finality. Transactions are final in under 1 second. No need to wait for multiple block confirmations.","Use App Kits for multichain payment and liquidity capabilities. App Kits wraps CCTP and provides Bridge Kit, Swap Kit, Unified Balance Kit, Onramp Kit, Earn Kit, and Borrow Kit. Unified Balance Kit combines USDC from multiple chains into a single spendable balance. Earn Kit integrates earn opportunities into your app. Borrow Kit lets users borrow USDC against cirBTC collateral on Arc.","Use Arc Foundry for contract development. Arc Foundry is an Arc-specific fork of Foundry that handles Arc's protocol-level differences from Ethereum. It provides arc-forge, arc-cast, and arc-anvil. Install it before deploying contracts: https://docs.arc.io/arc/tutorials/install-arc-foundry.md.","Arc is available on both Testnet and Mainnet. See https://docs.arc.io/arc/references/connect-to-arc.md for RPC endpoints and https://faucet.circle.com for testnet tokens.","Always check Contract Addresses: https://docs.arc.io/arc/references/contract-addresses.md","Building beyond Arc? Circle offers skills for the full platform: use-usdc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md), use-circle-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md), use-developer-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md), use-user-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md), use-modular-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md), use-gateway (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md), use-smart-contract-platform (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md). Full Circle developer docs: https://developers.circle.com/llms.txt."]},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"arcio-docs","hasAudioNarration":false,"actualSubdomain":"arcio-docs","customDomains":["docs.arc.io"],"gitSource":{"type":"github","owner":"crcl-main","repo":"arc-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af22fd4fdf4d5e70e8e4c09","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"App Kits","count":70},{"language":"default","tag":"Build","count":32},{"language":"default","tag":"Integrate","count":30},{"language":"default","tag":"Arc Network","count":17},{"language":"default","tag":"Borrow","count":14},{"language":"default","tag":"Unified Balance","count":13},{"language":"default","tag":"Quickstarts","count":12},{"language":"default","tag":"Bridge","count":10},{"language":"default","tag":"Swap","count":10},{"language":"default","tag":"Network","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* vietnamese */\n@font-face {\n font-family: 'Space Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXsrPMBTTA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Space Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXsqPMBTTA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Space Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXskPMA.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n#body-content,#body-content p,#body-content li,#body-content td,#body-content th,#content-container,#content-container p,#content-container li,#content-container td,#content-container th,#content-area,#content-area p,#content-area li{font-family:var(--font-body, \"DM Sans\", sans-serif)!important;font-weight:400!important;font-style:normal!important;font-size:1rem!important;line-height:1.5!important;letter-spacing:0!important;vertical-align:middle!important}.dark #body-content,.dark #body-content p,.dark #body-content li,.dark #body-content td,.dark #body-content th,.dark #content-container,.dark #content-container p,.dark #content-container li,.dark #content-container td,.dark #content-container th,.dark #content-area,.dark #content-area p,.dark #content-area li{color:#F5F5F8!important}.code-block pre,.code-block code,#body-content pre,#body-content code,#content-container pre,#content-container code,#content-area pre,#content-area code{font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace!important;font-size:revert!important;line-height:revert!important;font-weight:revert!important;font-style:revert!important;letter-spacing:normal!important;vertical-align:baseline!important}#body-content h1,#content-container h1,#content-area h1{font-family:\"Space Grotesk\", sans-serif!important;font-weight:500!important}#body-content h2,#body-content h3,#body-content h4,#body-content h5,#body-content h6,#content-container h2,#content-container h3,#content-container h4,#content-container h5,#content-container h6,#content-area h2,#content-area h3,#content-area h4,#content-area h5,#content-area h6{font-family:var(--font-heading, \"DM Sans\", sans-serif)!important;font-weight:500!important}.dark #body-content h1,.dark #body-content h2,.dark #body-content h3,.dark #body-content h4,.dark #body-content h5,.dark #body-content h6,.dark #content-container h1,.dark #content-container h2,.dark #content-container h3,.dark #content-container h4,.dark #content-container h5,.dark #content-container h6,.dark #content-area h1,.dark #content-area h2,.dark #content-area h3,.dark #content-area h4,.dark #content-area h5,.dark #content-area h6{color:#FFFFFF!important}html.dark,html.dark body,body.dark,[data-theme=\"dark\"],[data-theme=\"dark\"] body{background:linear-gradient(180deg, #0D1B2F 0%, #0D1B2F 60%, #19354D 100%)!important;background-attachment:fixed}.dark #sidebar,.dark .sidebar,html.dark #sidebar,html.dark .sidebar,[data-theme=\"dark\"] #sidebar,[data-theme=\"dark\"] .sidebar{background:transparent!important}#sidebar-content .sticky.top-0,.dark #sidebar-content .sticky.top-0,html.dark #sidebar-content .sticky.top-0,[data-theme=\"dark\"] #sidebar-content .sticky.top-0{background:transparent!important;background-image:none!important}.build_ai_app_container .banner_div{background:linear-gradient(\n 332.46deg,\n rgba(144, 158, 158, 0.5) -12.26%,\n rgba(224, 162, 92, 0.5) 3.61%,\n rgba(220, 162, 96, 0.5) 30.33%,\n rgba(177, 166, 139, 0.5) 49.27%,\n rgba(151, 159, 155, 0.5) 74.49%,\n rgba(133, 152, 158, 0.5) 96.19%\n )}.dark .build_ai_app_container .banner_div,.dark .usecase_card .image_div{background:#0D1B2F}.build_ai_app_container a,a.get_started_btn{border-bottom:none!important}#content-area a[href^=\"https://origin.arc.io\"]{border-bottom:none!important}.banner_card span{display:block;line-height:1.5}.usecase_card .image_div{background:linear-gradient(\n 304.23deg,\n rgba(144, 158, 158, 0.5) 0.23%,\n rgba(224, 162, 92, 0.5) 15.13%,\n rgba(177, 166, 139, 0.5) 39.96%,\n rgba(151, 159, 155, 0.5) 71.24%,\n rgba(133, 152, 158, 0.5) 102.03%\n )}.dark .card{background:#1F2F44!important;border-color:rgba(255, 255, 255, 0.1)!important}.dark .card:hover{border-color:#ACC6E9!important}.dark .card svg:not(#card-link-arrow-icon svg):not(.second_path),.dark .card svg path:not(#card-link-arrow-icon svg path):not(.second_path),.dark .card h2{color:#ACC6E9!important;fill:#ACC6E9!important;stroke:#ACC6E9!important}.dark #content-area [class*=\"mint-bg-white\"],.dark #content [class*=\"mint-bg-white\"]{background-color:#1F2F44!important}.dark #content-area [class*=\"mint-bg-white\"][class*=\"mint-border\"],.dark #content [class*=\"mint-bg-white\"][class*=\"mint-border\"]{border-color:rgba(255, 255, 255, 0.1)!important}.dark #content-area [class*=\"mint-bg-white\"]:hover,.dark #content [class*=\"mint-bg-white\"]:hover{border-color:#ACC6E9!important}.dark #content-area [class*=\"mint-bg-gray-50\"],.dark #content [class*=\"mint-bg-gray-50\"]{background-color:#1F2F44!important}.dark #content-area [class*=\"mint-bg-gray-50\"][class*=\"mint-border\"],.dark #content [class*=\"mint-bg-gray-50\"][class*=\"mint-border\"]{border-color:rgba(255, 255, 255, 0.1)!important}.dark #content-area [class*=\"mint-bg-gray-50\"]:hover,.dark #content [class*=\"mint-bg-gray-50\"]:hover{background-color:rgba(95, 191, 255, 0.1)!important;border-color:#ACC6E9!important}.dark #page-context-menu *,.dark div[data-radix-popper-content-wrapper] *,.dark .card,.dark .accordion,.dark .accordion-group,.dark .code-block>:nth-child(2),.dark .code-block>:nth-child(3),.dark div[role=\"tabpanel\"]:has(>div[data-component-part=\"code-block-root\"])>:first-child{background:#1F2F44!important}.dark .accordion>:first-child:hover,.dark .accordion>:first-child:focus-visible{background:rgba(95, 191, 255, 0.15)!important}.dark .accordion-group{border-color:rgba(255, 255, 255, 0.1)!important}.dark .accordion-group details{border-color:rgba(255, 255, 255, 0.1)!important}.dark #search-bar-entry,.dark #assistant-entry,.dark #chat-assistant-sheet,.dark #mobile-nav,.dark div:has(>div>#chat-assistant-textarea),.dark .nav-anchor>div:has(>svg){background:#0D1B2F!important}.dark div[id^=\"headlessui-dialog-panel\"],.dark div[id^=\"headlessui-dialog-panel\"]>*,.dark div[id^=\"headlessui-dialog-panel\"] [class*=\"bg-background\"]{background:#0D1B2F!important}.dark .chat-assistant-floating-input::before{background:transparent!important}::-webkit-scrollbar{display:none}html{scrollbar-width:none}.dark #navbar>* :not(#banner):not(.nav-tabs-item[data-active]>div):not(.nav-tabs-item:hover>div){background:transparent!important}:focus-visible{outline:2px solid #3E74BB!important;outline-offset:2px!important}.dark :focus-visible{outline:2px solid #ACC6E9!important;outline-offset:2px!important}html:not(.dark) #navigation-items a[class*=\"bg-primary\"]{color:#3669AE!important}#navigation-items a:not([class*=\"bg-primary\"]){color:#6b6580!important}.dark #navigation-items a:not([class*=\"bg-primary\"]){color:#C7C5D1!important}#navbar nav a,#navbar a.nav-tabs-item{color:#6b6580!important}.dark #navbar nav a,.dark #navbar a.nav-tabs-item{color:#C7C5D1!important}#search-bar-entry{color:#6b6580!important}.dark #search-bar-entry{color:#C7C5D1!important}#table-of-contents a{color:#6b6580!important}.dark #table-of-contents a{color:#C7C5D1!important}#content-area .mint-text-center>div[class*=\"mint-justify-center\"]{display:none!important}#content-area h1[class*=\"mint-text-\"]{font-size:3rem!important;line-height:3rem!important;font-weight:100!important}#content-area h2[class*=\"mint-text-\"]{font-size:1.5rem!important;line-height:1.75rem!important;font-weight:300!important}[data-testid^=\"mode-switch\"]{color:#4b5563!important}.dark [data-testid^=\"mode-switch\"]{color:#A7A3B5!important}.dark .callout[data-callout-type=\"note\"]{background:#1894E84D!important;border-color:#88B0E6!important}.dark .callout[data-callout-type=\"note\"]>div{color:#FFFFFF!important}.dark .callout[data-callout-type=\"note\"] svg{color:#88B0E6!important}.dark .callout[data-callout-type=\"tip\"],.dark .callout[data-callout-type=\"check\"]{background:#62E2A433!important;border-color:#8DD89F!important}.dark .callout[data-callout-type=\"tip\"] svg,.dark .callout[data-callout-type=\"check\"] svg{color:#8DD89F!important}.dark .callout[data-callout-type=\"warning\"]{background:#FED74D33!important;border-color:#FFE27C!important}.dark .callout[data-callout-type=\"warning\"] svg{color:#FFE27C!important}.dark .callout[data-callout-type=\"caution\"],.dark .callout[data-callout-type=\"danger\"]{background:#D42C3D4D!important;border-color:#E86D7A!important}.dark .callout[data-callout-type=\"caution\"] svg,.dark .callout[data-callout-type=\"danger\"] svg{color:#E86D7A!important}#footer a[class*=\"text-gray-950\"],#footer a[class*=\"text-white\"],#footer a[class*=\"text-gray-400\"],#footer a[class*=\"text-gray-500\"]{color:#6b6580!important}.dark #footer a[class*=\"text-gray-950\"],.dark #footer a[class*=\"text-white\"],.dark #footer a[class*=\"text-gray-400\"],.dark #footer a[class*=\"text-gray-500\"]{color:#C7C5D1!important}#footer svg[style*=\"mask-image\"],#footer svg.bg-gray-500,#footer svg.bg-gray-600{background-color:#6b6580!important}#footer a:hover svg[style*=\"mask-image\"],#footer a:hover svg.bg-gray-500,#footer a:hover svg.bg-gray-600{background-color:#4a4560!important}.dark #footer svg[style*=\"mask-image\"],.dark #footer svg.bg-gray-500,.dark #footer svg.bg-gray-600{background-color:#C7C5D1!important}.dark #footer a:hover svg[style*=\"mask-image\"],.dark #footer a:hover svg.bg-gray-500,.dark #footer a:hover svg.bg-gray-600{background-color:#e5e4ed!important}#footer>div>div:has(a[href*=\"mintlify\"]){display:none!important}.cw-card{background:#f5f7fa;border:1px solid rgba(0, 0, 0, 0.08)}.dark .cw-card{background:#1F2F44;border-color:rgba(255, 255, 255, 0.1)}.cw-btn-primary{background:#3E74BB;color:#ffffff;transition:background 0.15s ease}.cw-btn-primary:hover{background:#34649f}.dark .cw-btn-primary{color:#F5F5F8}.dark .cw-btn-primary:hover{background:#4a82cc}.cw-btn-primary:disabled{opacity:0.6;cursor:not-allowed}.cw-text-accent{color:#3E74BB}.dark .cw-text-accent{color:#ACC6E9}.cw-text-body{color:#1a1a2e}.dark .cw-text-body{color:#F5F5F8}.cw-text-subtle{color:#6b6580}.dark .cw-text-subtle{color:#C7C5D1}.cw-badge-connected{background:rgba(34, 197, 94, 0.1);color:#16a34a}.dark .cw-badge-connected{background:rgba(98, 226, 164, 0.2);color:#8DD89F}.cw-icon{color:#3E74BB}.dark .cw-icon{color:#ACC6E9}.cw-error{color:#dc2626}.dark .cw-error{color:#E86D7A}.cw-wallet-option{background:rgba(0, 0, 0, 0.03)}.cw-wallet-option:hover{background:rgba(0, 0, 0, 0.07)}.dark .cw-wallet-option{background:rgba(255, 255, 255, 0.05)}.dark .cw-wallet-option:hover{background:rgba(255, 255, 255, 0.1)}.cw-wallet-icon-fallback{background:rgba(62, 116, 187, 0.1)}.dark .cw-wallet-icon-fallback{background:rgba(172, 198, 233, 0.15)}#arc-faucet-modal{position:fixed;z-index:9999;opacity:0;transform:translateY(-8px);transition:opacity 180ms ease-in-out, transform 180ms ease-in-out;pointer-events:none}#arc-faucet-modal.arc-faucet-modal-visible{opacity:1;transform:translateY(0);pointer-events:auto}#arc-faucet-modal[hidden]{display:none!important}.arc-faucet-dialog{position:relative;width:100%;height:100%;background:#ffffff;border:1px solid rgba(13, 27, 47, 0.08);border-radius:12px;box-shadow:0 16px 40px rgba(8, 14, 26, 0.18),\n 0 4px 12px rgba(8, 14, 26, 0.10);overflow:hidden;outline:none;display:flex;flex-direction:column}.dark .arc-faucet-dialog,[data-theme=\"dark\"] .arc-faucet-dialog,html.dark .arc-faucet-dialog{background:#0d1b2f;border-color:rgba(255, 255, 255, 0.08);box-shadow:0 16px 40px rgba(0, 0, 0, 0.5),\n 0 4px 12px rgba(0, 0, 0, 0.3)}.arc-faucet-close{position:absolute;top:10px;right:10px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:50%;background:rgba(13, 27, 47, 0.06);color:#0d1b2f;cursor:pointer;transition:background 120ms ease-in-out}.arc-faucet-close:hover{background:rgba(13, 27, 47, 0.12)}.dark .arc-faucet-close,[data-theme=\"dark\"] .arc-faucet-close,html.dark .arc-faucet-close{background:rgba(255, 255, 255, 0.08);color:#f5f5f8}.dark .arc-faucet-close:hover,[data-theme=\"dark\"] .arc-faucet-close:hover,html.dark .arc-faucet-close:hover{background:rgba(255, 255, 255, 0.16)}.arc-faucet-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--font-body, \"DM Sans\", sans-serif);font-size:0.875rem;color:#6b6580}.dark .arc-faucet-loading,[data-theme=\"dark\"] .arc-faucet-loading,html.dark .arc-faucet-loading{color:#c7c5d1}.arc-faucet-iframe{flex:1 1 auto;width:100%;height:100%;border:0;background:transparent}.arc-faucet-picker{display:none;flex:1 1 auto;flex-direction:column;padding:14px;padding-top:44px;overflow:hidden}.arc-faucet-dialog[data-view=\"picker\"] .arc-faucet-iframe{display:none}.arc-faucet-dialog[data-view=\"picker\"] .arc-faucet-loading{display:none}.arc-faucet-dialog[data-view=\"picker\"] .arc-faucet-picker{display:flex}.arc-faucet-picker-header{display:flex;align-items:center;gap:10px;margin-bottom:12px}.arc-faucet-picker-back{background:transparent;border:0;padding:4px 8px;margin-left:-8px;font-size:0.875rem;color:#6b6580;cursor:pointer;border-radius:6px}.arc-faucet-picker-back:hover{background:rgba(13, 27, 47, 0.06)}.dark .arc-faucet-picker-back,[data-theme=\"dark\"] .arc-faucet-picker-back,html.dark .arc-faucet-picker-back{color:#c7c5d1}.dark .arc-faucet-picker-back:hover,[data-theme=\"dark\"] .arc-faucet-picker-back:hover,html.dark .arc-faucet-picker-back:hover{background:rgba(255, 255, 255, 0.08)}.arc-faucet-picker-title{font-family:var(--font-body, \"DM Sans\", sans-serif);font-size:0.9375rem;font-weight:600;color:#0d1b2f}.dark .arc-faucet-picker-title,[data-theme=\"dark\"] .arc-faucet-picker-title,html.dark .arc-faucet-picker-title{color:#f5f5f8}.arc-faucet-picker-list{display:flex;flex-direction:column;gap:4px;overflow-y:auto}.arc-faucet-picker-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;background:transparent;border:0;cursor:pointer;text-align:left;font:inherit;color:#0d1b2f;transition:background 120ms ease-in-out}.arc-faucet-picker-option:hover,.arc-faucet-picker-option:focus-visible{background:rgba(13, 27, 47, 0.06)}.arc-faucet-picker-option:disabled{opacity:0.5;cursor:default}.arc-faucet-picker-option img{width:28px;height:28px;border-radius:6px}.dark .arc-faucet-picker-option,[data-theme=\"dark\"] .arc-faucet-picker-option,html.dark .arc-faucet-picker-option{color:#f5f5f8}.dark .arc-faucet-picker-option:hover,.dark .arc-faucet-picker-option:focus-visible,[data-theme=\"dark\"] .arc-faucet-picker-option:hover,[data-theme=\"dark\"] .arc-faucet-picker-option:focus-visible,html.dark .arc-faucet-picker-option:hover,html.dark .arc-faucet-picker-option:focus-visible{background:rgba(255, 255, 255, 0.08)}.arc-faucet-picker-error,.arc-faucet-picker-empty{font-family:var(--font-body, \"DM Sans\", sans-serif);font-size:0.8125rem;margin:8px 0 0}.arc-faucet-picker-error{color:#c5462d}.arc-faucet-picker-empty{color:#6b6580}.arc-faucet-picker-empty a{color:inherit;text-decoration:underline}.dark .arc-faucet-picker-error,[data-theme=\"dark\"] .arc-faucet-picker-error,html.dark .arc-faucet-picker-error{color:#ff8c70}.dark .arc-faucet-picker-empty,[data-theme=\"dark\"] .arc-faucet-picker-empty,html.dark .arc-faucet-picker-empty{color:#c7c5d1}@media (max-width: 520px){#arc-faucet-modal{top:auto!important;bottom:0;left:0;right:0!important;transform:translateY(100%)}#arc-faucet-modal.arc-faucet-modal-visible{transform:translateY(0)}.arc-faucet-dialog{border-radius:16px 16px 0 0;width:100%;height:min(85vh, 540px)}.arc-faucet-dialog::before{content:\"\";display:block;flex:0 0 auto;width:36px;height:4px;background:rgba(13, 27, 47, 0.18);border-radius:2px;margin:8px auto 4px}.dark .arc-faucet-dialog::before,[data-theme=\"dark\"] .arc-faucet-dialog::before,html.dark .arc-faucet-dialog::before{background:rgba(255, 255, 255, 0.24)}.arc-faucet-picker{padding-top:12px}}.cw-picker-row:hover,.cw-picker-row:focus-visible{background:rgba(13, 27, 47, 0.06)}.dark .cw-picker-row:hover,.dark .cw-picker-row:focus-visible{background:rgba(255, 255, 255, 0.08)}.node-fee-manager rect{fill:#e8f5e9!important;stroke:#2e7d32!important}.dark .node-fee-manager rect{fill:#032b06!important}.node-module-calls rect{fill:#f5f5f5!important;stroke:#999!important;stroke-dasharray:5 5!important}.dark .node-module-calls rect{fill:#4d4d4d!important}.node-submit rect{fill:#f5f5f5!important;stroke:#333!important}.dark .node-submit rect{fill:#4d4d4d!important}.node-finalized rect{fill:#e8f5e9!important;stroke:#2e7d32!important}.dark .node-finalized rect{fill:#032b06!important}html[data-current-path=\"/\"] .nav-tabs-item[data-active]>div{background:transparent!important}html[data-current-path=\"/\"] .nav-tabs-item[data-active]:hover>div{background:#e5e7eb!important}html.dark[data-current-path=\"/\"] .nav-tabs-item[data-active]:hover>div{background:#374151!important}html[data-current-path=\"/\"] #navbar a.nav-tabs-item[data-active]{text-shadow:none!important}#your-privacy-choices-button{position:relative;align-self:start;font-size:0.875rem!important;font-family:inherit}#your-privacy-choices-button::after{content:url(\"https://6778953.fs1.hubspotusercontent-na1.net/hubfs/6778953/legal/opt-out-30x14.svg\");right:-34px;position:absolute}"}],"page":{"pagePath":"integrate/defi/amm-and-pools","slug":"/integrate/defi/amm-and-pools","pageMetadata":{"title":"How-to: Port an AMM or liquidity pool to Arc","description":"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.","sidebarTitle":"Port an AMM or liquidity pool","href":"/integrate/defi/amm-and-pools"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Use Arc’s ERC-20 USDC interface exclusively for all pool accounting, token\naddresses, and reserve math. The native interface (`,_jsx(_components.code,{children:`address.balance`}),`,\n`,_jsx(_components.code,{children:`msg.value`}),`) uses 18 decimals and is for gas operations only; mixing it with the\n6-decimal ERC-20 interface silently breaks constant-product calculations by a\nfactor of 10`,_jsx(`sup`,{children:`12`}),`. The following steps apply this principle and address\nfive other changes required before deploying to Arc.`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before you begin, ensure that you’ve:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Read the `,_jsx(_components.a,{href:`/arc/concepts/stablecoin-native-model`,children:`stablecoin-native model`}),`\nconcept page to understand Arc’s dual USDC interface`]}),`\n`,_jsxs(_components.li,{children:[`Reviewed the `,_jsx(_components.a,{href:`/arc/references/evm-differences`,children:`EVM differences reference`}),` for\na complete list of protocol divergences`]}),`\n`,_jsxs(_components.li,{children:[`Obtained Arc testnet RPC access at `,_jsx(_components.code,{children:`https://rpc.testnet.arc.io`}),` (chain ID\n`,_jsx(_components.code,{children:`5042002`}),`)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`steps`,children:`Steps`}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-set-the-pool-token-to-the-erc-20-usdc-address`,children:`Step 1. Set the pool token to the ERC-20 USDC address`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`0x3600000000000000000000000000000000000000`}),` as the USDC pair address in all\npool and router configuration.`]}),`\n`,_jsxs(_components.p,{children:[`On other EVM blockchains, protocols use a WETH-style adapter contract to give\nthe native asset an ERC-20 interface. Arc’s native USDC already has a built-in\nERC-20 interface, so no adapter is needed. The address\n`,_jsx(_components.code,{children:`0x3600000000000000000000000000000000000000`}),` is that interface. It already\nimplements `,_jsx(_components.code,{children:`transfer`}),`, `,_jsx(_components.code,{children:`approve`}),`, and `,_jsx(_components.code,{children:`transferFrom`}),` over the native balance.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Do not pair native USDC against the ERC-20 USDC interface as two separate pool\ntokens. Both interfaces draw from the same underlying balance, so pairing them\nis equivalent to pairing an asset with itself. A pool configured this way is\nimmediately insolvent.`})}),`\n`,_jsx(_components.p,{children:`Two additional mistakes to avoid:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The zero address (`,_jsx(_components.code,{children:`0x0000000000000000000000000000000000000000`}),`) is not USDC.\nDo not use it as a token address. Value-bearing transfers to it revert on Arc;\nsee\n`,_jsx(_components.a,{href:`/arc/references/evm-differences#value-transfer-rules`,children:`Value transfer rules`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Any address other than `,_jsx(_components.code,{children:`0x3600000000000000000000000000000000000000`}),` used to\nrepresent USDC creates a separate, unrelated token that does not share the\nnative balance. Because Arc’s native USDC already exposes a full ERC-20\ninterface, there is no WETH-equivalent address to configure.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Update your pool factory, router configuration, and any initialization scripts\nto reference `,_jsx(_components.code,{children:`0x3600000000000000000000000000000000000000`}),` directly.`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-account-for-the-10¹²-decimal-offset-in-offchain-tooling`,children:`Step 2. Account for the 10¹² decimal offset in offchain tooling`}),`\n`,_jsxs(_components.p,{children:[`Arc’s native USDC has 18 decimals (`,_jsx(_components.code,{children:`address.balance`}),`, `,_jsx(_components.code,{children:`eth_getBalance`}),`,\n`,_jsx(_components.code,{children:`msg.value`}),`) and the ERC-20 interface has 6 decimals (`,_jsx(_components.code,{children:`balanceOf`}),`, `,_jsx(_components.code,{children:`transfer`}),`).\nThe conversion factor between them is 10`,_jsx(`sup`,{children:`12`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Pool contracts that follow the ERC-20 prescription do not encounter this offset:\ndeposits go through `,_jsx(_components.code,{children:`transferFrom`}),`, reserves are read from `,_jsx(_components.code,{children:`balanceOf`}),`, and\n`,_jsx(_components.code,{children:`nonpayable`}),` functions block native USDC from entering pool logic. The offset\nmatters in offchain code: monitoring scripts, indexers, and SDK integrations\nthat read `,_jsx(_components.code,{children:`eth_getBalance`}),` or `,_jsx(_components.code,{children:`address.balance`}),` must convert to 6-decimal units\nbefore comparing or displaying values.`]}),`\n`,_jsx(_components.p,{children:`Use these constants in your offchain scripts and SDK integrations:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` OFFSET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` bigint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 12`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`n`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// native USDC decimals (18) minus ERC-20 USDC decimals (6)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Normalize a value from eth_getBalance or address.balance to 6-decimal ERC-20 units`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// before displaying or comparing with ERC-20 amounts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` toERC20Units`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`nativeAmount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` bigint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` bigint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` nativeAmount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`n`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` **`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` OFFSET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-3-remove-weth-style-wrap/unwrap-code-paths`,children:`Step 3. Remove WETH-style wrap/unwrap code paths`}),`\n`,_jsxs(_components.p,{children:[`On most EVM blockchains, the native asset has no ERC-20 interface, so pools use\na wrapper contract (WETH, WMATIC, and so on) with `,_jsx(_components.code,{children:`deposit()`}),` and `,_jsx(_components.code,{children:`withdraw()`}),`\nfunctions. On Arc, native USDC already has a built-in ERC-20 interface. Any\nWETH-style wrap/unwrap code paths are unnecessary and create double-accounting\nbugs by crediting balances twice.`]}),`\n`,_jsxs(_components.p,{children:[`Replace the wrapped native address constant and remove all `,_jsx(_components.code,{children:`deposit()`}),` and\n`,_jsx(_components.code,{children:`withdraw()`}),` call sites:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`solidity`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus has-diff`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`solidity`,children:_jsxs(_components.code,{language:`solidity`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line line-diff line-remove`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Wrapped native token address on the source chain`})}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`address`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` constant`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WRAPPED_NATIVE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `})]}),`\n`,_jsx(_components.span,{className:`line line-diff line-add`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ERC-20 USDC address on Arc`})}),`\n`,_jsxs(_components.span,{className:`line line-diff line-add`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`address`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` constant`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` USDC `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0x3600000000000000000000000000000000000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line line-diff line-remove`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Wrap before interacting with the pool`})}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IWETH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(WRAPPED_NATIVE).deposit{value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.value}(); `})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IERC20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(WRAPPED_NATIVE).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`approve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(pool), `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.value); `})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pool.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(WRAPPED_NATIVE, tokenOut, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.value, minAmountOut); `})]}),`\n`,_jsx(_components.span,{className:`line line-diff line-add`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Use ERC-20 USDC directly; no wrapping needed`})}),`\n`,_jsxs(_components.span,{className:`line line-diff line-add`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IERC20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(USDC).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`approve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(pool), amount); `})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-add`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pool.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(USDC, tokenOut, amount, minAmountOut); `})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line line-diff line-remove`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Unwrap after receiving wrapped native from the pool`})}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pool.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`removeLiquidity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(WRAPPED_NATIVE, lpAmount, minAmountOut); `})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IWETH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(WRAPPED_NATIVE).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`withdraw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(wethReceived); `})]}),`\n`,_jsx(_components.span,{className:`line line-diff line-add`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Remove liquidity directly; no unwrapping needed`})}),`\n`,_jsxs(_components.span,{className:`line line-diff line-add`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pool.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`removeLiquidity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(USDC, lpAmount, minAmountOut); `})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Internal-only wrapping that is not exposed to users (for example, an internal\naccounting abstraction similar to what Chainlink uses) is acceptable.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Arc’s native USDC already exposes a full ERC-20 interface at\n`,_jsx(_components.code,{children:`0x3600000000000000000000000000000000000000`}),`. Any user-facing wrapped USDC\ncontract is unnecessary and fragments liquidity.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`step-4-audit-allowance-dependent-sweep-and-security-logic`,children:`Step 4. Audit allowance-dependent sweep and security logic`}),`\n`,_jsxs(_components.p,{children:[`ERC-20 allowances control transfers initiated through `,_jsx(_components.code,{children:`transferFrom`}),`. They do\nnot gate direct native transfers. A contract holding an `,_jsx(_components.code,{children:`approve`}),` from a user\ncan still have its native USDC balance moved by a direct native send\n(`,_jsx(_components.code,{children:`call{value: ...}`}),`) without any allowance check.`]}),`\n`,_jsx(_components.p,{children:`Any sweep mechanism or authorization boundary that relies on ERC-20 allowance\nlimits to protect the contract’s native USDC balance is ineffective. Audit your\npool’s security logic for this pattern and apply one of the following\napproaches:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Mark the contract `,_jsx(_components.code,{children:`nonpayable`}),` on functions that should not receive native\nUSDC, preventing accidental native deposits.`]}),`\n`,_jsxs(_components.li,{children:[`Add an explicit `,_jsx(_components.code,{children:`receive()`}),` function that either reverts or records the\nincoming balance, so the contract behaves predictably on both the native and\nERC-20 paths.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-5-replace-onchain-randomness-and-audit-emergency-shutdown-patterns`,children:`Step 5. Replace onchain randomness and audit emergency-shutdown patterns`}),`\n`,_jsx(_components.p,{children:`Two EVM opcodes behave differently on Arc and require review before deployment.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`PREVRANDAO always returns `,_jsx(_components.code,{children:`0`}),` on Arc.`]}),` Any protocol that uses\n`,_jsx(_components.code,{children:`block.difficulty`}),` or `,_jsx(_components.code,{children:`prevrandao`}),` for randomness receives a constant value,\nmaking lottery mechanics, shuffle algorithms, and similar constructs\npredictable and exploitable. Replace these with a verifiable random function\n(VRF) or oracle-based randomness. See `,_jsx(_components.a,{href:`/arc/tools/oracles`,children:`Oracles`}),` for\navailable providers on Arc.`]})}),`\n`,_jsxs(_components.p,{children:[`Emergency-shutdown and escape-hatch patterns that use `,_jsx(_components.code,{children:`SELFDESTRUCT`}),` also\nrequire review. On Arc, a contract’s USDC balance is its native balance, so\n`,_jsx(_components.code,{children:`SELFDESTRUCT`}),` transfers that USDC to the beneficiary address. On Ethereum, the\nERC-20 USDC balance lives in the token contract and is unaffected by\n`,_jsx(_components.code,{children:`SELFDESTRUCT`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`SELFDESTRUCT`}),` moves native USDC on Arc.`]}),` Protocols with emergency-shutdown\npatterns that call `,_jsx(_components.code,{children:`SELFDESTRUCT`}),` will transfer the contract’s entire USDC\nbalance to the beneficiary. Audit every code path that calls `,_jsx(_components.code,{children:`SELFDESTRUCT`}),`\nand verify that the USDC transfer is intentional.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`step-6-test-against-an-arc-rpc-endpoint-not-a-local-anvil-fork`,children:`Step 6. Test against an Arc RPC endpoint, not a local Anvil fork`}),`\n`,_jsx(_components.p,{children:`Local EVM simulators run a standard EVM and cannot reproduce the following\nArc-specific behaviors:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Native-coin precompile behavior`}),`\n`,_jsx(_components.li,{children:`EIP-7708 Transfer events on native USDC movements`}),`\n`,_jsx(_components.li,{children:`Blocklist enforcement on value transfers`}),`\n`,_jsx(_components.li,{children:`Arc’s native USDC value transfer rules`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Run all pool invariant math and value transfer tests against\n`,_jsx(_components.code,{children:`https://rpc.testnet.arc.io`}),` (chain ID `,_jsx(_components.code,{children:`5042002`}),`). For a complete porting\nwalkthrough covering contract deployment and verification, see\n`,_jsx(_components.a,{href:`/arc/tutorials/porting-contracts-to-arc`,children:`Porting contracts to Arc`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How-to: Port an AMM or liquidity pool to Arc","description":"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.","sidebarTitle":"Port an AMM or liquidity pool","href":"/integrate/defi/amm-and-pools"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Steps","slug":"steps","depth":2,"children":[{"title":"Step 1. Set the pool token to the ERC-20 USDC address","slug":"step-1-set-the-pool-token-to-the-erc-20-usdc-address","depth":3,"children":[]},{"title":"Step 2. Account for the 10¹² decimal offset in offchain tooling","slug":"step-2-account-for-the-10¹²-decimal-offset-in-offchain-tooling","depth":3,"children":[]},{"title":"Step 3. Remove WETH-style wrap/unwrap code paths","slug":"step-3-remove-weth-style-wrap/unwrap-code-paths","depth":3,"children":[]},{"title":"Step 4. Audit allowance-dependent sweep and security logic","slug":"step-4-audit-allowance-dependent-sweep-and-security-logic","depth":3,"children":[]},{"title":"Step 5. Replace onchain randomness and audit emergency-shutdown patterns","slug":"step-5-replace-onchain-randomness-and-audit-emergency-shutdown-patterns","depth":3,"children":[]},{"title":"Step 6. Test against an Arc RPC endpoint, not a local Anvil fork","slug":"step-6-test-against-an-arc-rpc-endpoint-not-a-local-anvil-fork","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/arcio-docs/8f78290d7c60f1f5/disclaimer-injector.js","/_mintlify/custom/arcio-docs/6ce1304cc70cc9ee/faucet-modal-injector.js","/_mintlify/custom/arcio-docs/f10ce4190f460fce/wallet-bus.js","/_mintlify/custom/arcio-docs/c8e2350d52e1c966/gtm.js"],"subdomain":"arcio-docs","siteName":"Arc Docs","title":"How-to: Port an AMM or liquidity pool to Arc - Arc Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-21T18:12:09.411Z","originalFileLocation":"integrate/defi/amm-and-pools.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Arc Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How-to: Port an AMM or liquidity pool to Arc - Arc Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Arc Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.arc.io/integrate/defi/amm-and-pools\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.arc.io/arc-docs.jpg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How-to: Port an AMM or liquidity pool to Arc - Arc Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.arc.io/arc-docs.jpg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Arc Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3E74BB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.arc.io/integrate/defi/amm-and-pools\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrate/defi/amm-and-pools.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.arc.io/#organization\",\"name\":\"Arc Docs\",\"url\":\"https://docs.arc.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/logo/ARC_Doc_FC.svg?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=6d67e0bee7674d1506373511501be1cd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.arc.io#website\",\"name\":\"Arc Docs\",\"url\":\"https://docs.arc.io\",\"publisher\":{\"@id\":\"https://docs.arc.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.arc.io/integrate/defi/amm-and-pools#webpage\",\"url\":\"https://docs.arc.io/integrate/defi/amm-and-pools\",\"name\":\"How-to: Port an AMM or liquidity pool to Arc\",\"description\":\"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.\",\"dateModified\":\"2026-08-21T18:12:09.411Z\",\"isPartOf\":{\"@id\":\"https://docs.arc.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.arc.io/integrate/defi/amm-and-pools#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.arc.io/integrate/defi/amm-and-pools#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"DeFi\",\"item\":\"https://docs.arc.io/integrate/defi\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How-to: Port an AMM or liquidity pool to Arc\",\"item\":\"https://docs.arc.io/integrate/defi/amm-and-pools\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.arc.io/integrate/defi/amm-and-pools#article\",\"headline\":\"How-to: Port an AMM or liquidity pool to Arc\",\"name\":\"How-to: Port an AMM or liquidity pool to Arc\",\"description\":\"Migrate an AMM, liquidity pool, or DEX router to Arc by applying the correct USDC token address, decimal conversion factor, and Arc-specific EVM behaviors.\",\"url\":\"https://docs.arc.io/integrate/defi/amm-and-pools\",\"mainEntityOfPage\":{\"@id\":\"https://docs.arc.io/integrate/defi/amm-and-pools#webpage\"},\"image\":\"https://docs.arc.io/arc-docs.jpg\",\"dateModified\":\"2026-08-21T18:12:09.411Z\",\"publisher\":{\"@id\":\"https://docs.arc.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.arc.io#website\"}}]}\u003c/script>","siteName":"Arc Docs","nav":{"global":null,"tabs":[{"tab":"Arc Network","pages":[{"title":"Arc Network","href":"/arc-chain"}]},{"tab":"Integrate","pages":[{"title":"Integrate with Arc","sidebarTitle":"Overview","href":"/integrate"},{"title":"Connect to Arc","href":"/integrate/connect-to-arc"},{"title":"How-to: Install Arc Foundry","sidebarTitle":"Install Arc Foundry","href":"/arc/tutorials/install-arc-foundry"},{"title":"Deploy on Arc","sidebarTitle":"Deploy on Arc","href":"/integrate/deploy-on-arc"},{"title":"EVM differences","sidebarTitle":"EVM differences","href":"/integrate/evm-differences"},{"group":"Exchanges","icon":"building-columns","pages":[{"title":"Exchange Integration","sidebarTitle":"Overview","href":"/integrate/exchanges"},{"title":"How-to: Detect and process deposits","sidebarTitle":"Detect and process deposits","href":"/integrate/exchanges/deposits"},{"title":"How to: Process Withdrawals","sidebarTitle":"Process withdrawals","href":"/integrate/exchanges/withdrawals"},{"title":"How-to: Bridge USDC and EURC with CCTP","sidebarTitle":"Bridge USDC and EURC with CCTP","href":"/integrate/exchanges/cctp-bridging"},{"title":"Custody Platform Integration","sidebarTitle":"Custody platforms","href":"/integrate/exchanges/custody"}]},{"group":"On/off-ramps","icon":"money-bill-transfer","pages":[{"title":"On/off-ramp integration","sidebarTitle":"Overview","href":"/integrate/on-off-ramps"},{"title":"How-to: Add Arc to your on/off-ramp platform","sidebarTitle":"Add Arc to your on/off-ramp platform","href":"/integrate/on-off-ramps/add-arc-to-your-platform"}]},{"group":"Wallets","icon":"wallet","pages":[{"title":"Wallet integration","sidebarTitle":"Overview","href":"/integrate/wallets"},{"title":"How-to: Add Arc to a wallet","sidebarTitle":"Add Arc to a wallet","href":"/integrate/wallets/add-arc-to-a-wallet"},{"title":"Transaction Lifecycle","href":"/integrate/wallets/transaction-lifecycle"},{"title":"How to: Display Transaction Fees","sidebarTitle":"Display transaction fees","href":"/integrate/wallets/fee-display"}]},{"group":"DeFi","icon":"arrows-rotate","pages":[{"title":"DeFi integration","sidebarTitle":"Overview","description":"Port AMMs, liquidity pools, and DeFi protocols to Arc using USDC as the canonical pool token and native gas asset.","href":"/integrate/defi"},{"title":"How-to: Port an AMM or liquidity pool to Arc","sidebarTitle":"Port an AMM or liquidity pool","href":"/integrate/defi/amm-and-pools"}]},{"group":"Relayers and paymasters","icon":"gas-pump","pages":[{"title":"Relayers and paymasters","sidebarTitle":"Overview","description":"Submit gasless transfers and sponsor UserOperations on Arc using USDC for gas.","href":"/integrate/relayers-and-paymasters"},{"title":"How-to: Operate an EIP-3009 relayer on Arc","sidebarTitle":"Operate an EIP-3009 relayer on Arc","href":"/integrate/relayers-and-paymasters/eip-3009-relayer"},{"title":"How-to: Deploy an ERC-4337 paymaster on Arc","sidebarTitle":"Deploy an ERC-4337 paymaster on Arc","href":"/integrate/relayers-and-paymasters/deploy-a-paymaster"}]},{"group":"Infrastructure","icon":"server","pages":[{"title":"Infrastructure Integration","sidebarTitle":"Overview","href":"/integrate/infrastructure"},{"title":"How to: Index Arc Events","sidebarTitle":"Index events","href":"/integrate/infrastructure/indexing-events"},{"title":"How-to: Add Arc to your bridge protocol","sidebarTitle":"Add Arc to your bridge","href":"/integrate/infrastructure/bridges"},{"title":"How to: Monitor Blocklist Compliance","sidebarTitle":"Monitor blocklist compliance","href":"/integrate/infrastructure/compliance"}]},{"group":"Run a node","icon":"chart-network","pages":[{"title":"Running a node","href":"/arc/concepts/running-a-node"},{"title":"Node requirements","href":"/arc/references/node-requirements"},{"title":"Run an Arc node","href":"/arc/tutorials/run-an-arc-node"},{"title":"Deploying a node as a service","href":"/arc/tutorials/deploy-node-as-service"},{"title":"Monitor a node","href":"/arc/tutorials/monitor-a-node"},{"title":"Set up Prometheus and Grafana for an Arc node","href":"/arc/tutorials/set-up-node-monitoring"}]}]},{"tab":"Build","pages":[{"title":"Build","href":"/build"}]},{"tab":"App Kits","pages":[{"title":"App Kits","href":"/app-kit"}]}]},"basePath":"","title":"How-to: Port an AMM or liquidity pool to Arc - Arc Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["10e4515597"],"chunks":["BannerMarkdown-DV-WToSZ.js","dist-CBUH0-zX.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-CR-RHrVC.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}