Skip to content

feat: route CoW partner fee to market COLLECTOR address#2934

Merged
mgrabina merged 2 commits intomainfrom
feat/cow-partner-fee-per-market
Apr 14, 2026
Merged

feat: route CoW partner fee to market COLLECTOR address#2934
mgrabina merged 2 commits intomainfrom
feat/cow-partner-fee-per-market

Conversation

@mgrabina
Copy link
Copy Markdown
Contributor

Summary

  • CoW Swap partner fee recipient was hardcoded to a single address (COW_EVM_RECIPIENT) for all markets
  • Each Aave market has its own COLLECTOR contract, so fees should route to the correct one
  • COW_PARTNER_FEE and COW_APP_DATA now take a required CustomMarket param, resolve the COLLECTOR from marketsData, and fall back to COW_EVM_RECIPIENT when no COLLECTOR is configured (e.g. Ink)

Test plan

  • Verify a swap quote on Ethereum Core market includes 0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c as partner fee recipient
  • Verify a swap quote on Ethereum Horizon market includes 0x70CC725B8f05e0f230B05C4e91ABc651E121354f as partner fee recipient
  • Verify a swap on Arbitrum includes 0x053D55f9B5AF8694c503EB288a1B7E552f590710
  • Verify adapter flows (collateral swap, debt swap, repay with collateral) also use the correct COLLECTOR

The partner fee recipient was hardcoded to a single address for all
markets. Each market has its own COLLECTOR contract, so fees should
go to the correct one based on which market the user is operating in.

COW_PARTNER_FEE and COW_APP_DATA now take a required CustomMarket
param and resolve the COLLECTOR from marketsData. Falls back to
COW_EVM_RECIPIENT when no COLLECTOR is configured.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
interface Ready Ready Preview, Comment Apr 13, 2026 3:22pm

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cabc86b99e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/transactions/Swap/hooks/useSwapQuote.ts
@github-actions
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for aave-ui

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

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 1.15 MB (🟢 -487 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 67.05 KB (🟡 +1.57 KB) 1.22 MB
/404 2.87 KB (🟡 +3 B) 1.15 MB
/500 3.2 KB (🟡 +5 B) 1.15 MB
/bridge 29.03 KB (🟡 +3 B) 1.18 MB
/dashboard 56.95 KB (🟡 +1.65 KB) 1.21 MB
/faucet 15.21 KB (🟢 -3 B) 1.17 MB
/governance 81.21 KB (🟡 +2.72 KB) 1.23 MB
/governance/ipfs-preview 101.97 KB (🟡 +3 B) 1.25 MB
/governance/v3/proposal 125.38 KB (🟡 +2.81 KB) 1.27 MB
/history 36.11 KB (🟢 -40 B) 1.19 MB
/markets 39.26 KB (🟢 -1.05 KB) 1.19 MB
/reserve-overview 26.84 KB (🟡 +2.73 KB) 1.18 MB
/safety-module 32.15 KB (🟡 +2.47 KB) 1.18 MB
/sgho 89.97 KB (🟡 +1.88 KB) 1.24 MB
/staking 33.7 KB (🟢 -81 B) 1.18 MB
/v3-migration 36.68 KB (-3 B) 1.19 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Same-chain market switches (e.g. Core vs Horizon on Ethereum) could
reuse a cached quote with the wrong partner fee recipient. Adding
currentMarket to the query key forces cache separation per market.

Also adds currentMarket to the useEffect dependency arrays in the
adapter action components so the instance address recomputes when
the market changes.
@github-actions
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for aave-ui

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

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 1.15 MB (🟢 -482 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 67.05 KB (🟡 +1.57 KB) 1.22 MB
/404 2.87 KB (🟡 +3 B) 1.15 MB
/500 3.2 KB (🟡 +5 B) 1.15 MB
/bridge 29.03 KB (🟡 +3 B) 1.18 MB
/dashboard 56.95 KB (🟡 +1.65 KB) 1.21 MB
/faucet 15.21 KB (🟢 -3 B) 1.17 MB
/governance 81.21 KB (🟡 +2.72 KB) 1.23 MB
/governance/ipfs-preview 101.97 KB (🟡 +3 B) 1.25 MB
/governance/v3/proposal 125.38 KB (🟡 +2.81 KB) 1.27 MB
/history 36.11 KB (🟢 -40 B) 1.19 MB
/markets 39.26 KB (🟢 -1.05 KB) 1.19 MB
/reserve-overview 26.84 KB (🟡 +2.73 KB) 1.18 MB
/safety-module 32.15 KB (🟡 +2.47 KB) 1.18 MB
/sgho 89.97 KB (🟡 +1.88 KB) 1.24 MB
/staking 33.7 KB (🟢 -81 B) 1.18 MB
/v3-migration 36.68 KB (-3 B) 1.19 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@mgrabina mgrabina merged commit d808e54 into main Apr 14, 2026
26 of 27 checks passed
@mgrabina mgrabina deleted the feat/cow-partner-fee-per-market branch April 14, 2026 15:24
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