Skip to main content

Rebalance stablecoin float across chains

What it is

Rebalancing stablecoin float across chains means keeping enough USDC on each chain you pay out or settle from, and moving it from a chain with spare cash when one falls below the floor you set, which treasury teams call stablecoin or cross-chain rebalancing.

Payment companies, remittance firms and payment providers that pay out on several chains run it because payouts on a chain stall the moment its float runs out, even while cash sits unused on another.

Goldsky keeps each treasury wallet’s USDC balance on every chain and runs the task that burns USDC on the chain with spare cash and mints it on the low one through Circle’s Cross-Chain Transfer Protocol (CCTP), while the floors, the approval policy and the keys stay with you.

Who it’s for

Stablecoin payment companies, remittance firms and payment service providers that keep working USDC on several chains; moving surplus cash into a money market fund is idle cash sweeps instead.

How cross-chain stablecoin rebalancing works

The diagram follows one refill from a chain dipping below its floor to the USDC minted there, and shows who does each step. Your setup may differ.

Your business, step 1: Set a floor per chainA floor and a target for each chain
Goldsky, step 2: TurboTrack USDC on each chainBalance read after every transfer
Your business, step 4: CustodianApprove the refillYour custodian signs under its policy
Goldsky, step 3: ComposeSpot a chain below its floorWorks out the amount and the source
Goldsky, step 5: ComposeBurn on the spare chainApproval and burn in one batch
Your business, step 7: Book both legsBurn and mint against one reference
Goldsky, step 6: ComposeMint on the low chainAttestation fetched, then the mint
  • Goldsky
  • Your provider

How to rebalance stablecoin float across chains

A pipeline keeps each treasury wallet’s USDC balance on every chain, and a scheduled task that Goldsky hosts refills a chain that falls below its floor. It moves USDC from a chain with spare cash through Circle’s Cross-Chain Transfer Protocol (CCTP), which burns it on one chain and mints the same amount on the other.

What you’ll need

  • Goldsky Turbo
  • Goldsky Compose
  • USDC on each chain you pay out or settle from, in treasury wallets you control
  • A custody provider with an approval policy that can sign EIP-712 typed data and EIP-7702 authorizations, reached through a signing endpoint you host
  • A floor and a target balance for each chain
  1. Set a floor for each chain

    Each chain you pay out or settle from needs enough USDC on hand, and the floor is the balance below which those payments would stall.

    Set a floor and a target for each chain from its usual outflows, and decide which chains may refill which; it’s the same floor-and-refill rule as gas wallet monitoring, applied to USDC. A floor set too low lets payments fail before a refill arrives; one set too high leaves cash sitting idle on every chain.

  2. Track the USDC balance on each chain

    Handled by Goldsky Turbo

    You can only refill a chain in time if you see its balance fall as payments go out.

    Every treasury wallet on every chain has to be included, with its balance updated after each transfer in or out. A wallet left off the list makes its chain look emptier than it is, or fuller.

    A Turbo Pipelines pipeline reads each treasury wallet’s USDC balance with _gs_eth_call at the block of every transfer in or out, and writes the latest balance for each wallet and chain to a table in your Compose app’s Postgres database, in a schema of its own.

    Read a balance in a pipeline (opens in a new tab)
  3. Spot a chain below its floor

    Handled by Goldsky Compose

    A refill should start before a chain runs out, not after a payment fails.

    On each check, compare every chain’s balance with its floor and work out how much to move from the chain with the most cash above its target. Count refills already on their way, or the next check sends a second one for the same shortfall.

    With Goldsky, a Compose task on a cron trigger reads the balances with ctx.db.query, applies your floors and targets, and keeps the refills in flight in a collection, so each shortfall gets one refill.

    Query your app’s database (opens in a new tab)
  4. Approve the refill under your policy

    Moving treasury USDC takes a signature from a key held under rules about which chains can send to which, and how much.

    Your signing endpoint holds those rules: it decodes the burn’s destination and amount from the call data (an execute or executeBatch call, which viem’s decodeFunctionData reads), checks them, then asks your custody provider to sign. A refill path with no limits is a way to drain treasury, one small transfer at a time.

  5. Burn the USDC on the chain with spare cash

    Handled by Goldsky Compose

    CCTP moves USDC by burning it on one chain and minting the same amount on another, so a refill doesn’t depend on a bridge’s pool of liquidity.

    The wallet approves Circle’s TokenMessengerV2 contract to spend the USDC, then calls depositForBurn with the amount, the destination chain’s domain and your treasury address there. Circle caps how much one burn can carry, so a large refill goes out as several burns.

    Goldsky Compose sends the approval and the burn together with writeContractBatch from a webhook wallet at your treasury address, so your custody provider signs one operation and either both calls happen or neither does. The webhook wallet’s one-time EIP-7702 authorization delegates the address to Simple7702Account, the ERC-4337 reference account contract, which has no owner or admin and moves nothing without your key’s signature.

    Batch calls from a webhook wallet (opens in a new tab)
  6. Mint the USDC on the low chain

    Handled by Goldsky Compose

    The refill arrives only when Circle’s attestation of the burn is submitted on the destination chain.

    Circle signs the burn once the source chain reaches the finality the burn asked for, and someone then has to submit that attestation on the destination chain; completing cross-chain USDC transfers covers those steps.

    The same Compose task can fetch the attestation with ctx.fetch on its next runs and call receiveMessage on the destination chain, so a refill finishes without anyone watching it.

    Call an API from a task (opens in a new tab)
  7. Book both legs of each refill

    Each refill is a burn on one chain and a mint on another, and your ledger has to show where the cash sits while it’s between them.

    Book the burn and the mint against one reference, such as the CCTP nonce, and treat a burn without its mint as cash in transit. Cross-chain transfer tracking covers matching the two sides.

What you control

Your team
  • Set a floor for each chain
  • Book both legs of each refill
Your providers
  • Custodian

Security and deployment

  • SOC 2 Type IIIndependently audited security controls.
  • Dedicated infrastructureSingle-tenant options for production workloads.
  • Data residencyCloud, on-premises or co-located.

Rebalance stablecoin float across chains with Goldsky

We’ll map it to your systems and show you what Goldsky runs, so your team builds the product, not the pipelines underneath it.

© Endless Sky Inc. All rights reserved.

PrivacyTermsSecurity

System status