Skip to content

feat(providers): add zap2, the Rust zapper, as a quote source - #55

Open
jgalat wants to merge 1 commit into
mainfrom
feat/zap2-provider
Open

jgalat wants to merge 1 commit into
mainfrom
feat/zap2-provider

Conversation

@jgalat

@jgalat jgalat commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds zap2, the Rust zapper, as a quote provider (2.12.0, on top of the 1inch release 2.11.0).

  • Quoted through the Reserve API's api/zapper2/{chain}/swap proxy with the same query string and response contract as zap, so it uses the same zapperApiUrl. src/types/api.ts takes a service slug for the native URL builder; src/utils/providers.ts adds the provider (label "Zap v2", Bolt icon), enabled on Ethereum, Base and BSC (the Rust zapper does not serve Arbitrum).
  • zap2 competes like an outside venue: compareQuotes and pickBestQuote keep their zap-only tie-break, documented as deliberate.
  • ProviderId gains 'zap2'; hosts building exhaustive Record<ProviderId, …> maps need the new key (hence the minor bump). The route list, tracking and Mixpanel ids pick it up automatically.
  • Demo: zapperApiUrl dropdown gains the staging API. README and CHANGELOG updated.

Verification

  • pnpm test 17 files / 96 green, pnpm build (type check) and pnpm lint green.
  • New tests/zap2-provider.test.tsx: the endpoint is api/zapper2/1/swap with the same query keys as zap and its transaction executes; a better minAmountOut wins the round next to the zap row; an equal minAmountOut goes to zap, proving no tie preference.
  • The live Zap v2 row needs reserve-protocol/reserve-api feat/zapper2-proxy-zrs1-prices deployed to staging; until then the row errors on api-staging (404 on api/zapper2).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deploying react-zapper with  Cloudflare Pages  Cloudflare Pages

Latest commit: 801a851
Status: ✅  Deploy successful!
Preview URL: https://f0f66b35.react-zapper.pages.dev
Branch Preview URL: https://feat-zap2-provider.react-zapper.pages.dev

View logs

Quoted through the reserve-api api/zapper2/{chain}/swap proxy with the
same query and response contract as zap. Enabled on Ethereum, Base and
BSC; competes like an outside venue with no tie-break preference.
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