Update and rename batch-auctions.md to fair-combinatorial-auction.md - #504
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughReplaced the "Batch Auctions" doc with a new "Fair Combinatorial Batch Auction" page, updated multiple docs and redirects to point to the new page, refined MEV/uniform pricing wording and solver execution language, and added a dev dependency install step to an npm script. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Trader as Trader
participant Aggregator as Off‑chain Aggregator
participant Solver as Solver
participant Protocol as On‑chain Protocol
rect rgb(230,240,255)
Note over Trader,Aggregator: Intent collection (off‑chain)
Trader->>Aggregator: Submit intents/orders
Aggregator->>Solver: Publish aggregated intents
end
rect rgb(240,255,230)
Note over Solver: Combinatorial bidding
Solver->>Solver: Build individual & batched bids
Solver->>Aggregator: Submit bids
end
rect rgb(255,245,230)
Note over Aggregator: Filtration & winner selection
Aggregator->>Aggregator: Filter unfair batched bids
Aggregator->>Aggregator: Select winning combo (maximize surplus, fairness constraints)
end
rect rgb(245,245,245)
Note over Aggregator,Protocol: Settlement proposal & execution
Aggregator->>Protocol: Propose settlement + uniform directed clearing prices
Protocol->>Protocol: Execute settlement transactions on‑chain
Protocol-->>Trader: Finalize order settlements
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md (2)
7-8: Reduce repetition in the first paragraph.The phrase “each solver can submit multiple bids” appears twice. Consider merging or rephrasing to improve readability.
13-14: Correct verb agreement.Change “The fair combinatorial auction provide several benefits:” to “The fair combinatorial auction provides several benefits:”.
🧰 Tools
🪛 LanguageTool
[grammar] ~13-~13: The verb form ‘provide’ does not appear to fit in this context.
Context: ...h-auctions.png) The fair combinatorial auction provide several benefits: - [*MEV Protection...(SINGULAR_NOUN_VERB_AGREEMENT)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/cow-protocol/concepts/introduction/batch-auctions.md(0 hunks)docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md(1 hunks)
💤 Files with no reviewable changes (1)
- docs/cow-protocol/concepts/introduction/batch-auctions.md
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md
[grammar] ~13-~13: The verb form ‘provide’ does not appear to fit in this context.
Context: ...h-auctions.png) The fair combinatorial auction provide several benefits: - [*MEV Protection...
(SINGULAR_NOUN_VERB_AGREEMENT)
🔇 Additional comments (3)
docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md (3)
1-3: Verify frontmatter completeness and consistency.The frontmatter only includes
sidebar_position. Please confirm that this aligns with the repository’s frontmatter conventions (e.g., whether atitleorsidebar_labelfield is required for navigation).
5-5: Ensure header and frontmatter title match.The top-level heading (
# Fair Combinatorial Auction) should correspond exactly to anytitledefined in the frontmatter (if added). This consistency helps prevent navigation or indexing mismatches.
11-11: Validate image path and alt text.The image reference still uses
batch-auctions.png. Confirm that the asset exists under this path or whether it should be renamed to reflect the new “fair-combinatorial-auction” context. Also consider updating the alt text from “The Auctions” to something more descriptive (e.g., “Fair Combinatorial Auction Mechanism”).
pretf00d
left a comment
There was a problem hiding this comment.
one typo needs correcting.
pretf00d
left a comment
There was a problem hiding this comment.
The official language around the change is FCBA or Fair Combinatorial Batch Auction - it's important to preserve 'batch'
|
|
||
| The fair combinatorial auction provide several benefits: | ||
|
|
||
| - [**MEV Protection**](../benefits/mev-protection): Fair combinatorial auctions allow for Uniform Directing Clearing Prices (UDP), where a directed asset pair that appears multiple times across orders in the same auction settles for a consistent price. |
There was a problem hiding this comment.
Is this not Uniform Delivered Clearing Prices?
There was a problem hiding this comment.
There is a typo, but no, it is Uniform Directed Clearing Prices (i wrote "directing")
pretf00d
left a comment
There was a problem hiding this comment.
Have left a comment on one of these.
changed from batched auction to fair combinatorial auction
147cfc0 to
98bd75a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (11)
docs/README.md (1)
14-14: Terminology aligns; consider updating “example: batch auctions” later in file.The new link is correct. For consistency, also change “example: batch auctions” (Line 32) to “example: fair combinatorial auctions.”
- - **_What_** something is (example: batch auctions) → see [Concepts](/category/concepts) + - **_What_** something is (example: fair combinatorial auctions) → see [Concepts](/category/concepts)docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md (4)
5-5: Align title with filename/terminology.File is “fair-combinatorial-auction.md” but the H1 says “Fair Combinatorial Batch Auction.” Pick one and use it repo‑wide; recommend dropping “Batch” here.
-# Fair Combinatorial Batch Auction +# Fair Combinatorial Auction
11-11: Alt text and asset name mismatch with new term.Optional: rename alt text to reflect the new concept; keep image file name as-is if reused elsewhere.
- +
15-15: Confirm “Uniform Directed Clearing Prices (UDP)” term.There’s prior confusion between “Directed” vs “Delivered.” Please verify the canonical term used in CoW docs, then update consistently across pages.
17-17: Tighten the fairness definition (“at least as much”).Reflects the guarantee more precisely.
-**Fairness**: Ensuring that each order receives as much as it would have received had that order been auctioned off alone. +**Fairness**: Ensuring that each order receives at least as much as it would have received had it been auctioned alone.docs/cow-protocol/concepts/how-it-works/flow-of-an-order.md (1)
17-17: Update anchor text for consistency.Keep “batch” where it describes grouping, but avoid the legacy term “batch auction” in link text.
-2. The protocol gathers the intents of multiple users into a [batch auction](../introduction/fair-combinatorial-auction). +2. The protocol gathers the intents of multiple users into a [fair combinatorial auction](../introduction/fair-combinatorial-auction).docs/cow-protocol/tutorials/arbitrate/solver/driver.md (1)
97-97: Grammar + term consistency.Simplify “is able to” and drop “batch” for consistency with the new page name.
-The user is able to create a flash loan order's hint by attaching to the `appData` the specified metadata. The autopilot reads the order and cuts it into a [fair combinatorial batch auction](../../../concepts/introduction/fair-combinatorial-auction). Then the driver fetches the `appData` by calling the orderbook with `GET /v1/app_data/<app_data_hash>` for every order and caches them in memory. The driver should include the flash loan information into the batch auction's order before sending it to the solver(s). +The user can create a flash loan order hint by attaching the specified metadata to the `appData`. The autopilot reads the order and includes it in a [fair combinatorial auction](../../../concepts/introduction/fair-combinatorial-auction). Then the driver fetches the `appData` by calling the orderbook with `GET /v1/app_data/<app_data_hash>` for every order and caches it in memory. The driver should include the flash loan information in the auction order before sending it to the solver(s).docs/cow-protocol/concepts/order-types/limit-orders.md (1)
19-19: Normalize terminology and fix pluralization.Use singular “intent-based” (matches Line 13) and pluralize DEX without an apostrophe. Also make “auction” singular to align with the target page’s title/slug.
-CoW Protocol's limit orders provide more flexibility and better prices than other DEX's thanks to the protocol's [intents-based execution](../introduction/intents) and [fair combinatorial batch auctions architecture](../introduction/fair-combinatorial-auction). +CoW Protocol's limit orders provide more flexibility and better prices than other DEXes thanks to the protocol's [intent-based execution](../introduction/intents) and [fair combinatorial auction architecture](../introduction/fair-combinatorial-auction).docs/cow-protocol/concepts/how-it-works/protocol-vs-swap.md (1)
13-13: Align term with destination page and tighten wording.Prefer singular “fair combinatorial auction” to match the linked page; sentence reads cleaner.
-CoW Protocol is a trading protocol that leverages [intents](../introduction/intents) and [fair combinatorial batch auctions](../introduction/fair-combinatorial-auction) to find optimal prices and protect orders from Maximal Extractable Value (MEV). +CoW Protocol is a trading protocol that leverages [intents](../introduction/intents) and a [fair combinatorial auction](../introduction/fair-combinatorial-auction) to find optimal prices and protect orders from Maximal Extractable Value (MEV).docs/cow-protocol/concepts/benefits/mev-protection.md (2)
19-19: Tighten phrasing and expand acronym on first use here.Minor style edit; “in order to” → “to” and expand CoW on first mention in this section.
- Solvers are professional parties, so they calculate the optimal slippage for each trade and match liquidity off-chain through CoWs or private market makers when possible in order to reduce MEV risk. + Solvers are professional parties, so they calculate optimal slippage for each trade and, when possible, match liquidity off-chain through Coincidences of Wants (CoWs) or private market makers to reduce MEV risk.
13-15: Clarify uniform directed clearing price terminology and batch/block semanticsUse explicit directed pairs (e.g., ETH→USDC), parenthetically note single-block settlement, and streamline wording to remove redundancy:
- **Uniform Clearing Prices**: If the same token pair (such as ETH-USDC) is traded multiple times in the same [batch](../introduction/fair-combinatorial-auction), the assets will clear for the same market prices for each trade in the same direction. - This mechanism is called a "uniform directed clearing price" and it makes transaction order irrelevant, so MEV bots cannot re-order trades in order to extract a profit. - Uniform directed clearing prices enable the Ethereum DeFi ecosystem to establish consistent prices for identical directed token pairs within the same block, addressing the inconsistency caused by the design of Constant Function Market Makers (CFMMs) like traditional Uniswap liquidity pools. + **Uniform Clearing Prices**: If the same directed token pair (e.g., ETH→USDC) is traded multiple times in the same [batch](../introduction/fair-combinatorial-auction) (single-block settlement), all trades clear at the same market price. + This mechanism is called a “uniform directed clearing price” and makes transaction order irrelevant, so MEV bots cannot reorder trades to extract profit. + Uniform directed clearing prices establish consistent prices for identical directed token pairs within the same block, addressing inconsistencies inherent to Constant Function Market Makers (CFMMs) such as traditional Uniswap liquidity pools.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (10)
docs/README.md(1 hunks)docs/cow-protocol/README.mdx(1 hunks)docs/cow-protocol/concepts/benefits/additional-benefits.md(1 hunks)docs/cow-protocol/concepts/benefits/mev-protection.md(1 hunks)docs/cow-protocol/concepts/how-it-works/flow-of-an-order.md(1 hunks)docs/cow-protocol/concepts/how-it-works/protocol-vs-swap.md(1 hunks)docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md(1 hunks)docs/cow-protocol/concepts/order-types/limit-orders.md(1 hunks)docs/cow-protocol/tutorials/arbitrate/solver/driver.md(1 hunks)vercel.json(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- docs/cow-protocol/concepts/benefits/additional-benefits.md
- docs/cow-protocol/README.mdx
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/concepts/benefits/mev-protection.md
[style] ~14-~14: Consider a more concise word here.
Context: ...ant, so MEV bots cannot re-order trades in order to extract a profit. Uniform directed cl...
(IN_ORDER_TO_PREMIUM)
docs/cow-protocol/concepts/how-it-works/protocol-vs-swap.md
[grammar] ~13-~13: There might be a mistake here.
Context: ...introduction/fair-combinatorial-auction) to find optimal prices and protect orders ...
(QB_NEW_EN)
docs/cow-protocol/tutorials/arbitrate/solver/driver.md
[style] ~97-~97: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...blocker.io). ### Flash Loans The user is able to create a flash loan order's hint by att...
(BE_ABLE_TO)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
Deployment failed with the following error: |
|
I have read the CLA Document and I hereby sign the CLA 2 out of 3 committers have signed the CLA. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
package.json (2)
10-10: Consider avoiding repo mutation during builds.If feasible, switch cow-sdk’s codegen script to invoke the generator via a runner (e.g., yarn dlx or npx) and keep devDeps declared in cow-sdk. This avoids mid-build writes to package.json/yarn.lock under external/.
10-10: Declare codegen dependency in cow-sdk to preserve lockfile immutability
Your CI step mutates the lockfile by runningyarn addafter--frozen. Instead, addopenapi-typescript-codegen@0.29.0as a devDependency inexternal/cow-sdk/package.jsonso you can run a singleyarn install --frozen-lockfile.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
package.json(1 hunks)
| "git:clone:cowsdk": "cd external && rm -rf cow-sdk && git clone --depth=1 --branch=main https://github.com/cowprotocol/cow-sdk cow-sdk && rm -rf cow-sdk/.git", | ||
| "git:clone:appdata": "cd external && rm -rf app-data && git clone --depth=1 --branch=main https://github.com/cowprotocol/app-data app-data && rm -rf app-data/.git", | ||
| "build:external:cowsdk": "yarn git:clone:cowsdk && cd external/cow-sdk && yarn install --frozen --ignore-scripts && yarn codegen", | ||
| "build:external:cowsdk": "yarn git:clone:cowsdk && cd external/cow-sdk && yarn install --frozen --ignore-scripts && yarn add openapi-typescript-codegen@0.29.0 --dev && yarn codegen", |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Don’t run package lifecycle scripts during build; add --ignore-scripts to yarn add (or use -D).
You previously used --ignore-scripts on install for safety, but yarn add will execute scripts. Add --ignore-scripts here too and prefer -D for consistency.
- "build:external:cowsdk": "yarn git:clone:cowsdk && cd external/cow-sdk && yarn install --frozen --ignore-scripts && yarn add openapi-typescript-codegen@0.29.0 --dev && yarn codegen",
+ "build:external:cowsdk": "yarn git:clone:cowsdk && cd external/cow-sdk && yarn install --frozen --ignore-scripts && yarn add openapi-typescript-codegen@0.29.0 -D --ignore-scripts && yarn codegen",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "build:external:cowsdk": "yarn git:clone:cowsdk && cd external/cow-sdk && yarn install --frozen --ignore-scripts && yarn add openapi-typescript-codegen@0.29.0 --dev && yarn codegen", | |
| "build:external:cowsdk": "yarn git:clone:cowsdk && cd external/cow-sdk && yarn install --frozen --ignore-scripts && yarn add openapi-typescript-codegen@0.29.0 -D --ignore-scripts && yarn codegen", |
🤖 Prompt for AI Agents
In package.json around line 10, the "build:external:cowsdk" npm script runs
"yarn add openapi-typescript-codegen@0.29.0 --dev" which will execute package
lifecycle scripts; update the command to add the --ignore-scripts flag and
prefer the short dev flag (-D) for consistency (e.g., use "yarn add
openapi-typescript-codegen@0.29.0 -D --ignore-scripts"), ensuring the rest of
the pipeline (clone, install) remains unchanged.
|
I have read the CLA Document and I hereby sign the CLA |
changed from batched auction to fair combinatorial auction
Summary by CodeRabbit
Documentation
Chores