feat: add Affiliate Program documentation#608
Conversation
- Introduced a new category JSON file for the Affiliate Program, enabling it to be collapsible in the documentation sidebar. - Added a comprehensive FAQ document detailing the CoW Swap Affiliate Program, covering aspects such as participation, rewards, eligibility, and operational guidelines. - Created a README file that outlines the Affiliate Program's structure, definitions, program flow, and initial launch parameters. These additions enhance the clarity and accessibility of the Affiliate Program information for users.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new Affiliate Program documentation section (README and FAQ) plus a Docusaurus category config, detailing roles, referral codes, wallet-bound attribution rules, qualifying volume/inclusions/exclusions, milestone-based USDC rewards, enforcement/disqualification rules, payout cadence, caps, and support procedures. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/cow-protocol/tutorials/cow-swap/affiliate-program/README.md (1)
68-70: Optional readability tweak: vary repeated bullet openings.Three consecutive bullets begin similarly in this block; slight rewording would improve scanability.
✏️ Suggested wording tweak
-- Rewards are paid in `USDC`. -- At launch, both the affiliate and the referred trader receive rewards when eligible milestones are reached. -- Payouts are processed weekly. +- Payout currency is `USDC`. +- At launch, both the affiliate and referred trader receive rewards on eligible milestones. +- Distribution runs on a weekly payout cycle.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cow-protocol/tutorials/cow-swap/affiliate-program/README.md` around lines 68 - 70, Three consecutive bullets in the affiliate README ("Rewards are paid in `USDC`", "At launch, both the affiliate and the referred trader receive rewards when eligible milestones are reached.", "Payouts are processed weekly.") start similarly and reduce scanability; reword them to vary openings and improve flow—for example change one to "Payments are made in `USDC`", another to "Upon launch, both the affiliate and the referred trader receive rewards once eligible milestones are reached", and the last to "Payouts occur weekly" (or similar concise variants) so each bullet begins with a different word/phrase while preserving the original meaning.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/cow-protocol/tutorials/cow-swap/affiliate-program/README.md`:
- Around line 68-70: Three consecutive bullets in the affiliate README ("Rewards
are paid in `USDC`", "At launch, both the affiliate and the referred trader
receive rewards when eligible milestones are reached.", "Payouts are processed
weekly.") start similarly and reduce scanability; reword them to vary openings
and improve flow—for example change one to "Payments are made in `USDC`",
another to "Upon launch, both the affiliate and the referred trader receive
rewards once eligible milestones are reached", and the last to "Payouts occur
weekly" (or similar concise variants) so each bullet begins with a different
word/phrase while preserving the original meaning.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 89885696-8b6f-4d06-9dd2-49f595934bf0
📒 Files selected for processing (3)
docs/cow-protocol/tutorials/cow-swap/affiliate-program/README.mddocs/cow-protocol/tutorials/cow-swap/affiliate-program/_category_.jsondocs/cow-protocol/tutorials/cow-swap/affiliate-program/faq.md
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/cow-protocol/affiliate-program/README.md (1)
68-70: Small wording polish: avoid repeated sentence starts.
Line 68–Line 70has multiple bullets starting similarly, which reads a bit repetitive. Consider varying the phrasing for better flow.✍️ Suggested wording tweak
-- Rewards are paid in `USDC`. -- At launch, both the affiliate and the referred trader receive rewards when eligible milestones are reached. -- Payouts are processed weekly. +- Rewards are denominated in `USDC`. +- At launch, eligible milestones pay both the affiliate and the referred trader. +- Distribution runs on a weekly cycle.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cow-protocol/affiliate-program/README.md` around lines 68 - 70, The three consecutive bullets starting with "Rewards are paid in `USDC`" read repetitive; update the phrasing to vary sentence starts and improve flow—for example, keep "Rewards are paid in `USDC`" as the first bullet, reword the second to "At launch, eligible milestones grant rewards to both the affiliate and the referred trader" (or similar) and rephrase the third to "Payouts are processed weekly" or "Rewards are distributed weekly" so each bullet begins differently while preserving meaning; locate and edit the bulleted list that begins with "Rewards are paid in `USDC`" in the Rewards/Affiliate Program section of the README.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/cow-protocol/affiliate-program/README.md`:
- Around line 68-70: The three consecutive bullets starting with "Rewards are
paid in `USDC`" read repetitive; update the phrasing to vary sentence starts and
improve flow—for example, keep "Rewards are paid in `USDC`" as the first bullet,
reword the second to "At launch, eligible milestones grant rewards to both the
affiliate and the referred trader" (or similar) and rephrase the third to
"Payouts are processed weekly" or "Rewards are distributed weekly" so each
bullet begins differently while preserving meaning; locate and edit the bulleted
list that begins with "Rewards are paid in `USDC`" in the Rewards/Affiliate
Program section of the README.md.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 92a63fb9-21e2-4cfb-8809-10d13b161915
📒 Files selected for processing (3)
docs/cow-protocol/affiliate-program/README.mddocs/cow-protocol/affiliate-program/_category_.jsondocs/cow-protocol/affiliate-program/faq.md
✅ Files skipped from review due to trivial changes (2)
- docs/cow-protocol/affiliate-program/category.json
- docs/cow-protocol/affiliate-program/faq.md
|
One note, after merging, we should clear ElasticSearch cache/re-build index. |
kernelwhisperer
left a comment
There was a problem hiding this comment.
LGTM (I did not read the copy though)
Is not automatic? |
Not that I know. Last time we had issues with it. |
There was a problem hiding this comment.
Actionable comments posted: 10
🧹 Nitpick comments (1)
docs/cow-protocol/affiliate-program/faq.md (1)
34-34: Optional: Simplify redundant phrasing.The phrase "from the first trade after clicking a link or entering a code manually and executing their first qualifying trade" contains redundant references to the first trade. Consider simplifying to improve clarity.
✏️ Suggested simplification
- A trader is "bound" to an affiliate for a maximum of 90 days from the first trade after clicking a link or entering a code manually and executing their first qualifying trade. + A trader is "bound" to an affiliate for a maximum of 90 days from when they click a link or enter a code and execute their first qualifying trade.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cow-protocol/affiliate-program/faq.md` at line 34, Simplify the redundant phrase in the sentence that defines the 90-day binding period by removing the duplicate "first trade" wording; change the clause "from the first trade after clicking a link or entering a code manually and executing their first qualifying trade" to a clearer form such as "from the first qualifying trade after clicking a link or entering a code manually" in the FAQ sentence so the meaning stays the same but reads concisely.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/cow-protocol/affiliate-program/faq.md`:
- Line 179: Change the markdown headings under the "Dashboard and Reporting"
section from list-style H3 to proper H2 section headings: replace the leading "*
### " with "## " for the heading "What can I track as an affiliate or trader?"
and the other similar headings flagged in this section (those currently using "*
###"); this removes the list-item prefix and promotes them to the correct H2
hierarchy.
- Line 208: Fix the heading hierarchy and formatting by converting the
list-style H3 headings into proper H2 headings: remove the leading "* " and
change "### " to "## " for the headings such as "Where will affiliate updates be
shared?" and the other affected headings (the headings at the locations
containing the exact strings referenced on lines 212, 225, and 235). Ensure each
heading is a standalone H2 (no list marker) so they render as top-level FAQ
sections.
- Line 181: Convert plain text URLs like "swap.cow.fi/\#/account/my-rewards"
into clickable Markdown links by replacing the escaped-hash path with a proper
link format and full scheme, e.g. use [My
rewards](https://swap.cow.fi/#/account/my-rewards) (or an appropriate link
text). Update the occurrences of that URL at the other noted lines as well (the
same literal strings on lines referenced: the "swap.cow.fi/\#/..." instances at
181, 183, 190, 195) so all become standard Markdown links with "https://" and an
unescaped "#" in the target.
- Line 80: Replace the plain text "cow.fi/terms" in the sentence starting "Yes.
Participation is prohibited..." with a proper clickable Markdown link using the
full URL (e.g., change cow.fi/terms to [cow.fi/terms](https://cow.fi/terms)) so
the phrase renders as an accessible hyperlink in
docs/cow-protocol/affiliate-program/faq.md.
- Line 174: The section title currently written as bold text "**🔹 Dashboard and
Reporting**" should be converted to an H2 heading to preserve document structure
and accessibility; replace the bold markdown line containing the exact string
"🔹 Dashboard and Reporting" with an H2 heading (e.g., prefix with "## ") so it
becomes a proper section header used by parsers and screen readers.
- Line 147: Change the "### **🔹 Abuse & Disqualification**" heading from H3 to
H2 so the heading becomes "## **🔹 Abuse & Disqualification**"; this restores
proper hierarchy and consistency with the earlier H2 at the top of the FAQ
section and improves accessibility and navigation.
- Line 122: Change the "### **🔹 Volume & Rewards Nuances**" heading from H3 to
H2 (i.e., replace the leading "###" with "##") to restore proper heading
hierarchy; locate the exact heading string "🔹 Volume & Rewards Nuances" in the
faq.md and update it, and then run/verify the markdown linter (MD001) or update
any generated TOC/navigation that depends on heading levels.
- Around line 158-163: Replace the escaped dashes (`\-`) in the bullet list with
normal hyphens/markdown bullets and remove the extra indentation before the
sentence "A forum notice may be published in case of material program changes or
pauses." so it aligns with the surrounding text; ensure the list items are plain
markdown bullets (e.g., "- Disqualify participants") and the following sentence
is on its own line with standard left alignment to fix the formatting
inconsistencies in faq.md.
- Line 214: Remove the excessive leading indentation before the heading text "If
you have questions about:" by deleting the leading spaces so the line starts at
column 0; locate the exact string "If you have questions about:" in the file
(currently indented) and trim the whitespace at its start so it renders as a
normal left-aligned line.
- Line 177: The documentation contains a broken placeholder "(link)" for the
"affiliate dashboard" reference; locate the text "affiliate dashboard here
(link)" and replace the placeholder "(link)" with the real affiliate dashboard
URL used elsewhere in the docs (use the same affiliate endpoint/URL pattern
already referenced in other affiliate pages) so the link is clickable and
consistent across the document.
---
Nitpick comments:
In `@docs/cow-protocol/affiliate-program/faq.md`:
- Line 34: Simplify the redundant phrase in the sentence that defines the 90-day
binding period by removing the duplicate "first trade" wording; change the
clause "from the first trade after clicking a link or entering a code manually
and executing their first qualifying trade" to a clearer form such as "from the
first qualifying trade after clicking a link or entering a code manually" in the
FAQ sentence so the meaning stays the same but reads concisely.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2113a9fc-d1f5-40de-89d9-d11f857e9365
📒 Files selected for processing (1)
docs/cow-protocol/affiliate-program/faq.md
|
|
||
| --- | ||
|
|
||
| ### **🔹 Volume & Rewards Nuances** |
There was a problem hiding this comment.
Fix heading hierarchy for accessibility and navigation.
This H3 heading should be H2 to maintain proper heading hierarchy. After the separator and "Payouts & Tracking" section, jumping to H3 skips a level and creates navigation and accessibility issues.
♿ Proposed fix
-### **🔹 Volume & Rewards Nuances**
+## **🔹 Volume & Rewards Nuances**As per static analysis hints: Expected h2, but found h3 (MD001 heading-increment rule).
📝 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.
| ### **🔹 Volume & Rewards Nuances** | |
| ## **🔹 Volume & Rewards Nuances** |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 122-122: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/cow-protocol/affiliate-program/faq.md` at line 122, Change the "### **🔹
Volume & Rewards Nuances**" heading from H3 to H2 (i.e., replace the leading
"###" with "##") to restore proper heading hierarchy; locate the exact heading
string "🔹 Volume & Rewards Nuances" in the faq.md and update it, and then
run/verify the markdown linter (MD001) or update any generated TOC/navigation
that depends on heading levels.
|
|
||
| --- | ||
|
|
||
| ### **🔹 Abuse & Disqualification** |
There was a problem hiding this comment.
Fix heading hierarchy for accessibility and navigation.
This H3 heading should be H2 to maintain proper heading hierarchy, consistent with the issue at line 122.
♿ Proposed fix
-### **🔹 Abuse & Disqualification**
+## **🔹 Abuse & Disqualification**📝 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.
| ### **🔹 Abuse & Disqualification** | |
| ## **🔹 Abuse & Disqualification** |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/cow-protocol/affiliate-program/faq.md` at line 147, Change the "### **🔹
Abuse & Disqualification**" heading from H3 to H2 so the heading becomes "##
**🔹 Abuse & Disqualification**"; this restores proper hierarchy and consistency
with the earlier H2 at the top of the FAQ section and improves accessibility and
navigation.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/cow-protocol/affiliate-program/faq.md`:
- Line 7: The top-level section heading "### Overview" violates heading
hierarchy (MD001); change the heading in
docs/cow-protocol/affiliate-program/faq.md from a level-3 to a level-2 heading
(replace "### Overview" with "## Overview") so it directly follows the
frontmatter/title and satisfies markdown linting and accessibility rules.
- Line 218: The sentence "Rewards data update every 6 hours at 01:00, 07:00,
13:00, 17:00 (UTC)" is contradictory—either change the cadence wording or the
times; update the FAQ line to either say "Updated 4 times daily at 01:00, 07:00,
13:00 and 17:00 (UTC)" or change the times to true 6‑hour intervals (e.g.,
"Updated every 6 hours at 00:00, 06:00, 12:00 and 18:00 (UTC)"), replacing the
existing sentence exactly to keep the text consistent.
- Line 265: The sentence in the materials section ("Affiliates can access to a
dedicated Discord channel (`#affiliate-program`) where they'll be able to
find:") has incorrect phrasing; update that string to "Affiliates can access a
dedicated Discord channel (`#affiliate-program`) where they'll be able to find:"
by removing "to" so the phrase reads "can access" (edit the text in
docs/cow-protocol/affiliate-program/faq.md where the sentence appears).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4d8de2d6-0305-4834-8752-bf67256f0b42
📒 Files selected for processing (1)
docs/cow-protocol/affiliate-program/faq.md
|
|
||
| #### What materials are available to me as an Affiliate? | ||
|
|
||
| Affiliates can access to a dedicated Discord channel (`#affiliate-program`) where they'll be able to find: |
There was a problem hiding this comment.
Fix grammar in the materials section.
Line 265 has incorrect phrasing: “can access to”. Use “can access”.
✏️ Suggested fix
-Affiliates can access to a dedicated Discord channel (`#affiliate-program`) where they'll be able to find:
+Affiliates can access a dedicated Discord channel (`#affiliate-program`) where they'll be able to find:📝 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.
| Affiliates can access to a dedicated Discord channel (`#affiliate-program`) where they'll be able to find: | |
| Affiliates can access a dedicated Discord channel (`#affiliate-program`) where they'll be able to find: |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/cow-protocol/affiliate-program/faq.md` at line 265, The sentence in the
materials section ("Affiliates can access to a dedicated Discord channel
(`#affiliate-program`) where they'll be able to find:") has incorrect phrasing;
update that string to "Affiliates can access a dedicated Discord channel
(`#affiliate-program`) where they'll be able to find:" by removing "to" so the
phrase reads "can access" (edit the text in
docs/cow-protocol/affiliate-program/faq.md where the sentence appears).
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |

Description
This PR adds dedicated documentation pages for the CoW Swap Affiliate Program under the CoW Swap section of the docs site. It introduces a new collapsible Affiliate Program subsection with an overview page and a FAQ page, converting the provided raw markdown into Docusaurus-friendly content and navigation.
Summary by CodeRabbit