Skip to content

EVM chains into Arc; Stellar exchange deposit (M...) addresses - #314

Open
ezedike-evan wants to merge 4 commits into
devfrom
evm-to-arc-and-muxed
Open

ezedike-evan wants to merge 4 commits into
devfrom
evm-to-arc-and-muxed

Conversation

@ezedike-evan

Copy link
Copy Markdown
Contributor

1. EVM chains into Arc

Only the build-time flag NEXT_PUBLIC_ARC_RECEIVES_FROM keeps these off (unset in production). Route list, quote, build, form and SEO pages already handle it: Circle burn with the forwarding hook to domain 26, Xebra fee 0.01% + 0.01 USDC as its own transfer to the EVM fee address, Fast where the source has it.

  • evm-to-arc.test.ts (5): 577 EVM routes today (matches live /v1); all adds 24 -> live total 655 -> 679. Base -> Arc quote fee never zero; refused while the flag is off; build = approve, burn (domain 26, open caller, finality per speed, maxFee = delivery + Fast fee), fee transfer.
  • Docs: README, docs/deploying.md, .env.production.example.
  • To switch on: set NEXT_PUBLIC_ARC_RECEIVES_FROM=all on Vercel production and redeploy, after a 1 USDC Base -> Arc proof.

2. Stellar muxed M... recipients

Circle's Stellar CctpForwarder hook carries the recipient strkey as UTF-8 and accepts G, M or C (Circle's CCTP Stellar reference). So exchange deposit addresses can receive directly.

  • SDK sui-stellar.ts: M accepted, carried whole (69 chars) so the deposit id arrives; verifyMessage reads it back; stellarAccountOf gives the G behind an M. OpenAPI regenerated.
  • cctp-evm checkStellarHook: 56 (G/C) or 69 (M), still refuses padded/mislabelled hooks.
  • One shared helper apps/web/lib/stellar-recipient.ts used by /v1 build, Aptos, Solana, /api/sui-stellar/build, the relayer (recipientStatus, planClaim, completeBurn). Trustline checks run on the underlying G; C still refused into Stellar; senders stay G-only.
  • Forms (EVM -> Stellar, Solana, Aptos, Sui) accept M and show "Exchange deposit address: account G…, deposit id …" before the burn.
  • Tests: SDK 382/382, cctp-evm 34/34, new web tests for muxed recipients and the helper.

Before telling people: prove one M delivery on mainnet (an M made from your own funded G, e.g. Sui -> Stellar ~0.10 USDC) and check the payment shows the muxed id.

Conflicts with #312

3 small ones, keep both sides: service.ts (Stellar recipient block vs new Sui branch), evm-stellar-panel.tsx (4 spots), packages/sdk/src/build/evm.ts (doc comment).

Verification: typecheck web/sdk/cctp-evm clean; biome 0 errors. Web suite 1009 pass; 4 timeouts in auth/endpoints tests under heavy load (64/64 alone). No browser run, no real transfer.

🤖 Generated with Claude Code

… speeds

EVM -> Arc was off only because NEXT_PUBLIC_ARC_RECEIVES_FROM is unset in
production; the route, quote and build code already handle it. Tests pin
the route count (577 EVM routes today, +24 with the flag at all), Xebra's
0.01% + 0.01 flat fee, Fast where the source chain has it, and the Base ->
Arc burn (domain 26, recipient, finality, fee transfer). Docs say how to
switch it on.
Circle's Stellar CctpForwarder pays G, C and M strkeys named in the hook
(developers.circle.com/cctp/references/stellar). isStellarRecipient now
takes M addresses, the hook carries the 69-character text whole,
verifyMessage reads it back, and stellarAccountOf gives the G account
whose trustline counts. The EVM encoder's hook frame check takes 56 or 69
characters. Tests: valid and broken M, hook round trip, a whole burn
message, the EVM encoder; G and C unchanged.
/v1 builds, the Sui, Solana and Aptos builds and the relayer took G...
only. They now take a muxed M... address too: the hook names it whole so
the exchange's deposit id arrives, and the trustline check runs on the
G... account it belongs to (the relayer's recipientStatus resolves it
too). A refusal names that G... account and points at the exchange.
Contracts stay refused. One wording for all of it in lib/stellar-recipient.
…sit id

The EVM, Solana, Aptos and Sui forms accepted G... only. They now accept
an M... deposit address, and the hint under the field spells out the
account the USDC lands in and the deposit id, so a wrong id shows before
anything is burned.
@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
xebra Error Error Nov 28, 2026 2:20pm UTC
xebra-docs Ready Ready Preview Nov 28, 2026 2:20pm UTC

This branch had an error being deployed

1 failed deployment
Preview – xebra — cb477beb Deployed Nov 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant