Skip to main content

Track CCTP Settlement Into and Out of Arc

Updated on
Oct 28, 2026

8 min read

Overview​

A source-chain transaction can confirm that USDC left a wallet, but a treasury or payment application also needs to know whether it arrived on the destination chain. Circle's Cross-Chain Transfer Protocol (CCTP) records those events separately, so monitoring one chain leaves part of the transfer unseen.

This guide builds a settlement tracker for USDC moving into and out of Arc, using Base as the other network. Two Quicknode Streams capture the events, Circle's message API connects the transfer's identity across chains, and PostgreSQL brings both sides into one queryable record.

TL;DR
  • Capture USDC burns and destination receives with one Stream on each chain.
  • Match the two events using Circle's CCTP message information.
  • See which transfers have arrived and which still lack a matching receive.

What You Will Do​

  • Track the source and destination transactions for a CCTP transfer
  • Query its settlement status, received USDC, and fee in one record
  • Extend the same two feeds to monitor transfers in both directions

What You Will Need​

  • A Quicknode account with access to Streams
  • The Quicknode CLI, authenticated with qn auth login
  • Node.js 24, npm, and Git
  • A hosted PostgreSQL 15 or newer database reachable by Streams over TLS, such as Supabase, with owner access for initial setup
  • Familiarity with JavaScript, TypeScript, and SQL

The walkthrough indexes an existing mainnet transfer. It does not require a wallet or submitting a transaction.

Understand How CCTP Transfers USDC Between Chains​

CCTP moves native USDC between supported blockchains through a burn-and-mint process:

  1. Burn on the source chain. The sender initiates a transfer, and CCTP burns the USDC. The DepositForBurn event records its amount, recipient, and destination.
  2. Attest the transfer. After the required source-chain confirmations, Circle signs an attestation authorizing the transfer's message to be received on the destination chain.
  3. Receive on the destination chain. A transaction submits the message and attestation to CCTP, which mints USDC for the recipient and emits MessageReceived.

For tracking purposes, a source burn establishes that a transfer started. A matching destination receive establishes settlement. A ready attestation alone does not establish that the destination transaction happened.

CCTP offers Fast Transfer and Standard Transfer modes. Fast Transfer allows attestation after softer confirmations; Standard Transfer waits for stronger source-chain finality. They are CCTP modes, and their availability and confirmation requirements depend on the source chain. This tracker observes either mode. See Circle's finality reference.

Match Events Across Chains With the CCTP Nonce​

A nonce identifies a CCTP message. In V2, DepositForBurn has no nonce field, and the source's emitted message initially contains a zero nonce. Circle assigns the nonce in the signed message, and MessageReceived carries it on the destination chain.

The tracker therefore needs Circle's message API to resolve that missing identity. It uses the burn transaction hash to find the corresponding signed message, then matches the receive by source domain, destination domain, and nonce. A domain is CCTP's identifier for a blockchain, separate from its EVM chain ID.

A Base DepositForBurn event has no assigned message nonce. Circle's signed message supplies nonce N, and Arc's MessageReceived carries the same N. A Base Stream and an Arc Stream capture the two events; the tracker uses Circle's message information to join them into one settlement record.A Base DepositForBurn event has no assigned message nonce. Circle's signed message supplies nonce N, and Arc's MessageReceived carries the same N. A Base Stream and an Arc Stream capture the two events; the tracker uses Circle's message information to join them into one settlement record.

Set Up the CCTP Settlement Tracker​

The complete project is in qn-guide-examples. You will first inspect the events, connect a database, then create the two Streams and resolve the transfer.

git clone https://github.com/quiknode-labs/qn-guide-examples.git
cd qn-guide-examples/Streams/arc-cctp-settlement-tracking
npm install
cp .env.example .env
chmod 600 .env

The filters select the onchain events, the database stores deliveries, and the TypeScript worker matches each burn to its destination receive. Start with the filters so you can see what each chain contributes.

Capture CCTP Burn and Receive Events With Streams​

Arc and Base use the V2 contracts in Circle's contract reference:

ContractAddressEvent
TokenMessengerV20x28b5a0e9c621a5badaa536219b3a228c8168cf5dDepositForBurn
MessageTransmitterV20x81d40f21f12a8f0e3252bccb954d722d4c464b64MessageReceived

Each filter reads the Streams logs dataset and selects these events for USDC transfers between the two networks. The Arc file defines its network and counterparty:

filter-arc.js (network constants)
const NETWORK = 'arc-mainnet';
const CHAIN_ID = '5042';
const DOMAIN = 26;
const USDC = '0x3600000000000000000000000000000000000000';
const PARTNER_DOMAIN = 6;

The Base filter uses base-mainnet, chain ID 8453, domain 6, Base USDC at 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, and partner domain 26. Both filters handle burns and receives, so one feed per network can track transfers in either direction. The full Arc filter includes the event decoding.

The qn command is the Quicknode CLI. If it is not installed yet, install it with Homebrew on macOS or Linux and authenticate:

brew install quicknode/tap/qn
qn auth login

Other installation options are in the CLI documentation. Run the following tests from qn-guide-examples/Streams/arc-cctp-settlement-tracking, the project directory you entered earlier. The --filter-file paths refer to the filter files in that directory.

Test the source and destination blocks of one existing Base-to-Arc transfer:

qn stream test-filter \
--network base-mainnet --dataset logs --block 52627678 \
--filter-file filter-base.js --filter-language javascript --format json

qn stream test-filter \
--network arc-mainnet --dataset logs --block 26048044 \
--filter-file filter-arc.js --filter-language javascript --format json

The Base response contains a burn with source domain 6, destination domain 26, and amount_raw: "102665844". The Arc response contains its receive, including a nonce, fee_raw: "19601", and net_amount_raw: "102646243". CCTP amounts use six-decimal USDC units, so these represent 102.665844 USDC burned and 102.646243 USDC received after the fee.

The burn payload also contains message_key, a fingerprint of the transfer's message fields. The worker uses it to select the correct message when Circle returns several messages for one transaction.

Connect PostgreSQL to the Settlement Tracker​

Both Streams write to the same PostgreSQL table. The tracker reads those deliveries and exposes a settlement view, so your application can query a transfer without fetching and comparing events itself.

Create a Supabase project or use another hosted PostgreSQL provider. Copy the database connection values into .env. With Supabase, use the session pooler connection details; its username has the form postgres.<PROJECT_REF>. The worker needs a session connection for its database lock.

.env
PGHOST='<POSTGRES_HOST>'
PGPORT=5432
PGDATABASE=postgres
PGUSER='<DATABASE_OWNER_USERNAME>'
PGPASSWORD='<DATABASE_OWNER_PASSWORD>'
PGSSLMODE=verify-full

If your provider requires its own root certificate, download it from the provider's database settings and add PGSSLROOTCERT='/absolute/path/to/provider-ca.crt'. The example README covers connection and certificate setup.

Run the one-time setup:

npm run setup
Created CCTP tables and views.
Updated .env to use cctp_tracker, a restricted application login.

Setup uses the initial owner connection to create the database objects and a login limited to the example's tables and views. It generates that login's password and updates .env automatically. Streams and the worker then use this application login; you do not need to create or manage separate passwords for the walkthrough.

The database keeps the delivered events in cctp_batches, resolves their message identities in cctp_attestations, and exposes one row per source burn through cctp_settlements. The schema handles duplicate and replacement deliveries.

Create Two Streams for CCTP Settlement Tracking​

You will now create two feeds that deliver the events you inspected to PostgreSQL. Streams can be configured in the Quicknode dashboard or through the CLI. This walkthrough uses the CLI to apply the example's configurations directly.

Generate a configuration for each network:

npm run prepare-streams

The configuration generator creates stream-config/base.private.json and stream-config/arc.private.json on your computer. These files are not included in the repository: they contain your database credentials from .env and are excluded by .gitignore.

The configurations capture the same historical blocks you inspected above, giving you a completed transfer to query. These are the settings applied to each Stream; use them as a reference if you prefer the dashboard setup:

SettingBase StreamArc Stream
NetworkBase mainnetArc mainnet
DatasetLogsLogs
JavaScript filterfilter-base.jsfilter-arc.js
Start and end blockBoth 52627678Both 26048044
Batch sizeOne blockOne block
Reorg correctionEnabled (fix_block_reorgs: 1)Disabled (fix_block_reorgs: 0)
DestinationPostgreSQL, table cctp_batchesSame PostgreSQL table

In the dashboard, use the matching filter file's source and the application connection values saved in .env after setup, with TLS enabled. Each feed stops after its configured end block.

Create the Streams from the generated files:

qn stream create --stream-config-file stream-config/base.private.json --format table
qn stream create --stream-config-file stream-config/arc.private.json --format table

Each command returns a Stream ID. Inspect each Stream until it is completed and its sequence equals the block in the table:

qn stream show <STREAM_ID> --format table

The events now share a database, but they still need the message identity that connects them. Resolve that identity next.

Match CCTP Burns to Destination Receives​

Circle's message API accepts the source domain and burn transaction hash. For the source burn above, the request is:

curl -sS "https://iris-api.circle.com/v2/messages/6?transactionHash=0x92245809f54016ba17ef1f35b69266bbf8b09b198ed6d2f285663e1e0214322e"

This historical transfer already has a completed response with message, attestation, and eventNonce fields. The message contains the assigned nonce; attestation contains Circle's signature authorizing receipt. For a new transfer, those values may not be ready on the first lookup.

Run the worker to resolve the indexed burn:

npm run reconcile

For the example transfer, the result is:

{"transactions":1,"attested":1,"waiting":0,"errors":0}

On each run, the worker checks unresolved burns, matches their message fields against Circle's response, and records the nonce only for a unique complete match. It also checks that the message nonce agrees with eventNonce. It retries unresolved lookups on later runs; it does not wait in a polling loop or submit the destination transaction.

The SQL view then joins the receive using all three values:

schema.sql (receive join)
LEFT JOIN cctp_legs AS receive
ON receive.side='receive'
AND receive.nonce=a.nonce
AND receive.source_domain=burn.source_domain
AND receive.destination_domain=burn.destination_domain

A successful lookup means the message was resolved. The destination event determines whether the transfer is settled.

Query CCTP Settlement Status and Received USDC​

Inspect the resulting record:

npm run inspect

The command runs this query from inspect.sql:

SELECT source_domain,destination_domain,status,
burn_transaction_hash,receive_transaction_hash,
round(amount_usdc,6) AS burned_usdc,
round(fee_raw/1000000,6) AS fee_usdc,
round(received_usdc,6) AS received_usdc,
settle_seconds
FROM cctp_settlements
ORDER BY source_domain,burn_transaction_hash;

For the example, the record contains:

Source DomainDestination DomainStatusBurned USDCFee USDCReceived USDC
6 (Base)26 (Arc)settled102.6658440.019601102.646243

burn_transaction_hash and receive_transaction_hash identify the transactions on each chain. The fee explains the difference between burned and received USDC. settle_seconds measures the time between their block timestamps.

For transfers that have not reached this result, the view distinguishes what is known:

StatusWhat the Tracker Knows
burnedThe source burn is indexed; no message lookup result is recorded yet
unresolvedA lookup ran, but the worker could not resolve a unique complete message; check resolution_status
attestedA complete message and attestation are available, but a matching receive is not indexed
settledThe matching destination receive is indexed

An absent receive can also mean that the destination Stream does not cover the relevant block. Check coverage before interpreting a transfer as still in flight.

Extend the Tracker to Ongoing Transfers​

Each earlier Stream used the same value for its start and end block, so it processed one historical block and stopped. To monitor new transfers, each feed needs to keep following its chain rather than stop at a fixed block.

Both filters already handle burns and receives for transfers into and out of Arc. Choose a starting block for each network based on how much history your application needs, then generate continuous configurations:

npm run prepare-streams -- --continuous \
--base-start <BASE_START_BLOCK> --arc-start <ARC_START_BLOCK>

The --continuous option replaces the fixed end block with end_range: -1, the API setting for a feed that continues as new blocks arrive. It overwrites the two local config files; it does not change the completed Streams. Create the ongoing feeds from the regenerated files:

qn stream create --stream-config-file stream-config/base.private.json --format table
qn stream create --stream-config-file stream-config/arc.private.json --format table

You only need one active feed per network. Schedule npm run reconcile regularly so newly indexed burns are resolved and pending lookups are retried.

Base's configuration enables fix_block_reorgs; Arc's deterministic-finality configuration leaves it disabled. The filters and schema preserve replacement deliveries, including empty batches that remove displaced events. See Streams reorg handling for the source-chain policy.

Additional validation transfers, separate writer and reconciler roles, and operational details are documented in the example README.

Conclusion​

You now have a tracker that connects a CCTP burn to its destination receive and exposes the result in PostgreSQL. Use the settlement view in your application to identify completed transfers, investigate those still awaiting a receive, and account for the USDC delivered after fees.

Next Steps​

Frequently Asked Questions​

How do I track USDC transfers into and out of Arc with CCTP?

Use one Quicknode Stream on Arc and one on the other supported chain to capture CCTP burn and receive events. This example pairs Arc with Base, resolves the message nonce through Circle's API, and joins both events in a PostgreSQL settlement record.

How can I tell whether a CCTP transfer has settled?

Look for a destination MessageReceived event that matches the source burn's source domain, destination domain, and resolved message nonce. This tracker reports settled when that event is indexed. A confirmed source burn or a ready attestation alone does not establish destination receipt.

Why does CCTP V2 settlement tracking need Circle's message API?

The CCTP V2 DepositForBurn event does not contain the assigned message nonce. Circle's signed message provides it, and the destination MessageReceived event carries it. The worker uses Circle's message API to resolve that identity before the database joins the events.

Why is my CCTP transfer attested but not settled?

Attested means the signed message is available, but the tracker has not indexed its matching destination receive. Check whether the destination transaction has executed and whether your Stream covers its block. An attestation authorizes receipt; it does not execute the destination transaction.

Can Quicknode Streams monitor CCTP transfers continuously?

Yes. Configure one ongoing Stream per network with end_range set to -1 and use filters that capture both burns and receives. Run the reconciliation worker regularly to resolve new messages and retry pending lookups. The example's continuous mode generates these configurations for Base and Arc.

Why did a CCTP transfer receive less USDC than it burned?

CCTP can deduct a transfer fee from the burned amount. The settlement record shows the burned USDC, executed fee, and net received USDC separately, using six-decimal units. Compare these fields to account for the amount delivered to the recipient.