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.
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.
Track the USDC balance on each chain
Handled by Goldsky TurboYou 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
Read a balance in a pipeline (opens in a new tab)_gs_eth_callat 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.Spot a chain below its floor
Handled by Goldsky ComposeA 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
Query your app’s database (opens in a new tab)ctx.db.query, applies your floors and targets, and keeps the refills in flight in a collection, so each shortfall gets one refill.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
executeorexecuteBatchcall, which viem’sdecodeFunctionDatareads), 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.Burn the USDC on the chain with spare cash
Handled by Goldsky ComposeCCTP 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
TokenMessengerV2contract to spend the USDC, then callsdepositForBurnwith 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
Batch calls from a webhook wallet (opens in a new tab)writeContractBatchfrom 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.Mint the USDC on the low chain
Handled by Goldsky ComposeThe 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
Call an API from a task (opens in a new tab)ctx.fetchon its next runs and callreceiveMessageon the destination chain, so a refill finishes without anyone watching it.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.
More use cases that manage treasury
- Stablecoin treasury management across chainsSee stablecoin cash across every wallet and chain in one place.
- Idle stablecoin cash sweepsMove idle stablecoin balances into tokenized money funds when they pass a threshold.
- Gas wallet monitoringKeep gas wallets funded on every chain and alert before one runs dry.
- Sponsored gas spendTotal the gas you pay for your users per user, paymaster and day, watch the paymaster’s deposit and check the provider’s bill.
- Intercompany settlement in stablecoinsSettle what group entities owe each other in stablecoins, and land each transfer beside the intercompany ledger.
Use cases built the same way
- Authorize and capture stablecoin paymentsHold a buyer’s stablecoins in an escrow contract at checkout, capture them to the merchant as orders ship, void what can’t be filled and refund after capture.
- Stablecoin payouts for marketplaces and creatorsPay sellers, gig workers and creators in stablecoins from a marketplace balance.
- Programmable escrow for B2B stablecoin paymentsHold a buyer’s stablecoin payment until delivery, a milestone or a deadline, then release it to the seller or refund the buyer.
- Cross-chain transfer trackingSee every cross-chain stablecoin transfer as settled, in flight or stalled, and catch the stuck ones.
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.