Classic vs Soroban USDC routing for x402 facilitators — operational notes from cross-chain delivery #1935
chopmob-cloud
started this conversation in
General Discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We ship Stellar as one of 8 settlement chains in a multi-chain x402 facilitator (AlgoVoi). Two operational notes from running classic and Soroban USDC paths in production that might be useful to other facilitator authors and to the Allbridge / cross-chain integrator community:
Classic vs Soroban issuer collision. Circle USDC on Stellar has two distinct on-chain forms:
USDCissued byGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN, 7 decimal places, settled via the standardPaymentopCCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75, contract-call settlementAllbridge
/transfer/statuslookups for inbound bridges land as the classic asset (verified end-to-end against the issuer'saccount_creditedeffect on Horizon). A facilitator that only handles the Soroban-wrapped variant will silently miss the cross-chain inbound. We hit this when first wiring the EVM-to-Stellar xChain path; resolved by matchingaccount_creditedeffect type at the scanner.7dp precision in the 402 envelope. USDC on Stellar is 7 decimals, vs the 6dp standard on most other chains. A facilitator that advertises the same
amountvalue across all chains will under-quote by 10x on Stellar. We encode per-leg decimals in the x402 v2extraobject so agents and verifiers see the correct on-chain precision. The decimal-scaling logic runs against a single nominal-price input (6dp microunits) and scales per leg in our_leg()builder, which keeps the cap-guard semantics clean ($1.00 nominal ceiling preserved across all chains).Trustline as receiver-side prerequisite. Same pattern as Algorand ASA opt-in: before advertising a Stellar leg in a 402 challenge, a facilitator should verify the receiver has a trustline established for the issuer asset.
changeTrustop costs 0.5 XLM reserve plus 0.00001 XLM fee. Without trustline, USDC transfers from agents fail silently from the receiver side, producing a "shipped-but-broken" leg.For anyone curious about the verification mechanics from the agent side, our public bench (https://agent-trust-bench.algovoi.co.uk) advertises a Stellar leg as one of 8, with a profile (
/asset-spoof) that exercises issuer-mismatch detection.Happy to dig into any of these if useful for the Stellar SEP or facilitator-implementor community.
All reactions