Build CCTP-powered flows with routing, relaying, and tracking fully abstracted. Learn how to use Stableit SDK for crosschain USDC transfers.

Moving USDC across chains can be complex to implement: routing, approvals, and transaction coordination require protocol-level understanding and infrastructure.
Circle Cross-Chain Transfer Protocol (CCTP) facilitates this by enabling native USDC to move securely between supported chains by burning on the source chain and minting on the destination.
How the Stableit SDK Works
Stableit is a third-party SDK built on top of CCTP (both CCTP V1 and CCTP V2). It provides a simplified interface for developers to integrate native USDC transfers while offering relaying, destination gas, smart routing, and gasless transfers out of the box. It’s a production-grade SDK for teams looking to ship CCTP-powered functionality quickly.

The SDK is structured around three layers:
1. Intents
An intent describes what the user wants to do, such as sending USDC from one chain to another. It includes:
- Source and destination chains
- Amount
- Sender and recipient addresses
- (Optional) gas drop-off configuration

The SDK takes this intent and determines the best route based on available chain support, network fees, and estimated transfer time.
2. CCTP V2
CCTP V2 is the next evolution of CCTP that introduces two major enhancements:
Fast Transfer:
CCTP V2 enables faster-than-finality native USDC transfers using Circle’s Attestation Service and Fast Transfer Allowance. After the source chain burn reaches soft finality, Circle issues an attestation. USDC can be minted on the destination chain immediately, with the burned amount temporarily backed by Fast Transfer Allowance. Once finality is confirmed, the allowance is replenished.
Hooks:
It allows post-transfer smart contract logic to execute automatically upon minting on the destination chain. This supports workflows such as automated deposits, asset swaps, or treasury operations, all in a single transaction without added trust assumptions.
3. CCTPr and Avax Router
CCTPr is Stableit’s routing layer built on top of CCTP. It handles:
- Route selection across V2-only and mixed-version networks
- Delivery optimizations using off-chain relayers
- Gas drop-off on the destination chain (optional)
- Emits events representing each step in the lifecycle of the transfer
To bridge the gap between CCTP V2 and CCTP V1 supported chains, Stableit uses an internal Avax Router, which leverages Avalanche’s fast finality to enable efficient transfers to and from chains that don’t yet support V2 directly.
Getting Started
1. Install the SDK
The Stableit SDK can be installed via npm:
npm install @stable-io/sdk
It supports ESM environments and uses viem for account management and transaction signing.
2. Initialize the SDK
Create an instance of the Stableit SDK by providing the network, signer, and (optionally) RPC endpoints. This setup enables the SDK to sign and send transactions on the user’s behalf.
import StableSDK, { ViemSigner } from "@stable-io/sdk";
import { privateKeyToAccount } from "viem/accounts";
import dotenv from "dotenv";
dotenv.config();
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY!);
const sdk = new StableSDK({
network: "Testnet",
signer: new ViemSigner(account),
rpcUrls: {
Ethereum: "https://ethereum-sepolia.rpc.subquery.network/public",
},
});
3. Define a Transfer Intent
An intent describes the user's goal such as sending USDC from one chain to another. It includes transfer parameters like source and target chains, amount, and addresses.
const intent = {
sourceChain: "Ethereum",
targetChain: "Arbitrum",
amount: "10.00", // USDC
sender: account.address,
recipient: account.address,
gasDropoffDesired: 0n, // optional
};
4. Find a Route
Once the intent is defined, the SDK calculates the best available route based on speed, cost, and network support. Routes may use direct CCTP V2 chains or execute an intermediate hop through Avalanche to reach V1 only chains.
const routes = await sdk.findRoutes(intent, {
paymentToken: "usdc", // or "native"
});
const route = routes.fastest;
Each route includes chain type, estimated duration, fees, and required transaction steps.
5. (Optional) Check Funds
Before executing the transfer, you can check that the sender has enough USDC and native gas to complete the transaction. This is because the transaction will fail if there are insufficient funds.
const hasFunds = await sdk.checkHasEnoughFunds(route);
if (!hasFunds) {
throw new Error("Insufficient funds to execute this route.");
}
6. Execute the Route
This step signs and submits all required transactions using the selected route. The SDK automatically handles either permit signing or onchain approvals based on route requirements.
const result = await sdk.executeRoute(route);
console.log("Transfer TX:", result.transferHash);
console.log("Redeem TX:", result.redeemHash);
7. (Optional) Monitor Progress
The SDK emits lifecycle events during the transfer process. This is optional, but you can subscribe to them to monitor status or trigger actions in your app.
route.progress.on("*", (event) => {
console.log("[Progress]", event.name, event.data);
});
For lower-level control of the execution steps:
for await (const step of route.workflow) {
await step.signAndSend();
}
Try It Yourself
The StableIt SDK is a complete solution for building production ready CCTP-powered flows with routing, relaying, and tracking fully abstracted.
To explore further, check out the Stableit Quickstart Guide for additional examples and configuration options.
If you have questions about CCTP, or you're building with USDC and want to connect with other developers, join us at circle.com/discord.