Skip to content

Update rewards.md#499

Merged
harisang merged 4 commits intomainfrom
acanidio-econ-patch-12
Jul 7, 2025
Merged

Update rewards.md#499
harisang merged 4 commits intomainfrom
acanidio-econ-patch-12

Conversation

@acanidio-econ
Copy link
Contributor

@acanidio-econ acanidio-econ commented May 26, 2025

Changed the description of how rewards are calculated

Changed the discussion of solvers' optimal strategies (this needs some checking)

Summary by CodeRabbit

  • Documentation
    • Expanded and clarified the explanation of solver competition rewards, including a detailed description of the Vickrey–Clarke–Groves (VCG) style combinatorial auction mechanism.
    • Updated section title and included additional references to relevant CIPs.
    • Improved clarity on reward calculation, cap values, bidding strategies, and the impact of the reward cap on solver behavior.
    • Added concrete solver strategy recommendations and clarified the effects of truthful reporting and score adjustments on auction outcomes.

Changed the description of how rewards are calculated

Changed the discussion of solvers' optimal strategies (this needs some checking)
@acanidio-econ acanidio-econ requested a review from a team as a code owner May 26, 2025 13:53
@vercel
Copy link

vercel bot commented May 26, 2025

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jul 6, 2025 11:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 26, 2025

Warning

Rate limit exceeded

@harisang has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between be986cc and fb47143.

📒 Files selected for processing (1)
  • docs/cow-protocol/reference/core/auctions/rewards.md (3 hunks)

Walkthrough

The documentation for solver competition rewards in the Cow Protocol has been updated to clarify the auction mechanism, explicitly describe the Vickrey–Clarke–Groves (VCG) style combinatorial auction, refine the reward formula, and elaborate on bidding and reporting strategies. Additional details on cap values, chain-specific parameters, and strategic considerations are included.

Changes

File(s) Change Summary
docs/cow-protocol/reference/core/auctions/rewards.md Added CIP-67 to governing CIPs; expanded auction mechanism to VCG-style combinatorial auction; refined reward formula; replaced abstract bidding strategy with concrete solver strategy; clarified truthful reporting and cap effects; removed prior payoff formula and bidding optimization discussion

Possibly related PRs

  • Update README.mdx #496: Updates documentation on CoW Protocol’s combinatorial auction and solver solution selection, complementing this PR’s detailed VCG auction and solver strategy explanations.
  • Update competition_rules.md #498: Revises competition rules introducing uniform directional clearing prices and fair combinatorial auction concepts, related to this PR’s expanded solver competition rules and CIP-67 details.

Suggested reviewers

  • pretf00d

Poem

In the meadow of code, rewards take new shape,
With VCG auctions, no solver escapes!
Bunnies now ponder, with scores in their paws,
How to bid wisely and follow the laws.
Caps on the carrots, strategies anew—
May the cleverest bunny win, and the honest ones too!
🥕


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
Contributor

@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: 0

🧹 Nitpick comments (5)
docs/cow-protocol/reference/core/auctions/rewards.md (5)

21-21: Use “match” for clarity
Replace “must equal” with “must match” for clearer English.

- From the protocol's perspective, a solution executed on chain must equal the solver's initial commitment.
+ From the protocol's perspective, a solution executed on chain must match the solver's initial commitment.

25-29: Normalize the reward formula formatting
The inline formula block contains a trailing period and inconsistent spacing around the subtraction operators. Also, please verify that this formula exactly matches the specification in the relevant CIP (e.g., CIP-38).

- $$\textrm{payment}_i = \textrm{cap}(\textrm{TotalScore} - \textrm{referenceScore}_i-\textrm{missingScore}_i).$$
+ $$\textrm{payment}_i = \textrm{cap}\bigl(\textrm{TotalScore} - \textrm{referenceScore}_i - \textrm{missingScore}_i\bigr)$$

31-31: Tighten spacing around math blocks
There's an extra space before the second math block marker. Consider removing it for consistency.

- Finally, $$\textrm{referenceScore}_i$$ is the  $$\textrm{TotalScore}$$ of a counterfactual auction...
+ Finally, $$\textrm{referenceScore}_i$$ is the $$\textrm{TotalScore}$$ of a counterfactual auction...

58-58: Consider refactoring into bullet points
This long paragraph describes a multi-step process. Converting it into a numbered or bulleted list would improve readability and help solvers follow each step.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~58-~58: The preposition ‘of’ seems more likely in this position.
Context: ...ing batched solutions containing orders on different directed token pairs. These a...

(AI_HYDRA_LEO_REPLACE_ON_OF)


64-64: Reduce weak intensifier
Consider replacing “very large” with “significantly large” or “substantially large” to strengthen prose.

- if the difference between the best and second-best solution is very large
+ if the difference between the best and second-best solution is significantly large
🧰 Tools
🪛 LanguageTool

[style] ~64-~64: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...en the best and second-best solution is very large, then the winning solver wins more when...

(EN_WEAK_ADJECTIVE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97265be and 994dfb4.

📒 Files selected for processing (1)
  • docs/cow-protocol/reference/core/auctions/rewards.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/reference/core/auctions/rewards.md

[uncategorized] ~58-~58: The preposition ‘of’ seems more likely in this position.
Context: ...ing batched solutions containing orders on different directed token pairs. These a...

(AI_HYDRA_LEO_REPLACE_ON_OF)


[style] ~64-~64: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...en the best and second-best solution is very large, then the winning solver wins more when...

(EN_WEAK_ADJECTIVE)

🔇 Additional comments (8)
docs/cow-protocol/reference/core/auctions/rewards.md (8)

7-7: Verify CIP link consistency
The updated introduction now includes a link to CIP-67 hosted on snapshot.box. Please confirm that this is the intended endpoint and that all CIP proposals use the correct Snapshot domain (e.g., snapshot.org vs. snapshot.box).


15-15: Approve header update
The section title has been correctly expanded to include CIP-57 and CIP-67, matching the new introduction.


17-17: Approve mechanism description
The VCG‐style combinatorial auction description is clear and references the off‐chain protocol link appropriately.


44-44: Approve non-positive score note
The clarification that non-positive scores are ignored is concise and accurate.


56-56: Approve strategy heading repositioning
The "Solver's strategy" heading is correctly placed after the competition and cost sections.


60-60: Approve gas-cost adjustment note
The guidance on adjusting the reported score for expected gas and revert costs is clear and important.


62-62: Approve dominant‐strategy explanation
The exposition on truthful bidding when the cap is not binding is well articulated and matches VCG theory.


66-66: Approve summary of cap effects
The concluding remarks on cap binding frequency and edge-case benefits are concise and insightful.

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.

looks good

Copy link
Contributor

@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

♻️ Duplicate comments (1)
docs/cow-protocol/reference/core/auctions/rewards.md (1)

72-72: Second occurrence of invalid CIP-57 link

The same snapshot.box typo appears later; please switch to snapshot.org for consistency and to avoid dead links.

🧹 Nitpick comments (1)
docs/cow-protocol/reference/core/auctions/rewards.md (1)

58-60: Minor wording improvement

“orders on different directed token pairs” reads awkwardly; “across” or “of” is clearer.

-… creating batched solutions containing orders on different directed token pairs.
+… creating batched solutions containing orders across different directed token pairs.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 994dfb4 and 8e091d9.

📒 Files selected for processing (1)
  • docs/cow-protocol/reference/core/auctions/rewards.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/reference/core/auctions/rewards.md

[uncategorized] ~58-~58: The preposition ‘of’ seems more likely in this position.
Context: ...ing batched solutions containing orders on different directed token pairs. These a...

(AI_HYDRA_LEO_REPLACE_ON_OF)


[style] ~64-~64: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...en the best and second-best solution is very large, then the winning solver wins more when...

(EN_WEAK_ADJECTIVE)

# Solver rewards

The protocol is currently subsidizing the solver competition on all chains it operates on, by rewarding solvers on a weekly basis (currently, every Tuesday) with rewards paid in COW. Solvers are rewarded based on their performance as solvers (i.e., when participating in the standard solver competition) as specified by [CIP-20](https://snapshot.org/#/cow.eth/proposal/0x2d3f9bd1ea72dca84b03e97dda3efc1f4a42a772c54bd2037e8b62e7d09a491f), [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986), [CIP-38](https://snapshot.org/#/cow.eth/proposal/0xfb81daea9be89f4f1c251d53fd9d1481129b97c6f38caaddc42af7f3ce5a52ec), [CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a66265ad72c47a8e55f620f927685dd07d4d49f6d1812905c683f05805) and [CIP-57](https://snapshot.box/#/s:cow.eth/proposal/0x46d4fea1492207cf400fcb7a01141a7d4c730791d658cc77236941fc9eb7dccb). Solver rewards for participating in the price estimation competition and providing quotes that are needed for the gas estimates and limit price computations of market orders are specified in [CIP-27](https://snapshot.org/#/cow.eth/proposal/0x64e061568e86e8d2eec344d4a892e4126172b992cabe59a0b24c51c4c7e6cc33) and [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986).
The protocol is currently subsidizing the solver competition on all chains it operates on, by rewarding solvers on a weekly basis (currently, every Tuesday) with rewards paid in COW. Solvers are rewarded based on their performance as solvers (i.e., when participating in the standard solver competition) as specified by [CIP-20](https://snapshot.org/#/cow.eth/proposal/0x2d3f9bd1ea72dca84b03e97dda3efc1f4a42a772c54bd2037e8b62e7d09a491f), [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986), [CIP-38](https://snapshot.org/#/cow.eth/proposal/0xfb81daea9be89f4f1c251d53fd9d1481129b97c6f38caaddc42af7f3ce5a52ec), [CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a66265ad72c47a8e55f620f927685dd07d4d49f6d1812905c683f05805) [CIP-57](https://snapshot.box/#/s:cow.eth/proposal/0x46d4fea1492207cf400fcb7a01141a7d4c730791d658cc77236941fc9eb7dccb) and [CIP-67](https://snapshot.box/#/s:cow.eth/proposal/0xf9ecb08c4738f04c4525373d6b78085d16635f86adacd1b8ea77b2c176c99d32). Solver rewards for participating in the price estimation competition and providing quotes that are needed for the gas estimates and limit price computations of market orders are specified in [CIP-27](https://snapshot.org/#/cow.eth/proposal/0x64e061568e86e8d2eec344d4a892e4126172b992cabe59a0b24c51c4c7e6cc33) and [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986).
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Broken links and missing comma in CIP list

Both CIP-57 and CIP-67 URLs use the non-existent snapshot.box sub-domain and there is a missing comma before CIP-57. Users following these links will get a 404.

- … CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a6...) [CIP-57](https://snapshot.box/#/s:cow.eth/proposal/0x46d4fea1...) and [CIP-67](https://snapshot.box/#/s:cow.eth/proposal/0xf9ecb08c...)
+ … CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a6...), [CIP-57](https://snapshot.org/#/cow.eth/proposal/0x46d4fea1...) and [CIP-67](https://snapshot.org/#/cow.eth/proposal/0xf9ecb08c...)
📝 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
The protocol is currently subsidizing the solver competition on all chains it operates on, by rewarding solvers on a weekly basis (currently, every Tuesday) with rewards paid in COW. Solvers are rewarded based on their performance as solvers (i.e., when participating in the standard solver competition) as specified by [CIP-20](https://snapshot.org/#/cow.eth/proposal/0x2d3f9bd1ea72dca84b03e97dda3efc1f4a42a772c54bd2037e8b62e7d09a491f), [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986), [CIP-38](https://snapshot.org/#/cow.eth/proposal/0xfb81daea9be89f4f1c251d53fd9d1481129b97c6f38caaddc42af7f3ce5a52ec), [CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a66265ad72c47a8e55f620f927685dd07d4d49f6d1812905c683f05805) [CIP-57](https://snapshot.box/#/s:cow.eth/proposal/0x46d4fea1492207cf400fcb7a01141a7d4c730791d658cc77236941fc9eb7dccb) and [CIP-67](https://snapshot.box/#/s:cow.eth/proposal/0xf9ecb08c4738f04c4525373d6b78085d16635f86adacd1b8ea77b2c176c99d32). Solver rewards for participating in the price estimation competition and providing quotes that are needed for the gas estimates and limit price computations of market orders are specified in [CIP-27](https://snapshot.org/#/cow.eth/proposal/0x64e061568e86e8d2eec344d4a892e4126172b992cabe59a0b24c51c4c7e6cc33) and [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986).
The protocol is currently subsidizing the solver competition on all chains it operates on, by rewarding solvers on a weekly basis (currently, every Tuesday) with rewards paid in COW. Solvers are rewarded based on their performance as solvers (i.e., when participating in the standard solver competition) as specified by [CIP-20](https://snapshot.org/#/cow.eth/proposal/0x2d3f9bd1ea72dca84b03e97dda3efc1f4a42a772c54bd2037e8b62e7d09a491f), [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986), [CIP-38](https://snapshot.org/#/cow.eth/proposal/0xfb81daea9be89f4f1c251d53fd9d1481129b97c6f38caaddc42af7f3ce5a52ec), [CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a66265ad72c47a8e55f620f927685dd07d4d49f6d1812905c683f05805), [CIP-57](https://snapshot.org/#/cow.eth/proposal/0x46d4fea1492207cf400fcb7a01141a7d4c730791d658cc77236941fc9eb7dccb) and [CIP-67](https://snapshot.org/#/cow.eth/proposal/0xf9ecb08c4738f04c4525373d6b78085d16635f86adacd1b8ea77b2c176c99d32). Solver rewards for participating in the price estimation competition and providing quotes that are needed for the gas estimates and limit price computations of market orders are specified in [CIP-27](https://snapshot.org/#/cow.eth/proposal/0x64e061568e86e8d2eec344d4a892e4126172b992cabe59a0b24c51c4c7e6cc33) and [CIP-36](https://snapshot.org/#/cow.eth/proposal/0x4e58f9c1208121c0e06282b5541b458bc8c8b76090263e25448848f3194df986).
🤖 Prompt for AI Agents
In docs/cow-protocol/reference/core/auctions/rewards.md at line 7, fix the
broken links for CIP-57 and CIP-67 by replacing the incorrect 'snapshot.box'
sub-domain with the correct 'snapshot.org' domain. Also, add the missing comma
before CIP-57 in the list to properly separate the items.

Copy link
Contributor

@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: 0

♻️ Duplicate comments (1)
docs/cow-protocol/reference/core/auctions/rewards.md (1)

7-7: Fix still-broken Snapshot links and add the missing comma

The URLs for CIP-57 and CIP-67 still point to snapshot.box and will 404, and there is still no comma before CIP-57. This exact issue was raised in the previous review but hasn’t been addressed.

- … CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a6...) [CIP-57](https://snapshot.box/#/s:cow.eth/proposal/0x46d4fea1...) and [CIP-67](https://snapshot.box/#/s:cow.eth/proposal/0xf9ecb08c...)
+ … CIP-48](https://snapshot.org/#/cow.eth/proposal/0x563ab9a6...), [CIP-57](https://snapshot.org/#/cow.eth/proposal/0x46d4fea1...) and [CIP-67](https://snapshot.org/#/cow.eth/proposal/0xf9ecb08c...)
🧹 Nitpick comments (1)
docs/cow-protocol/reference/core/auctions/rewards.md (1)

58-60: Minor wording nit: replace “orders on” with a clearer construction

The phrase “orders on the same directed token pairs” reads awkwardly; “orders that share the same directed token pairs” is a bit clearer.

-… groups of orders on the same directed token pairs---i.e., in each group, all orders have the same sell and buy tokens.
+… groups of orders that share the same directed token pairs—i.e., in each group, all orders have identical sell and buy tokens.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e091d9 and be986cc.

📒 Files selected for processing (1)
  • docs/cow-protocol/reference/core/auctions/rewards.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/reference/core/auctions/rewards.md

[uncategorized] ~58-~58: The preposition ‘of’ seems more likely in this position.
Context: ...ing batched solutions containing orders on different directed token pairs. These a...

(AI_HYDRA_LEO_REPLACE_ON_OF)


[style] ~64-~64: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...en the best and second-best solution is very large, then the winning solver wins more when...

(EN_WEAK_ADJECTIVE)

@harisang harisang merged commit dc45ade into main Jul 7, 2025
6 checks passed
@harisang harisang deleted the acanidio-econ-patch-12 branch July 7, 2025 00:28
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants