feat: route CoW partner fee to market COLLECTOR address#2934
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 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".
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe 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 If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Sixteen Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly 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 Any third party scripts you have added directly to your app using the 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.
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe 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 If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Sixteen Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly 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 Any third party scripts you have added directly to your app using the 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. |
Summary
COW_EVM_RECIPIENT) for all marketsCOW_PARTNER_FEEandCOW_APP_DATAnow take a requiredCustomMarketparam, resolve the COLLECTOR frommarketsData, and fall back toCOW_EVM_RECIPIENTwhen no COLLECTOR is configured (e.g. Ink)Test plan
0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18cas partner fee recipient0x70CC725B8f05e0f230B05C4e91ABc651E121354fas partner fee recipient0x053D55f9B5AF8694c503EB288a1B7E552f590710