Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.
Detect USDC deposits on Arc by generating addresses, monitoring the native USDC
Transfer event from the system emitter 0xffff…fffe (Arc’s
EIP-7708 implementation), crediting
after a single block confirmation (deterministic finality guarantees no reorgs),
and sweeping funds into a hot wallet.
Prerequisites
Before you begin, ensure that you’ve:
Obtained access to an Arc RPC endpoint (https://rpc.testnet.arc.io) or
WebSocket (wss://rpc.testnet.arc.io)
Installed an HD wallet library for generating deposit addresses (for example,
ethers or viem)
Familiarized yourself with Ethereum JSON-RPC methods and event log filtering
Set up a database to track processed deposits and prevent double-crediting
Steps
Step 1. Generate deposit addresses
Arc uses standard Ethereum addresses (0x-prefixed, 20 bytes, EIP-55 checksum).
Derive deposit addresses using the same HD wallet approach as Ethereum—one
unique address per user.
import { HDNodeWallet, Mnemonic } from "ethers";// Derive a deposit address for a given user indexfunction getDepositAddress(mnemonic: string, userIndex: number): string { const hdNode = HDNodeWallet.fromMnemonic( Mnemonic.fromPhrase(mnemonic), `m/44'/60'/0'/0/${userIndex}`, ); return hdNode.address;}
Store the mapping between user IDs and their derived address index. Never expose
the mnemonic or private keys in client-side code.
Step 2. Subscribe to new blocks
Use eth_subscribe("newHeads") over WebSocket for real-time block
notifications, or poll eth_blockNumber over HTTP as a fallback.
Step 3. Detect incoming transfers with the native USDC Transfer event
Every native USDC movement emits a standard ERC-20 Transfer log from the
system address 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE (Arc’s
EIP-7708 implementation). This single
stream covers plain native sends and the native leg of ERC-20 transfers, with
values in 18 decimals. Filter it to catch every deposit, including native
sends that emit no event on the ERC-20 contract.
Do not filter the ERC-20 USDC contract (0x3600…0000) for deposit detection.
Its Transfer events cover only ERC-20-interface activity, so a plain native
send produces no log there and the deposit is missed. Filter the system
emitter (0xffff…fffe) instead. See USDC system
events for the full event matrix.
Event signature:
Transfer(address indexed from, address indexed to, uint256 value)
Topic0:0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efNative USDC system emitter:0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfEUse eth_getLogs to filter for transfers to your deposit addresses:
import { Interface, Log, JsonRpcProvider } from "ethers";// Native USDC system emitter (EIP-7708 Transfer logs, 18 decimals)const NATIVE_USDC_EMITTER = "0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE";const TRANSFER_TOPIC = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef";const provider = new JsonRpcProvider("https://rpc.testnet.arc.io");const erc20Interface = new Interface([ "event Transfer(address indexed from, address indexed to, uint256 value)",]);async function processBlock(blockNumber: number): Promise<void> { const logs = await provider.getLogs({ address: NATIVE_USDC_EMITTER, topics: [ TRANSFER_TOPIC, null, // any sender null, // any recipient—filter client-side for your addresses ], fromBlock: blockNumber, toBlock: blockNumber, }); for (const log of logs) { const parsed = erc20Interface.parseLog({ topics: log.topics as string[], data: log.data, }); if (!parsed) continue; const to = parsed.args.to as string; const value = parsed.args.value as bigint; // 18 decimals (native) // Check if the recipient is one of your deposit addresses if (isDepositAddress(to)) { await creditDeposit({ txHash: log.transactionHash, logIndex: log.index, to, amount: value, // 18-decimal native USDC blockNumber, }); } }}
Do not credit the same deposit twice. An ERC-20 transfer() emits a log from
both the system emitter (0xffff…fffe, 18 decimals) and the ERC-20 contract
(0x3600…0000, 6 decimals); filter only the system emitter. Likewise, do not
reconcile eth_getBalance against Transfer events—they represent the same
balance.
Step 4. Confirm the deposit
Arc provides deterministic finality—once a transaction is included in a block,
it is final with no possibility of reorg. You can safely credit deposits after 1
confirmation.
import { JsonRpcProvider } from "ethers";const provider = new JsonRpcProvider("https://rpc.testnet.arc.io");async function isConfirmed(txHash: string): Promise<boolean> { const receipt = await provider.getTransactionReceipt(txHash); if (!receipt || receipt.status === 0) { return false; // Transaction failed or not yet mined } // On Arc, 1 confirmation = final. No reorgs possible. const currentBlock = await provider.getBlockNumber(); return currentBlock >= receipt.blockNumber;}
Since Arc has deterministic finality, you do not need to wait for multiple
confirmations. Credit the user once the block containing their transaction is
produced.
Step 5. Credit deposits at full precision
The native system Transfer event emits values in 18-decimal native USDC. Store
and credit the raw 18-decimal value. Don’t truncate to 6-decimal ERC-20 units:
amounts smaller than 1×10⁻⁶ USDC are valid and spendable as gas. Truncating them
to 6-decimal ERC-20 units under-credits the user’s balance.
// Credit the raw 18-decimal value — no conversion neededasync function creditDeposit(deposit: { txHash: string; logIndex: number; to: string; amount: bigint; // 18-decimal native USDC blockNumber: bigint;}): Promise<void> { // Store amount as 18-decimal native USDC await db.insert({ ...deposit });}
The native system Transfer event and eth_getBalance use 18 decimals. The
ERC-20 contract’s Transfer and balanceOf use 6. Don’t convert 18-decimal
deposit amounts to 6-decimal before crediting. Amounts smaller than 1×10⁻⁶
USDC are under-credited if truncated.
Step 6. Sweep deposits to a hot wallet
Consolidate deposited funds from individual user addresses into your hot wallet.
Use EIP-1559 transactions with Arc’s minimum base fee of 20 Gwei.
import { Wallet, JsonRpcProvider, parseUnits } from "ethers";const provider = new JsonRpcProvider("https://rpc.testnet.arc.io");async function sweepDeposit( depositPrivateKey: string, hotWalletAddress: string, amount: bigint,): Promise<string> { const wallet = new Wallet(depositPrivateKey, provider); const feeData = await provider.getFeeData(); const maxFeePerGas = feeData.maxFeePerGas ?? parseUnits("30", "gwei"); const maxPriorityFeePerGas = feeData.maxPriorityFeePerGas ?? parseUnits("1", "gwei"); // Approximately 21,000 gas units for a native USDC send const gasLimit = 65_000n; const tx = await wallet.sendTransaction({ to: hotWalletAddress, value: amount, // 18-decimal native USDC type: 2, // EIP-1559 maxFeePerGas, maxPriorityFeePerGas, gasLimit, }); const receipt = await tx.wait(); return receipt!.hash;}
Common mistakes
Filtering the wrong emitter: Plain native USDC sends emit no Transfer on
the ERC-20 contract (0x3600…0000). Filter the system emitter (0xffff…fffe)
so you do not miss native deposits.
Double-counting: An ERC-20 transfer() logs from both emitters. Filter
only the system emitter, and do not reconcile eth_getBalance against
Transfer events for the same address.
Decimal mismatch: The system emitter’s values use 18 decimals. Store and
credit them as 18-decimal native USDC. Converting to 6-decimal before
crediting truncates sub-6-decimal amounts, resulting in under-crediting.
Waiting for multiple confirmations: Arc has deterministic finality.
Waiting for 6+ confirmations adds unnecessary latency with no security
benefit.
Hardcoded keys: Never embed private keys in source code. Use environment
variables or a secrets manager for sweep wallet credentials.
Using tx.from for attribution: For EIP-3009 relayer-submitted deposits,
tx.from is the relayer’s address. Crediting from it assigns the deposit to
the relayer, not the depositor. Read the from field from the system
emitter’s Transfer event instead.
Check receipt.status === 0 in any send or sweep flow. A transfer to or from
a blocklisted address reverts at runtime: the transaction is included in the
block and gas is consumed, but state changes roll back.
Fee floor: Transactions with maxFeePerGas lower than 20 Gwei are
rejected with no error receipt and never appear in a block. Set maxFeePerGas
to at least 20 Gwei when building sweep transactions.
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":"6af742ef8f1bbbdd1c1429cd","clientVersion":"0.0.4205","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":"custom-rbac-roles","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":"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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","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/exchanges/deposits","slug":"/integrate/exchanges/deposits","pageMetadata":{"title":"How-to: Detect and process deposits","description":"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.","sidebarTitle":"Detect and process deposits","href":"/integrate/exchanges/deposits"},"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: \"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.\"\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:[`Detect USDC deposits on Arc by generating addresses, monitoring the native USDC\n`,_jsx(_components.code,{children:`Transfer`}),` event from the system emitter `,_jsx(_components.code,{children:`0xffff…fffe`}),` (Arc’s\n`,_jsx(_components.a,{href:`https://eips.ethereum.org/EIPS/eip-7708`,children:`EIP-7708`}),` implementation), crediting\nafter a single block confirmation (deterministic finality guarantees no reorgs),\nand sweeping funds into a hot wallet.`]}),`\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:[`Obtained access to an Arc RPC endpoint (`,_jsx(_components.code,{children:`https://rpc.testnet.arc.io`}),`) or\nWebSocket (`,_jsx(_components.code,{children:`wss://rpc.testnet.arc.io`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Installed an HD wallet library for generating deposit addresses (for example,\n`,_jsx(_components.code,{children:`ethers`}),` or `,_jsx(_components.code,{children:`viem`}),`)`]}),`\n`,_jsx(_components.li,{children:`Familiarized yourself with Ethereum JSON-RPC methods and event log filtering`}),`\n`,_jsx(_components.li,{children:`Set up a database to track processed deposits and prevent double-crediting`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`steps`,children:`Steps`}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-generate-deposit-addresses`,children:`Step 1. Generate deposit addresses`}),`\n`,_jsx(_components.p,{children:`Arc uses standard Ethereum addresses (0x-prefixed, 20 bytes, EIP-55 checksum).\nDerive deposit addresses using the same HD wallet approach as Ethereum—one\nunique address per user.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`HDNodeWallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Mnemonic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ethers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Derive a deposit address for a given user index`})}),`\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:` getDepositAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`mnemonic`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`userIndex`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_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:` string`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` hdNode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HDNodeWallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromMnemonic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Mnemonic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromPhrase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`mnemonic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `m/44'/60'/0'/0/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userIndex`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_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`,_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:` hdNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`address`}),_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(_components.p,{children:`Store the mapping between user IDs and their derived address index. Never expose\nthe mnemonic or private keys in client-side code.`}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-subscribe-to-new-blocks`,children:`Step 2. Subscribe to new blocks`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`eth_subscribe(\"newHeads\")`}),` over WebSocket for real-time block\nnotifications, or poll `,_jsx(_components.code,{children:`eth_blockNumber`}),` over HTTP as a fallback.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,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:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`WebSocketProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ethers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Option A: WebSocket subscription (recommended)`})}),`\n`,_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:` wsProvider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` WebSocketProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wss://rpc.testnet.arc.io\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`wsProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`blockNumber`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`New block: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`blockNumber`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_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:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` processBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`blockNumber`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Option B: HTTP polling fallback`})}),`\n`,_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:` httpProvider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://rpc.testnet.arc.io\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` lastProcessedBlock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` httpProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBlockNumber`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setInterval`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` currentBlock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` httpProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBlockNumber`}),_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:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` block`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` lastProcessedBlock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`block`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`block`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_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:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` processBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`block`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` lastProcessedBlock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-3-detect-incoming-transfers-with-the-native-usdc-transfer-event`,children:`Step 3. Detect incoming transfers with the native USDC Transfer event`}),`\n`,_jsxs(_components.p,{children:[`Every native USDC movement emits a standard ERC-20 `,_jsx(_components.code,{children:`Transfer`}),` log from the\nsystem address `,_jsx(_components.code,{children:`0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE`}),` (Arc’s\n`,_jsx(_components.a,{href:`https://eips.ethereum.org/EIPS/eip-7708`,children:`EIP-7708`}),` implementation). This single\nstream covers plain native sends and the native leg of ERC-20 transfers, with\nvalues in `,_jsx(_components.strong,{children:`18 decimals`}),`. Filter it to catch every deposit, including native\nsends that emit no event on the ERC-20 contract.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not filter the ERC-20 USDC contract (`,_jsx(_components.code,{children:`0x3600…0000`}),`) for deposit detection.\nIts `,_jsx(_components.code,{children:`Transfer`}),` events cover only ERC-20-interface activity, so a plain native\nsend produces no log there and the deposit is missed. Filter the system\nemitter (`,_jsx(_components.code,{children:`0xffff…fffe`}),`) instead. See `,_jsx(_components.a,{href:`/arc/references/usdc-system-events`,children:`USDC system\nevents`}),` for the full event matrix.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Event signature:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`solidity`,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:`solidity`,children:_jsxs(_components.code,{language:`solidity`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Transfer`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` indexed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` from, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`address`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` indexed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` to, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`uint256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` value)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Topic0:`}),` `,_jsx(_components.code,{children:`0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Native USDC system emitter:`}),` `,_jsx(_components.code,{children:`0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE`})]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`eth_getLogs`}),` to filter for transfers to your deposit addresses:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`47`,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:`47`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Interface`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ethers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Native USDC system emitter (EIP-7708 Transfer logs, 18 decimals)`})}),`\n`,_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:` NATIVE_USDC_EMITTER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE\"`}),_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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` TRANSFER_TOPIC`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://rpc.testnet.arc.io\"`}),_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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` erc20Interface`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Interface`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"event Transfer(address indexed from, address indexed to, uint256 value)\"`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` processBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`blockNumber`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_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:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`void`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` logs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getLogs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` address:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` NATIVE_USDC_EMITTER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` topics:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` TRANSFER_TOPIC`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// any sender`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// any recipient—filter client-side for your addresses`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fromBlock:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blockNumber`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` toBlock:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blockNumber`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` log`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` logs`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` parsed`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` erc20Interface`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parseLog`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` topics:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`topics`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parsed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`continue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` to`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parsed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`to`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parsed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_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:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 18 decimals (native)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Check if the recipient is one of your deposit addresses`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isDepositAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`to`}),_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:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` creditDeposit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` txHash:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`transactionHash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` logIndex:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` to`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 18-decimal native USDC`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blockNumber`}),_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`,_jsx(_components.span,{className:`line`,children:_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not credit the same deposit twice. An ERC-20 `,_jsx(_components.code,{children:`transfer()`}),` emits a log from\nboth the system emitter (`,_jsx(_components.code,{children:`0xffff…fffe`}),`, 18 decimals) and the ERC-20 contract\n(`,_jsx(_components.code,{children:`0x3600…0000`}),`, 6 decimals); filter only the system emitter. Likewise, do not\nreconcile `,_jsx(_components.code,{children:`eth_getBalance`}),` against Transfer events—they represent the same\nbalance.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`step-4-confirm-the-deposit`,children:`Step 4. Confirm the deposit`}),`\n`,_jsx(_components.p,{children:`Arc provides deterministic finality—once a transaction is included in a block,\nit is final with no possibility of reorg. You can safely credit deposits after 1\nconfirmation.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,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:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ethers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://rpc.testnet.arc.io\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` isConfirmed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`txHash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`boolean`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` receipt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getTransactionReceipt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`txHash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`receipt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` receipt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_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:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Transaction failed or not yet mined`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // On Arc, 1 confirmation = final. No reorgs possible.`})}),`\n`,_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:` currentBlock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBlockNumber`}),_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:` currentBlock`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` receipt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`blockNumber`}),_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(_components.p,{children:`Since Arc has deterministic finality, you do not need to wait for multiple\nconfirmations. Credit the user once the block containing their transaction is\nproduced.`}),`\n`,_jsx(Heading,{level:`3`,id:`step-5-credit-deposits-at-full-precision`,children:`Step 5. Credit deposits at full precision`}),`\n`,_jsxs(_components.p,{children:[`The native system `,_jsx(_components.code,{children:`Transfer`}),` event emits values in 18-decimal native USDC. Store\nand credit the raw 18-decimal value. Don’t truncate to 6-decimal ERC-20 units:\namounts smaller than 1×10⁻⁶ USDC are valid and spendable as gas. Truncating them\nto 6-decimal ERC-20 units under-credits the user’s balance.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,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:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Credit the raw 18-decimal value — no conversion needed`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` creditDeposit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`deposit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` txHash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` logIndex`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` to`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` amount`}),_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:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 18-decimal native USDC`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` blockNumber`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Store amount as 18-decimal native USDC`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` db`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insert`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deposit`}),_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(Warning,{children:_jsxs(_components.p,{children:[`The native system `,_jsx(_components.code,{children:`Transfer`}),` event and `,_jsx(_components.code,{children:`eth_getBalance`}),` use 18 decimals. The\nERC-20 contract’s `,_jsx(_components.code,{children:`Transfer`}),` and `,_jsx(_components.code,{children:`balanceOf`}),` use 6. Don’t convert 18-decimal\ndeposit amounts to 6-decimal before crediting. Amounts smaller than 1×10⁻⁶\nUSDC are under-credited if truncated.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`step-6-sweep-deposits-to-a-hot-wallet`,children:`Step 6. Sweep deposits to a hot wallet`}),`\n`,_jsx(_components.p,{children:`Consolidate deposited funds from individual user addresses into your hot wallet.\nUse EIP-1559 transactions with Arc’s minimum base fee of 20 Gwei.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`31`,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:`31`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parseUnits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ethers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` JsonRpcProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://rpc.testnet.arc.io\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sweepDeposit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` depositPrivateKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` hotWalletAddress`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` amount`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` wallet`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`depositPrivateKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` feeData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getFeeData`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` maxFeePerGas`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` feeData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxFeePerGas`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` parseUnits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"30\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gwei\"`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` maxPriorityFeePerGas`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` feeData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxPriorityFeePerGas`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` parseUnits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gwei\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Approximately 21,000 gas units for a native USDC send`})}),`\n`,_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:` gasLimit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 65_000`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`n`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` tx`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendTransaction`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` to:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` hotWalletAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` value:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 18-decimal native USDC`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// EIP-1559`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxFeePerGas`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxPriorityFeePerGas`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gasLimit`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_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:` receipt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`wait`}),_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:` receipt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hash`}),_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:`2`,id:`common-mistakes`,children:`Common mistakes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Filtering the wrong emitter:`}),` Plain native USDC sends emit no `,_jsx(_components.code,{children:`Transfer`}),` on\nthe ERC-20 contract (`,_jsx(_components.code,{children:`0x3600…0000`}),`). Filter the system emitter (`,_jsx(_components.code,{children:`0xffff…fffe`}),`)\nso you do not miss native deposits.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Double-counting:`}),` An ERC-20 `,_jsx(_components.code,{children:`transfer()`}),` logs from both emitters. Filter\nonly the system emitter, and do not reconcile `,_jsx(_components.code,{children:`eth_getBalance`}),` against\nTransfer events for the same address.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Decimal mismatch:`}),` The system emitter’s values use 18 decimals. Store and\ncredit them as 18-decimal native USDC. Converting to 6-decimal before\ncrediting truncates sub-6-decimal amounts, resulting in under-crediting.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Waiting for multiple confirmations:`}),` Arc has deterministic finality.\nWaiting for 6+ confirmations adds unnecessary latency with no security\nbenefit.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Hardcoded keys:`}),` Never embed private keys in source code. Use environment\nvariables or a secrets manager for sweep wallet credentials.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Using `,_jsx(_components.code,{children:`tx.from`}),` for attribution:`]}),` For EIP-3009 relayer-submitted deposits,\n`,_jsx(_components.code,{children:`tx.from`}),` is the relayer’s address. Crediting from it assigns the deposit to\nthe relayer, not the depositor. Read the `,_jsx(_components.code,{children:`from`}),` field from the system\nemitter’s `,_jsx(_components.code,{children:`Transfer`}),` event instead.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Check `,_jsx(_components.code,{children:`receipt.status === 0`}),` in any send or sweep flow. A transfer to or from\na blocklisted address reverts at runtime: the transaction is included in the\nblock and gas is consumed, but state changes roll back.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fee floor:`}),` Transactions with `,_jsx(_components.code,{children:`maxFeePerGas`}),` lower than 20 Gwei are\nrejected with no error receipt and never appear in a block. Set `,_jsx(_components.code,{children:`maxFeePerGas`}),`\nto at least 20 Gwei when building sweep transactions.`]}),`\n`]})]})}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: Detect and process deposits","description":"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.","sidebarTitle":"Detect and process deposits","href":"/integrate/exchanges/deposits"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Steps","slug":"steps","depth":2,"children":[{"title":"Step 1. Generate deposit addresses","slug":"step-1-generate-deposit-addresses","depth":3,"children":[]},{"title":"Step 2. Subscribe to new blocks","slug":"step-2-subscribe-to-new-blocks","depth":3,"children":[]},{"title":"Step 3. Detect incoming transfers with the native USDC Transfer event","slug":"step-3-detect-incoming-transfers-with-the-native-usdc-transfer-event","depth":3,"children":[]},{"title":"Step 4. Confirm the deposit","slug":"step-4-confirm-the-deposit","depth":3,"children":[]},{"title":"Step 5. Credit deposits at full precision","slug":"step-5-credit-deposits-at-full-precision","depth":3,"children":[]},{"title":"Step 6. Sweep deposits to a hot wallet","slug":"step-6-sweep-deposits-to-a-hot-wallet","depth":3,"children":[]}]},{"title":"Common mistakes","slug":"common-mistakes","depth":2,"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: Detect and process deposits - Arc Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-10T18:09:23.135Z","originalFileLocation":"integrate/exchanges/deposits.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=\"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.\">\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: Detect and process deposits - Arc Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Arc Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.arc.io/integrate/exchanges/deposits\">\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: Detect and process deposits - Arc Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.\">\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/exchanges/deposits\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrate/exchanges/deposits.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/exchanges/deposits#webpage\",\"url\":\"https://docs.arc.io/integrate/exchanges/deposits\",\"name\":\"How-to: Detect and process deposits\",\"description\":\"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.\",\"dateModified\":\"2026-09-10T18:09:23.135Z\",\"isPartOf\":{\"@id\":\"https://docs.arc.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.arc.io/integrate/exchanges/deposits#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.arc.io/integrate/exchanges/deposits#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Exchanges\",\"item\":\"https://docs.arc.io/integrate/exchanges\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How-to: Detect and process deposits\",\"item\":\"https://docs.arc.io/integrate/exchanges/deposits\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.arc.io/integrate/exchanges/deposits#article\",\"headline\":\"How-to: Detect and process deposits\",\"name\":\"How-to: Detect and process deposits\",\"description\":\"Implement deposit detection on Arc by monitoring native USDC Transfer events from the system emitter, confirming with deterministic finality, and sweeping funds.\",\"url\":\"https://docs.arc.io/integrate/exchanges/deposits\",\"mainEntityOfPage\":{\"@id\":\"https://docs.arc.io/integrate/exchanges/deposits#webpage\"},\"image\":\"https://docs.arc.io/arc-docs.jpg\",\"dateModified\":\"2026-09-10T18:09:23.135Z\",\"publisher\":{\"@id\":\"https://docs.arc.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.arc.io#website\"}}]}\u003c/script>","agentPointerHref":"/integrate/exchanges/deposits.md","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","description":"Integrate Arc deposits, withdrawals, and USDC liquidity management into your exchange.","href":"/integrate/exchanges"},{"title":"How-to: Detect and process deposits","sidebarTitle":"Detect and process deposits","href":"/integrate/exchanges/deposits"},{"title":"How to: Process Withdrawals","description":"Build, sign, and broadcast USDC withdrawal transactions from your exchange hot wallet on Arc.","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","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","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: Detect and process deposits - Arc Docs","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":["10e4515597"],"chunks":["BannerMarkdown-5hDu1xuu.js","dist-OCScizqf.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}