Skip to content

Remove Family price proxy from CoW swap pricing - #3166

Merged
mgrabina merged 1 commit into
mainfrom
remove-family-price-proxy
Nov 3, 2026
Merged

mgrabina merged 1 commit into
mainfrom
remove-family-price-proxy

Conversation

@mgrabina

@mgrabina mgrabina commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

What to review

  1. rates.helpers.ts: getCowProtocolSellRates now prices both tokens with CoWProtocolPricesService directly. The Family-first getTokenUsdPrice helper is gone.
  2. useSwapQuote.ts and quote.types.ts: drop isInputTokenCustom / isOutputTokenCustom, which only decided whether to skip Family.
  3. Deletions: FamilyPricesService.ts, pages/api/prices-proxy.ts and its .md, and FAMILY_API_* in .env.example and .env.development.

Why

Family's backend is being deprecated. The interface only used it for token USD prices in CoW swap quotes, with CoW's bff.cow.fi endpoint as the fallback (and already the only source on testnets, forks and custom tokens).

I compared Family (via /api/prices-proxy), CoW and the Aave oracle across every reserve underlying and aToken on the CoW chains, plus the swap token list:

Total Family CoW
Reserve underlyings 207 165 191
Reserve aTokens 223 76 172
Token list 747 534 574
  • No Aave reserve loses its price. 9 long-tail token-list tokens are priced by Family alone (ADX, BOBA on Polygon; OCEAN, SNT, SOCKS, UMA on Arbitrum; agEUR, CTSI, ZRX on Avalanche), and swaps on those will show "No price found".
  • Where the two disagree on a reserve, CoW matches the oracle and Family doesn't: aBasweETH (Family $420, oracle $2,523), aBasGHO (Family $1.76), aAvaSAVAX (12% low). Non-flashloan collateral swaps price aTokens, so this also fixes their USD values and price-impact warnings.
  • Some instance-market aTokens (Lido, Horizon, EtherFi, Ink) are missing or mispriced by both sources. That's unchanged here and needs a separate fix.

Testing

tsc --noEmit and pnpm lint pass.

After merge

Remove FAMILY_API_KEY and FAMILY_API_URL from the Vercel project env.

CoW swap quotes now take token USD prices only from CoW's price endpoint
(bff.cow.fi), which was already the fallback. Family's backend is being
deprecated, and across Aave reserves on CoW chains CoW prices every token
Family does and sits closer to the Aave oracle where the two disagree.

Drops FamilyPricesService, the /api/prices-proxy route, the FAMILY_API_*
env vars, and the custom-token flags that only gated the Family call.
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
interface Ready Ready Preview Nov 3, 2026 2:02pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T13:58:57.322324Z 405022f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@mgrabina
mgrabina merged commit d86c999 into main Nov 3, 2026
20 of 22 checks passed
@mgrabina
mgrabina deleted the remove-family-price-proxy branch November 3, 2026 14:25

This branch was successfully deployed

1 active deployment
Preview — 405022f4 Deployed Nov 3, 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.

3 participants