Skip to content

Update and rename batch-auctions.md to fair-combinatorial-auction.md #504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acanidio-econ
Copy link
Contributor

@acanidio-econ acanidio-econ commented Jun 2, 2025

changed from batched auction to fair combinatorial auction

Summary by CodeRabbit

  • Documentation
    • Removed the documentation on batch auctions in the CoW Protocol.
    • Added new documentation explaining the fair combinatorial auction mechanism, including its benefits such as MEV protection, peer-to-peer swaps, and fairness in order settlement.

changed from batched auction to fair combinatorial auction
@acanidio-econ acanidio-econ requested a review from a team as a code owner June 2, 2025 08:50
Copy link

vercel bot commented Jun 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ❌ Failed (Inspect) Jun 2, 2025 9:08am

Copy link

coderabbitai bot commented Jun 2, 2025

Walkthrough

The documentation for the CoW Protocol was updated by removing the outdated "Batch Auctions" introduction and adding a new document explaining the "Fair Combinatorial Auction" mechanism. The new documentation describes how the protocol now aggregates intents and settles them using a fair combinatorial auction process.

Changes

Files Changed Summary
docs/cow-protocol/concepts/introduction/batch-auctions.md Removed outdated documentation about batch auctions.
docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md Added new documentation detailing the fair combinatorial auction mechanism.

Possibly related issues

Poem

In the warren of docs, a change took root,
Old batch auctions hopped away, silent and mute.
Now combinatorial fairness leaps into view,
With surplus and swaps, all shiny and new.
Rabbits rejoice—let the surplus accrue!
🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between dd008ac and 6601741.

📒 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 a title or sidebar_label field is required for navigation).


5-5: Ensure header and frontmatter title match.

The top-level heading (# Fair Combinatorial Auction) should correspond exactly to any title defined 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”).

Comment on lines +9 to +10
The protocol filters our ``unfair'' batched bids, which are those delivering less to an order than some available "non-batched" bids. It then selects the combination of winning bids that maximizes the surplus received by the orders that are part of the auction (subject to some computational constraints due to the combinatorial nature of the problem).

Copy link

@coderabbitai coderabbitai bot Jun 2, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in text (“filters our” → “filters out”).

The sentence currently reads “The protocol filters our unfair batched bids…”. It should be:

The protocol filters out `unfair` batched bids…
🤖 Prompt for AI Agents
In docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md around
lines 9 to 10, fix the typo by changing "filters our" to "filters out" so the
sentence correctly reads "The protocol filters out `unfair` batched bids…".

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, this needs correcting.

Copy link

Choose a reason for hiding this comment

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

@pretf00d Thanks for confirming! I'll plan the fix for this typo.

Task: Fix typo in fair-combinatorial-auction.md

  • Change "filters our" to "filters out" on line 9

⏳ Preparing changes...

Copy link

Choose a reason for hiding this comment

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

A summary of the edits CodeRabbit can apply:

Fix typo in fair-combinatorial-auction.md by changing "filters our" to "filters out" on line 9.

A plan of each step that CodeRabbit will take in order to execute the edits for each file (with inline rough draft snippets):

✏️ docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md

Locate line 9 in the file which currently reads: "The protocol filters our ``unfair'' batched bids, which are those delivering less to an order than some available "non-batched" bids. It then selects the combination of winning bids that maximizes the surplus received by the orders that are part of the auction (subject to some computational constraints due to the combinatorial nature of the problem)."


Replace the word "our" with "out" in the phrase "filters our" so it becomes "filters out". The corrected line should read: "The protocol filters out ``unfair'' batched bids, which are those delivering less to an order than some available "non-batched" bids. It then selects the combination of winning bids that maximizes the surplus received by the orders that are part of the auction (subject to some computational constraints due to the combinatorial nature of the problem)."


Verify that only the single word "our" has been changed to "out" and that all other text, punctuation, and formatting remains exactly the same.

  • ✅ Create PR with these edits
  • 📌 Create commit in current branch
  • 📋 Get copyable edits

Comment on lines +15 to +18
- [**MEV Protection**](../benefits/mev-protection): Batch auctions allow for Uniform Clearing Prices (UCPs), where an asset that appears multiple times across orders in the same batch settles for a consistent price.
This makes transaction order irrelevant within the block, undermining the ability for MEV bots to extract value.
- **[Coincidence of Wants](../how-it-works/coincidence-of-wants)**: When multiple orders trade the same assets within a batch, there may be an opportunity for a peer-to-peer swap that doesn't tap on-chain liquidity, which a solver could exploit by submitting a batched bid.
- **Fairness**: Ensuring that each order receives as much as it would have received had that order been auctioned off alone.
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Align bullet content with “Fair Combinatorial Auction”.

The benefits still reference “Batch auctions” and “within a batch,” which conflicts with the new mechanism name. Please update the text to refer to “combinatorial auctions” (or “fair combinatorial auction”) consistently. For example:

- - [**MEV Protection**](../benefits/mev-protection): Batch auctions allow for Uniform Clearing Prices …
+ - [**MEV Protection**](../benefits/mev-protection): Combinatorial auctions allow for Uniform Clearing Prices …

- - **[Coincidence of Wants](../how-it-works/coincidence-of-wants)**: When multiple orders trade the same assets within a batch, …
+ - **[Coincidence of Wants](../how-it-works/coincidence-of-wants)**: When multiple orders trade the same assets in the combinatorial auction, …

- - **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 what it would have secured if auctioned individually.
📝 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.

Suggested change
- [**MEV Protection**](../benefits/mev-protection): Batch auctions allow for Uniform Clearing Prices (UCPs), where an asset that appears multiple times across orders in the same batch settles for a consistent price.
This makes transaction order irrelevant within the block, undermining the ability for MEV bots to extract value.
- **[Coincidence of Wants](../how-it-works/coincidence-of-wants)**: When multiple orders trade the same assets within a batch, there may be an opportunity for a peer-to-peer swap that doesn't tap on-chain liquidity, which a solver could exploit by submitting a batched bid.
- **Fairness**: Ensuring that each order receives as much as it would have received had that order been auctioned off alone.
- [**MEV Protection**](../benefits/mev-protection): Combinatorial auctions allow for Uniform Clearing Prices (UCPs), where an asset that appears multiple times across orders in the same batch settles for a consistent price.
This makes transaction order irrelevant within the block, undermining the ability for MEV bots to extract value.
- **[Coincidence of Wants](../how-it-works/coincidence-of-wants)**: When multiple orders trade the same assets in the combinatorial auction, there may be an opportunity for a peer-to-peer swap that doesn't tap on-chain liquidity, which a solver could exploit by submitting a batched bid.
- **Fairness**: Ensuring that each order receives at least what it would have secured if auctioned individually.
🤖 Prompt for AI Agents
In docs/cow-protocol/concepts/introduction/fair-combinatorial-auction.md around
lines 15 to 18, the bullet points incorrectly refer to "Batch auctions" and
"within a batch," which conflicts with the new mechanism name "Fair
Combinatorial Auction." Update all mentions of "Batch auctions" and related
phrases to "Combinatorial auctions" or "Fair Combinatorial Auction" to maintain
consistent terminology throughout the section.

Copy link
Contributor

@pretf00d pretf00d left a comment

Choose a reason for hiding this comment

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

one typo needs correcting.

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.

2 participants