Repository navigation
feat(bridge): Circle CCTP as a second route for USDC - #130
Closed
Vasanthdev2004 wants to merge 2 commits into
Closed
Vasanthdev2004 wants to merge 2 commits into
Vasanthdev2004 wants to merge 2 commits into
Conversation
USDC to USDC into Base or Arc is now quoted through Circle's CCTP v2 as well as Relay, and the panel offers whichever delivers more. Every other route is Relay alone, unchanged. - One wallet transaction: depositForBurnWithHook on the pinned TokenMessengerV2, Fast finality (Standard from Arc), zero destination caller and Circle's forwarding hook, so Circle mints on the destination with no second step and no destination gas. - The fee is Circle's published rate plus the high forwarding tier, bounded on the server and re-checked under the 5% ceiling in the browser, which rebuilds the burn calldata byte for byte before the wallet is asked. - Status reads Circle's message record by source transaction and only accepts one naming this wallet, amount, token, route, finality and hook. A burn the wallet never returned is found from the messenger's own event after the saved source block. - Approvals accept Circle's messenger as the only other spender; Relay records and keys are unchanged. Recovery records for Circle are version 4. - The dialog, history board and /bridge page name the provider in use. - Tests cover the calldata, event, fee bounds, quote selection, status mapping against a real Circle record, storage and approvals. An opt-in live test quotes all eight routes and matches a real forwarded burn.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 10, 2026
Collaborator
Author
|
Closed in favour of #135, which holds the whole bridge update in one PR. The commits from this PR are in it unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 of the bridge update. Stacked on #126 (bridge, then buy); the base branch retargets as the lower PRs merge.
What it does
USDC to USDC into Base or Arc is now quoted through Circle CCTP v2 as well as Relay. Both quotes are requested together and the panel offers whichever delivers more. Every other route is Relay alone, unchanged. Relay stays the primary provider.
depositForBurnWithHookon Circle's TokenMessengerV20x28b5…cf5d. The contract has the same address on Ethereum, Optimism, Arbitrum, Base and Arc.maxFee.maxFee. Every live forwarded burn checked hadfeeExecutedequal tomaxFee./api/bridge/status?provider=cctp&…reads Circle's message record. It accepts the record only when it names this wallet as sender and recipient, plus this amount, token, route, finality and hook.DepositForBurnevent after the saved source block. It is adopted only when exactly one burn matches.Live cost, 2026-11-10 (USDC, Relay loss / Circle fee)
docs/bridge.md.Changes
lib/bridge/cctp.ts(new, pure, client-safe): pinned contracts and domains, route rules, burn calldata, fee read-back and event match.lib/bridge/cctp-server.ts(new, server-only):relay.ts:getBridgeQuoteasks both providers on Circle routes and keeps the larger output.readBridgeJsonmoves toread-json.ts, still re-exported.client.ts:validateCctpQuote;providerandsourceBlock;bridgeStatusUrl,findCctpBurn.approval.ts: Circle's messenger is the only spender allowed besides Relay's depository. Relay records and keys are unchanged.useBridge.ts:bridgeStatusUrl;BridgeDialog,BridgeHistory,/bridgepage: provider-aware copy. No em dashes.history.ts: rows carryprovider./ui-review-bridge: a "quote from: Circle" toggle for the quote, pending and arrived scenes, and a Circle history row.docs/bridge.md: "Circle CCTP (2026-11-10)".Not built
receiveMessage) when Circle's forward stalls. The transfer shows Delayed and tracking continues.Verification
RUN_BRIDGE_LIVE_TESTS=1,cctp.live.test.ts):0x0095…ce01) against this bridge's own calldata;tscand eslint are clean./ui-review-bridgeCircle scenes on desktop and phone widths.