Summary
Replace the currently informational bridge page (a static step-by-step guide to using CCTP manually) with an integrated cross-chain USDC deposit bridge so users can fund a pool from an external chain without leaving the app.
The existing page at frontend/app/[locale]/bridge/page.tsx only renders explanatory CCTP/Stellar-USDC steps — it performs no on-chain or wallet actions.
Requirements
- Chain/token selector — pick source chain (Ethereum, Base, Arbitrum, Optimism, Polygon) and confirm USDC amount to bridge.
- CCTP contract integration — call Circle's CCTP
depositForBurn from a Solana/stellar-aware wallet (or via a relayer/API) on the source chain, and verify MessageSent events.
- Attestation polling — poll Circle's Attestation Service until
complete, then submit receiveMessage on Stellar to mint USDC.
- Pool deposit hand-off — after funds arrive, prefill or trigger the existing deposit flow (
/api/pools/deposit) so the bridged USDC lands in the user's pool.
- Status tracking — persist bridge transactions in Supabase so the UI shows progress (pending → attested → received → deposited) and survives page refresh.
- Error + refund handling — surface instantaneous
Failure attestation statuses and link to Circle's block-explorer refund flow.
Notes / context
- The Stellar side of CCTP uses the Circle Mint/Redeem anchor; USDC arrives on Stellar as the native USDC asset.
- Reuse the existing
web3-provider and the frontend/lib/csv-export.ts-style pure-logic convention where possible; keep wallet/network code testable behind a thin seam.
- Add unit tests for the attestation-state machine (pending → complete/failure) and the amount/rounding/balance logic, following
frontend/lib/deposit-calendar.test.ts conventions.
Acceptance criteria
Summary
Replace the currently informational
bridgepage (a static step-by-step guide to using CCTP manually) with an integrated cross-chain USDC deposit bridge so users can fund a pool from an external chain without leaving the app.The existing page at
frontend/app/[locale]/bridge/page.tsxonly renders explanatory CCTP/Stellar-USDC steps — it performs no on-chain or wallet actions.Requirements
depositForBurnfrom a Solana/stellar-aware wallet (or via a relayer/API) on the source chain, and verifyMessageSentevents.complete, then submitreceiveMessageon Stellar to mint USDC./api/pools/deposit) so the bridged USDC lands in the user's pool.Failureattestation statuses and link to Circle's block-explorer refund flow.Notes / context
web3-providerand thefrontend/lib/csv-export.ts-style pure-logic convention where possible; keep wallet/network code testable behind a thin seam.frontend/lib/deposit-calendar.test.tsconventions.Acceptance criteria