Skip to content

rename Relay Fee to Platform Fee, adopt cost terminology - #382

Open
ted-palmer wants to merge 4 commits into
mainfrom
ted/update-fee-language
Open

rename Relay Fee to Platform Fee, adopt cost terminology#382
ted-palmer wants to merge 4 commits into
mainfrom
ted/update-fee-language

Conversation

@ted-palmer

Copy link
Copy Markdown
Collaborator

No description provided.

@ted-palmer
ted-palmer requested review from n-xlkt and pedromcunha July 30, 2026 15:46
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ted-palmer's task in 1m 54s —— View job


Code review — PR #382

  • Read the diff and full fees.mdx
  • Check repo-wide for stale "Relay Fee" / old terminology references
  • Check consistency with AGENTS.md style guide (§2, §3.3a, §4.2, §5)
  • Post review

The rename direction is right and matches the API: relayplatform already shipped as the v3 field name (see references/api/api_guides/migrating-to-requests-v3.mdx:330), so aligning prose to Platform Fee removes a real mismatch. The cost-vs-fee split for execution/swap also reads well. A few things to tighten before merge.


1. The rename stops at this file — five other in-scope pages still say "Relay fee"

AGENTS.md §4.2 requires inbound references to the old name be updated in the same PR. Left stale:

File Line Text
references/api/api_core_concepts/trade-types.mdx 13, 18, 25 "relay fees, app fees, and gas fees" (×3)
features/fee-sponsorship.mdx 52 "sponsor specific Relay fees … (such as gas fees or relayer fees)"
features/fee-sponsorship.mdx 212 "designed to cover relay and execution costs"
solutions/payment-service-providers.mdx 62 "its execution, swap, and Relay fee components … revenue share on the Relay fee"

Also worth a pass: the link text [Relay Fees](/references/api/api_core_concepts/fees) appears in features/fee-sponsorship.mdx:239,260, features/price-stabilization.mdx:1303, references/api/api_guides/calling-integration-guide.mdx:1033, and references/api/api_guides/bridging-integration-guide.mdx:172. The target page is titled "Fee Structure", and "Relay Fees" now collides with the component name this PR is retiring — "Fee Structure" is the clearer label.

Fix this →

2. Capitalization of the new cost terms is inconsistent within the file

The numbered list and the <Tip> treat them as proper nouns — Execution Cost (fees.mdx:8, :15), Swap Cost (:17), :132–133 — but the API section lowercases them: "Execution costs" (:120), "Swap costs" (:122). Since :124 capitalizes "Platform Fee" in that same block, the three components should agree. AGENTS.md §5 treats named things as capitalized and generic prose usage as lowercase, so pick one reading and apply it to all three.

3. 4. **App Fees** is now the odd one out

fees.mdx:108 stays plural while items 1–3 became singular, and the <Tip> at :135 maps appApp Fee (singular). Either make the heading "App Fee" or keep all four plural.

4. Inline "earlier versions" trace vs. §4.2 — and no changelog entry

fees.mdx:28 adds "Referred to as the Relay Fee in earlier versions of the API and docs." AGENTS.md §4.2 says to edit in place and not leave an old-version trace in-line — the record belongs in references/api/changelog.mdx (which exists, entries through 2026-07-28), with the inline exception being a one-line <Info> pointing at the changelog entry.

Judgment call: the API field itself isn't changing in this PR (it became platform back in the v3 migration), so this is a docs-terminology change and a changelog entry is arguably optional. But the searchability argument for keeping the alias sentence is real. My suggestion: keep it, and add a short changelog entry so the sentence has something to point to — or drop it, since fees.mdx:141 already documents that v2 names the component relay.

5. Confirm the <Tip> guidance change is intentional

This is more than a rename. The old mapping collapsed swap + execution into one user-facing "Swap Impact" line and labeled platform as "Provider Fee"; the new one surfaces four separate lines. Integrators who built UI against the old advice will need a layout change, not a string change. If that's the intent, fine — just flagging that it isn't a no-op for consumers.

6. Nit — fees.mdx:6

"…there are four potential fee and cost components." The original trailing colon introduced the numbered list; a period reads as a full stop right before a list. Suggest: "…there are four potential cost and fee components:".


Not checked: no lint/build step was run — this repo has no test suite wired for MDX in the checkout, and Mintlify rendering (particularly the raw <table> blocks at :30 and :60, unchanged by this PR) can only be verified in a preview deploy.
• branch ted/update-fee-language

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
unevenlabs 🟢 Ready View Preview Jul 30, 2026, 3:47 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
unevenlabs 🟡 Building Jul 30, 2026, 3:46 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

pedromcunha
pedromcunha previously approved these changes Aug 12, 2026
@pedromcunha

Copy link
Copy Markdown
Member

LGTM although the review job flagged some other areas for improvement

@n-xlkt n-xlkt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ted-palmer just a few changes at the request of Ops

Comment thread references/api/api_core_concepts/fees.mdx Outdated
Comment thread references/api/api_core_concepts/fees.mdx Outdated
Comment thread references/api/api_core_concepts/fees.mdx Outdated
Comment thread references/api/api_core_concepts/fees.mdx Outdated
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ted-palmer's task in 1m 54s —— View job


Code review — PR #382

  • Read the diff and full fees.mdx
  • Check repo-wide for stale terminology
  • Check against AGENTS.md style guide (§2, §3.3a, §4.2, §5)
  • Post review

The rename direction is right and matches the API — relayplatform already shipped as the v3 field name (references/api/api_guides/migrating-to-requests-v3.mdx:387,495,502), so aligning prose to Platform Fee closes a real mismatch. The cost-vs-fee split for execution/swap reads well.

Status: HEAD (484bae4) is 7c96eff plus a merge of main — no content changed since the last review, so the items below are still open, and @n-xlkt's CHANGES_REQUESTED from Aug 21 is unaddressed.


1. Ops' requested changes aren't in yet — and one of them conflicts with the file

@n-xlkt asked for (formerly …) parentheticals on all three renamed headings. Two things to settle before applying them verbatim:

  • Number disagrees. The suggestions are Execution Cost (formerly Execution Fees) and Swap Cost (formerly Swap Fees) — singular — but Platform Fees (formerly Relay Fees) — plural. Items 1–3 in the list are currently all singular. Worth confirming with Ops whether item 3 should be singular to match, or whether all four go plural (see §3 below).
  • fees.mdx:28 becomes redundant. If the heading reads Platform Fee (formerly Relay Fees), the trailing sentence "Referred to as the Relay Fee in earlier versions of the API and docs." says the same thing twice in two lines. Drop the sentence when you add the parenthetical.

Fix this →

2. The rename still stops at this file — four other in-scope pages say "Relay fee"

AGENTS.md §4.2 requires inbound references to the old name be updated in the same PR. Still stale:

File Line Text
references/api/api_core_concepts/trade-types.mdx 13, 18, 25 "relay fees, app fees, and gas fees" (×3)
features/fee-sponsorship.mdx 52 "sponsor specific Relay fees … (such as gas fees or relayer fees)"
features/fee-sponsorship.mdx 212 "designed to cover relay and execution costs"
solutions/payment-service-providers.mdx 46 "its execution, swap, and Relay fee components … revenue share on the Relay fee"

fee-sponsorship.mdx:52 is the worst of these — it's the sponsoredFeeComponents row, and "gas fees or relayer fees" names components that don't exist. The actual values are execution, swap, platform, app.

Separately, the link text [Relay Fees](/references/api/api_core_concepts/fees) appears in features/fee-sponsorship.mdx:239,260, features/price-stabilization.mdx:1303, references/api/api_guides/calling-integration-guide.mdx:1033, and references/api/api_guides/bridging-integration-guide.mdx:172. The target page is titled "Fee Structure", and "Relay Fees" now collides with the component name this PR retires. solutions/payment-service-providers.mdx:46 already uses "Fee Structure" — match it.

Fix this →

3. Capitalization of the new cost terms is inconsistent inside the file

The list and the <Tip> treat them as proper nouns — Execution Cost (fees.mdx:8, :15), Swap Cost (:17), :132–133 — but the API section lowercases them: "Execution costs" (:120), "Swap costs" (:122). :124 capitalizes "Platform Fee" in that same block, so the three components disagree with each other three lines apart. AGENTS.md §5 capitalizes named things and lowercases generic prose usage — pick one reading and apply it to all three.

4. 4. **App Fees** is now the odd one out

fees.mdx:108 stays plural while items 1–3 went singular, and the <Tip> at :135 maps appApp Fee. Either make the heading "App Fee" or take all four plural.

5. §4.2 vs. the "formerly" parentheticals — worth a decision, not just a fix

AGENTS.md §4.2 says to edit in place and not leave an old-version trace inline; the record belongs in references/api/changelog.mdx (which exists, entries current through 2026-08-19). This PR's fees.mdx:28 is one such trace, and Ops' review adds three more.

Ops' searchability argument is good and I'd side with it — but then §4.2 is out of date, and the honest fix is to amend the guide rather than leave the page in silent violation. Two options:

  • Keep the parentheticals and add a one-line exception to §4.2 ("user-facing terminology renames may carry an inline (formerly X) alias"), plus a changelog entry the terminology change can point at.
  • Drop them and add the changelog entry only — fees.mdx:141 already documents that v2 names the component relay.

Either way this is a docs-terminology change, not an API change (the field became platform back in the v3 migration), so the changelog entry is arguably optional. Flagging it because a reviewer request and the checked-in style guide currently point opposite directions.

6. Confirm the <Tip> change is intentional for integrators

This is more than a rename. The old mapping collapsed swap + execution into one "Swap Impact" line and labeled platform as "Provider Fee"; the new one surfaces four separate lines. Anyone who built UI against the old advice needs a layout change, not a string change. Fine if intended — just not a no-op for consumers.

7. Nit — fees.mdx:6

"…there are four potential fee and cost components." The trailing period reads as a full stop immediately before the numbered list it introduces; the original colon was doing real work. Suggest: "…there are four potential cost and fee components:".


Not checked: no lint or build step was run — this repo wires no MDX test suite in the checkout, and Mintlify rendering (particularly the raw <table> blocks at :30 and :60, untouched by this PR) can only be confirmed in the preview deploy.
• branch ted/update-fee-language

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

Greptile Summary

The documentation renames the fee categories and updates related links. The fee-sponsorship example still tells integrators to send platform to the quote API, although that request enum requires relay; copied requests will be rejected.

Confidence Score: 4/5

The documentation should not be merged until the sponsorship component example uses the quote API's accepted value.

A live quote request confirmed that platform is rejected while relay is accepted by enum validation.

Files Needing Attention: references/api/api_core_concepts/fees.mdx

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced proof for a posted P1 finding and associated it with the corresponding review comment.
  • T-Rex produced proof for a second posted P1 finding and associated it with the corresponding review comment.
  • T-Rex ran the requested verification, but its local artifact references were not uploaded.

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Fee sponsorship example uses rejected v2 enum value

    • Bug
      • references/api/api_core_concepts/fees.mdx:146 says sponsoredFeeComponents may include platform, but the live /quote/v2 API rejects platform as outside the allowed enum. The same page’s line 139 correctly calls the v2 component relay.
    • Cause
      • The documentation appears to use the v3 fee-object name (platform) in a v2 quote-request parameter whose contract still uses the legacy v2 name (relay).
    • Fix
      • Change the v2 sponsoredFeeComponents example at line 146 from platform to relay (or explicitly distinguish v2 request enums from v3 fee-object component names).

    T-Rex Ran code and verified through T-Rex

Reviews (3): Last reviewed commit: "Updates" | Re-trigger Greptile

Integrators with [Fee Sponsorship](/features/fee-sponsorship) enabled can subsidize fees for their users. By default, setting **`subsidizeFees`** to `true` sponsors all fee components.

For more granular control, use the **`sponsoredFeeComponents`** parameter in the quote request to choose which specific fee components to sponsor. This allows you to sponsor some fees (e.g. execution and relay fees) while letting the user pay others (e.g. swap fees).
For more granular control, use the **`sponsoredFeeComponents`** parameter in the quote request to choose which specific fee components to sponsor. This allows you to sponsor some components (e.g. `execution` and `platform`) while letting the user pay others (e.g. `swap`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Unsupported sponsorship component name

sponsoredFeeComponents is a quote-request enum, but this example uses platform, which is not an accepted value. Integrators who copy the example will submit an invalid quote request instead of sponsoring Relay's platform component. Replace platform with relay; platform should remain the name used for the v3 response field.

Artifacts

Fee documentation before the terminology change

  • Captured the git diff showing the fee documentation before and after the PR change, including the changed sponsorship example.

Fee documentation after the terminology change

  • Captured the current numbered fee-documentation lines and shows line 148 using `platform` as a sponsorship request value.

Executable Relay API fee contract check source

  • The executable Python contract check fetches Relay's live OpenAPI and verifies v3, v2, quote, and sponsorship-enum fee fields.

Live Relay OpenAPI fee contract check output

  • Executed the live OpenAPI and public v2 checks; it confirms all documented response fields and shows that quote sponsorship accepts `relay` but rejects `platform`, establishing the defect.

Relay endpoint runtime response capture

  • Captured real endpoint responses: v3 without an API key returned HTTP 400 with the required-key message, v2 returned HTTP 200, and an empty quote request returned HTTP 400 with its validation message.

View artifacts

T-Rex Ran code and verified through T-Rex

- Add "(formerly X Fees)" parentheticals to Execution Cost, Swap
  Cost, and Platform Fees per n-xlkt's requested changes
- Make Platform Fees consistently plural throughout the doc
- Remove the wholesale-cost-vs-fee explainer sentence per review
- Update "Relay Fees" link text to "Platform Fees" in the docs that
  link to this page
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ted-palmer's task in 3m 6s —— View job


Code review — PR #382

  • Read the diff and full fees.mdx
  • Check repo-wide for stale terminology
  • Check against AGENTS.md style guide (§2, §3.3a, §4.2, §5)
  • Verify the sponsoredFeeComponents enum claim
  • Post review

New commit 02017ba picks up @n-xlkt's Ops requests — the three (formerly …) parentheticals are in, the redundant "Referred to as the Relay Fee in earlier versions" sentence at :28 is gone, and the "wholesale costs" line is cut from the <Tip>. Good. The remaining items below are new or still open.


1. sponsoredFeeComponents example now names a request value that doesn't exist

references/api/api_core_concepts/fees.mdx:146 was changed from "execution and relay fees" to `execution` and `platform`. But sponsoredFeeComponents is a quote-request parameter, and this same file says two paragraphs earlier that the quote API calls the component relay:

fees.mdx:139 — "In the quote API and GET /requests/v2, this same breakdown is returned as the expandedPriceImpact object, and the platform component is named relay."

So the page now tells the reader platform is the quote-side name at :146 and relay at :139. The relayplatform rename landed on the response side only — references/api/api_guides/migrating-to-requests-v3.mdx:495,502 maps data.expandedPriceImpact and feeSponsorship…components.relay, both response paths, and never a request parameter. @greptile-apps executed the live OpenAPI and reports the request enum as execution, swap, relay, app, rent.

I couldn't re-verify that against the spec myself — network egress is blocked in this checkout — but the file contradicting itself is enough to act on, and an integrator who copies :146 submits a request that 400s. Worth a look at the spec before picking a side; if the enum really is relay, the fix is to revert that one token and leave the surrounding prose as-is.

One genuine subtlety if you do: the v3 response echoes feeSponsorship.selectedComponents as ["execution","swap","platform","app"] (migrating-to-requests-v3.mdx:182,194). So a request value of relay comes back as platform, and that asymmetry is probably worth a sentence somewhere.

Fix this →

2. The link-text rename went the wrong direction

Four links were relabeled [Relay Fees][Platform Fees], all pointing at this page — whose title is "Fee Structure" and which documents four components, of which Platform Fees is now precisely one. "Relay Fees" was at least a loose name for the whole page; "Platform Fees" is a defined single component, so the new label is a tighter mismatch than the old one.

Sharpest instance, features/fee-sponsorship.mdx:239:

"For more details on the fee structure, see Platform Fees."

Same shape at features/price-stabilization.mdx:1303 ("Relay's fee components and pricing tiers, see [Platform Fees]"), and at bridging-integration-guide.mdx:172 / calling-integration-guide.mdx:1033 ("[Platform Fees]: Understand the fees associated with using the Relay API").

And the repo is now split on it — solutions/payment-service-providers.mdx:46 already says [Fee Structure], untouched by this PR. Matching the page title in all five places is the consistent read.

Fix this →

3. Singular/plural is now inconsistent four ways — and :124 doesn't parse

Ops asked for plural on item 3, which lands it against the two singular items above it:

Location Reads
fees.mdx:8 Execution Cost (singular)
fees.mdx:17 Swap Cost (singular)
fees.mdx:26 Platform Fees (plural)
fees.mdx:108 App Fees (plural)
fees.mdx:132–135 (<Tip>) Execution Cost, Swap Cost, Platform Fees, App Fee (singular!)

So app is plural in the heading and singular in the <Tip> mapping 27 lines later, and platform is the reverse of execution/swap. AGENTS.md §5 doesn't settle number, but the page should agree with itself.

Independent of which number you pick, fees.mdx:124 is now ungrammatical:

platform - The Platform Fees, a flat basis-point fee charged by Relay…

A plural subject in apposition with a singular predicate. fees.mdx:51 has a milder version ("a revenue share on the Platform Fees", previously "on the Relay Fee"). Singular "Platform Fee" fixes both and matches the API's own data.platformFee field; if Ops wants the plural heading kept, :124 needs rewording instead (e.g. "Platform Fees — the flat basis-point fee charged by Relay…").

Fix this →

4. Five inbound references still say the old name (§4.2)

AGENTS.md §4.2 requires inbound references to the old name be updated in the same PR:

File Line Text
features/price-stabilization.mdx 1301 "the flat execution fee … and the Relay bps fee as the dominant costs"
references/api/api_core_concepts/trade-types.mdx 13, 18, 25 "relay fees, app fees, and gas fees" (×3)
features/fee-sponsorship.mdx 52 "sponsor specific Relay fees … (such as gas fees or relayer fees)"
features/fee-sponsorship.mdx 212 "designed to cover relay and execution costs"
solutions/payment-service-providers.mdx 46 "its execution, swap, and Relay fee components … revenue share on the Relay fee"

Two of these stand out:

  • price-stabilization.mdx:1301 is the sentence immediately above the line this PR edited. The link label on :1303 was updated and "the Relay bps fee" two lines up was not — the same paragraph now uses both vocabularies.
  • fee-sponsorship.mdx:52 is the sponsoredFeeComponents table row, and "gas fees or relayer fees" names components that have never existed in that enum. Whatever you settle in item 1, this row should list the real values.

Fix this →

5. The (formerly …) parentheticals put the page in silent violation of §4.2

AGENTS.md §4.2 says to edit in place and not leave an old-version trace inline; the record belongs in references/api/changelog.mdx (current through 2026-08-19, no entry for this rename). The three parentheticals Ops asked for are exactly such traces.

Ops' searchability argument is the right call — but then the checked-in guide is out of date, and the honest fix is to amend §4.2 with a one-line exception ("user-facing terminology renames may carry an inline (formerly X) alias") rather than leave a reviewer request and the style guide pointing opposite directions. Cheap to do in this PR; a changelog entry the alias can point at would also give the parentheticals somewhere to retire to later.

6. Nit — docs.json redirect

docs.json:389 redirects to this page; worth a glance that the source path isn't itself named after the old terminology. Not blocking.


Not checked: no lint or build ran — this repo wires no MDX test suite, and network egress is blocked in this checkout, so I could not fetch the OpenAPI spec to settle item 1 first-hand or confirm the raw <table> blocks at :30/:60 render. Both are visible in the preview deploy.

No changes pushed — this was a review, not an implementation request.
• branch ted/update-fee-language

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

All six findings check out against the file contents. A few priority notes:

Issue 1 is the only API-breaking bug. fees.mdx already says in its own <Note> that in the quote API, the platform component is named relay — and sponsoredFeeComponents is a quote-request parameter. So the example e.g. \execution` and `platform`tells integrators to send a value that doesn't exist in the enum. The fix is narrow: revertplatformback torelay in that one example, keep the Note as-is, and add the one-sentence callout about the request/response asymmetry (relayin →platformout infeeSponsorship.selectedComponents`).

Issue 3 is a real grammar error, not just a style nit. Line 124:

**platform** - The Platform Fees, a flat basis-point fee charged by Relay…

"The Platform Fees … a flat basis-point fee" is an ungrammatical appositive. Easiest fix while keeping the plural heading Ops wanted: use an em-dash instead of an appositive — "Platform Fees — the flat basis-point fee charged by Relay…" — which avoids the number clash. The <Tip> at lines 132–135 also needs App FeeApp Fees to match the heading.

Issue 4 is incomplete propagation, already required by AGENTS.md §4.2. The two clearest stragglers:

  • fee-sponsorship.mdx:52 — "(such as gas fees or relayer fees)" names components that have never been valid sponsoredFeeComponents values; this should list the real enum members instead.
  • price-stabilization.mdx:1301 — "the Relay bps fee" is in the same paragraph as the link that was already updated to "Platform Fees"; mixed vocabulary in one paragraph is conspicuous.

Issues 2, 5, 6 are lower-severity but worth bundling in: "Platform Fees" as link text for a page titled "Fee Structure" that covers four components is a tighter mismatch than what it replaced, and payment-service-providers.mdx:46 already uses "Fee Structure" consistently. Aligning all five links to the page title is a one-liner each.

For issue 5, agree that the honest path is a one-line §4.2 carve-out in AGENTS.md plus a changelog entry — both are cheaper to add in this PR than to unwind the (formerly …) aliases later, and it gives integrators a canonical reference to point at when the aliases eventually retire.

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

The live API response embedded in price-stabilization.mdx settles item 1 definitively without needing to fetch the OpenAPI spec. Both fee-sponsorship response examples in that file return:

"feeSponsorship": {
  "quoted": {
    "selectedComponents": ["execution", "swap", "relay", "app"],

So relay is what the API both accepts as a request value and echoes back in selectedComponents — the current text at fees.mdx:146 using `platform` as the example value is wrong and will cause a 400. The <Note> at :139 already states that the platform component is named relay in the quote API, so :146 directly contradicts it.

All six items check out against the files. A few additions:

Item 1 — The asymmetry you flagged (request relay → response platform in v3) is worth documenting explicitly: feeSponsorship.selectedComponents in v3 echoes platform for what you sent as relay. That one-liner belongs in the <Note> block at :139 or immediately below :146.

Item 3 — The <Tip> inconsistency is confirmed: app → "App Fee" (singular) while the heading at :108 is "App Fees" (plural). platform → "Platform Fees" in the <Tip> is already consistent with the heading, so the only fix needed there is app → "App Fees".

Item 4fee-sponsorship.mdx:212 is confirmed stale ("designed to cover relay and execution costs"). The (such as gas fees or relayer fees) parenthetical in the sponsoredFeeComponents table row is doubly wrong — it names components that have never existed in the enum.

Item 5 — Agreed on the framing. Adding a one-line exception to §4.2 with a pointer to a changelog entry is cleaner than leaving the guide and style guide pointing opposite directions. A changelog entry also gives the parentheticals a natural retirement path when the alias becomes unnecessary.

Integrators with [Fee Sponsorship](/features/fee-sponsorship) enabled can subsidize fees for their users. By default, setting **`subsidizeFees`** to `true` sponsors all fee components.

For more granular control, use the **`sponsoredFeeComponents`** parameter in the quote request to choose which specific fee components to sponsor. This allows you to sponsor some fees (e.g. execution and relay fees) while letting the user pay others (e.g. swap fees).
For more granular control, use the **`sponsoredFeeComponents`** parameter in the quote request to choose which specific fee components to sponsor. This allows you to sponsor some components (e.g. `execution` and `platform`) while letting the user pay others (e.g. `swap`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Quote sponsorship enum uses the response-field name

The example tells integrators to send platform in sponsoredFeeComponents, but that quote-request enum uses relay. A live POST /quote/v2 request with platform returns HTTP 400, while the same request with relay succeeds. Change the example to execution and relay; otherwise, integrators who copy it will submit invalid sponsorship quote requests.

Artifacts

Prior documentation version showing the sponsorship example

  • Captured the parent revision of the cited fee documentation and its history, showing that the same `execution` and `platform` sponsorship example predates current HEAD; the takeaway is that the invalid example was carried into the current documentation.

Live quote contract probe source

  • Shell probe fetched Relay’s live OpenAPI document and sent identical public quote requests using `platform` and `relay`; the takeaway is that the source directly exercises the documented request contract.

Live OpenAPI and quote endpoint responses for platform and relay

  • Captured output of the executed probe: the live enum excludes `platform`, `platform` returned HTTP 400 with its validation message, and `relay` returned HTTP 200; the takeaway is that the documentation’s suggested value is rejected.

Current documentation lines and declared OpenAPI authority

  • Captured the current file lines 138–150 plus repository declarations that the live OpenAPI schema is the API-reference source of truth; the takeaway is that exact current line 146 conflicts with the authoritative contract.

View artifacts

T-Rex Ran code and verified through T-Rex

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ted-palmer's task in 2m 28s —— View job


Code review — PR #382

  • Read the diff vs origin/main
  • Read the full fees.mdx
  • Sweep repo for stale terminology
  • Check against AGENTS.md (§2, §3.3a, §4.2, §5)
  • Post review

New commit a04e9d7 retitles the page Cost & Fee Structure and relabels all six inbound links to match. That's a cleaner resolution of the earlier link-text thread than either option discussed — the label now equals the page title everywhere (fee-sponsorship.mdx:239,260, price-stabilization.mdx:1303, bridging-integration-guide.mdx:172, calling-integration-guide.mdx:1033, payment-service-providers.mdx:46), & in a title is already established (use-cases/bridging.mdx, solutions/commerce-and-payments.mdx), the slug is unchanged so no redirect is needed, and docs.json:89 carries no title override so the sidebar picks it up automatically. Ops' three (formerly …) parentheticals are in and the :6 colon is restored.

Four things still open.


1. fees.mdx:146 tells integrators to send a value the quote API rejects — and contradicts line 139

sponsoredFeeComponents is a quote-request parameter. The relayplatform rename landed on the response side only, and this file already says so seven lines earlier:

fees.mdx:139 — "In the quote API and GET /requests/v2, this same breakdown is returned as the expandedPriceImpact object, and the platform component is named relay."

I couldn't fetch the OpenAPI spec — network egress needs approval in this checkout — but the repo settles it without one. Both live fee-sponsorship response captures in features/price-stabilization.mdx (:210, :854) show the quote API echoing:

"feeSponsorship": { "quoted": { "selectedComponents": ["execution", "swap", "relay", "app"], 

and migrating-to-requests-v3.mdx:105,116 show the same relay shape as the pre-v3 form. @greptile-apps ran live probes and reports platform → 400, relay → 200, which matches.

Fix is one token: `execution` and `relay` at :146. The asymmetry is worth a sentence too, since it's genuinely confusing — you send relay, and GET /requests/v3 echoes it back as platform in feeSponsorship.selectedComponents (migrating-to-requests-v3.mdx:182,194). The <Note> at :138–140 is the natural home for it.

Fix this →

2. fees.mdx:124 doesn't parse, and number is inconsistent four ways

:124**platform** - The Platform Fees, a flat basis-point fee charged by Relay…

Plural subject, singular appositive. :51 has the milder version ("a revenue share on the Platform Fees", where the singular was previously correct). Since Ops explicitly asked for the plural heading, the cheapest fix is to drop the appositive at :124: "Platform Fees — the flat basis-point fee charged by Relay for routing and meta-aggregation services."

Number across the page:

Location Reads
:8 Execution Cost — singular
:17 Swap Cost — singular
:26 Platform Fees — plural
:108 App Fees — plural
:132–135 (<Tip>) Execution Cost, Swap Cost, Platform Fees, App Fee — app flips to singular

The <Tip> needs appApp Fees to agree with :108 regardless of which convention you settle on; right now the same component is plural in the heading and singular in the mapping 27 lines below it.

Fix this →

3. Stale inbound references (§4.2) — two of them on lines this PR edited

AGENTS.md §4.2 requires inbound references to the old name be updated in the same PR. Six remain, and they're not all the same case:

Same line / same paragraph as an edit — these read as oversights:

  • solutions/payment-service-providers.mdx:46 — the PR changed the link label on this exact line and left "its execution, swap, and Relay fee components … revenue share on the Relay fee" in the same sentence.
  • features/price-stabilization.mdx:1301:1303 was updated; the sentence directly above still says "the Relay bps fee", so one paragraph now carries both vocabularies.

Generic prose, straightforward renames:

  • references/api/api_core_concepts/trade-types.mdx:13,18,25 — "relay fees, app fees, and gas fees" (×3).
  • features/fee-sponsorship.mdx:212 — "designed to cover relay and execution costs".

One that's wrong independent of this rename:

  • features/fee-sponsorship.mdx:52 — the sponsoredFeeComponents table row says integrators can cover "different fee types (such as gas fees or relayer fees)". Neither has ever been a member of that enum. Whatever you decide in item 1, this row should name the real values.

One nuance worth deciding rather than bulk-replacing: payment-service-providers.mdx:46 is describing expandedPriceImpact, which per fees.mdx:139 genuinely names the component relay. So "Relay fee components" there is arguably accurate as-is — a blind rename to "Platform Fee" would make it wrong. Either scope the sentence to v3 (data.fees → platform) or keep relay and say which object it belongs to. The trade-types.mdx and fee-sponsorship.mdx:212 instances have no such tie to a field name and rename cleanly.

Fix this →

4. AGENTS.md §5 should gain the new terms, and §4.2 still points against the parentheticals

Two guide-level loose ends, both cheap here and expensive later:

  • §5 Terminology has no entry for any of these. This PR is establishing Execution Cost, Swap Cost, Platform Fees, and App Fees as canonical, and §5 is what the drift-draft automation reads (docs(drift): commits are most of recent main). Without entries there, the next generated draft has nothing stopping it from reintroducing "Relay fee". Four lines in §5 make this rename stick.
  • §4.2 says not to leave an old-version trace inline — the three (formerly …) parentheticals are exactly that. Ops' searchability argument is right, so the guide is what's out of date; add a one-line carve-out ("user-facing terminology renames may carry an inline (formerly X) alias") rather than leaving the page in silent violation of a checked-in rule.

There's also no references/api/changelog.mdx entry (current through 2026-08-19). Arguably optional since no API field changed — but the <Tip> rewrite is a real consumer-facing change, not a rename: it splits what was one Swap Impact line into separate Execution Cost and Swap Cost lines and drops Provider Fee / Your App's Fee. Anyone who built UI against the old mapping needs a layout change. That deserves a record somewhere, and it gives the parentheticals somewhere to retire to.


Not verified: no lint or build ran — this repo wires no MDX test suite, and network egress requires approval here, so I could not fetch the OpenAPI spec first-hand (item 1 rests on in-repo live captures plus @greptile-apps' probes) or confirm the raw <table> blocks at :30/:60 render. Both are visible in the preview deploy.

No changes pushed — this was a review, not an implementation request.
• branch ted/update-fee-language

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

The analysis is accurate. I've verified the four issues against the current files. Here's my assessment prioritized by severity:

Issue 1 is a functional bug. fees.mdx:146 now tells integrators to pass platform in sponsoredFeeComponents, but both live response captures in price-stabilization.mdx confirm the quote API echoes ["execution", "swap", "relay", "app"] — not platform. The <Note> at line 139 already says the platform component is named relay in the quote API; line 146 directly contradicts it. This will produce 400s for any integrator who copies the example. This needs to ship before this PR merges.

Issue 3 has two tiers. The payment-service-providers.mdx:46 and price-stabilization.mdx:1301 instances are genuine oversights — the PR edited those exact lines/adjacent lines but left old terminology in the surrounding prose. The nuance on payment-service-providers.mdx:46 is right: since it's describing expandedPriceImpact, where relay is the actual field name, a blind rename to "Platform Fee" would be factually wrong. The cleanest fix there is to scope the sentence explicitly to expandedPriceImpact (which uses relay) vs. data.fees (which uses platform).

Issues 2 and 4 are editorial/process, not breaking. The grammar fix at :124 and the app → "App Fees" consistency in the <Tip> are low-risk one-liners. The AGENTS.md updates are housekeeping that'll pay off when the next drift-draft runs.

Suggested merge order: fix issue 1 now (it's one token), fold issues 2 and 3 into the same commit to keep the diff reviewable, then address AGENTS.md in a follow-up if that's a separate ownership concern.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

All four findings verified against the files. Here's what the source confirms:


Issue 1 — confirmed, definitive. The price-stabilization.mdx live response captures (both the fee-sponsorship and fixed-rate examples) show the quote API returning "selectedComponents": ["execution", "swap", "relay", "app"]relay, not platform. And fees.mdx itself says at the Note: "the platform component is named relay" in the quote API. So fees.mdx's Fee Sponsorship paragraph sending execution and platform to sponsoredFeeComponents is wrong in exactly the way you described. Fix is relay.

For the Note extension: the response captures also confirm the v3 asymmetry is real — feeSponsorship.quoted.selectedComponents echoes relay, while data.fees in GET /requests/v3 uses platform. Worth the sentence.


Issue 2 — confirmed. "platform - The Platform Fees, a flat basis-point fee" is the exact text. Plural noun, singular appositive — ungrammatical as written. And the <Tip> does have **app** → App Fee (singular) while the heading above reads App Fees (plural). Both need to agree; your proposed rewrite of :124 and the App Fees fix in the <Tip> are the right calls.


Issue 3 — confirmed, with the nuance you flagged holding up. payment-service-providers.mdx:46 reads:

"The expandedPriceImpact object breaks each payment into its execution, swap, and Relay fee components … Integrators above a volume threshold qualify for a revenue share on the Relay fee."

The first "Relay fee components" is genuinely ambiguous — expandedPriceImpact really does key that component as relay — but "revenue share on the Relay fee" is unambiguously stale product terminology. A clean fix: scope the first clause to the field name (relay component) and update the revenue share clause to "Platform Fees". price-stabilization.mdx at the bottom confirms "the Relay bps fee" is there verbatim and mixes vocabularies with the already-updated link on :1303. fee-sponsorship.mdx "cover relay and execution costs" and the sponsoredFeeComponents table row naming "gas fees or relayer fees" are also both confirmed.


Issue 4 — Without AGENTS.md in view I can't verify the §5 gap directly, but the structural argument stands: without entries for Execution Cost, Swap Cost, Platform Fees, and App Fees, the next drift-draft commit has nothing to anchor to, and the (formerly …) parentheticals are in silent tension with §4.2 without the carve-out. Both are cheap fixes with high long-term value. The changelog point is also well-taken — the <Tip> rewrite is a layout change for anyone rendering data.fees, not just a rename.

Copy link
Copy Markdown
Collaborator Author

Feedback addressed. I also updated the page title to "Cost & Fee Structure". Lmk if we don't want to do that though

Integrators with [Fee Sponsorship](/features/fee-sponsorship) enabled can subsidize fees for their users. By default, setting **`subsidizeFees`** to `true` sponsors all fee components.

For more granular control, use the **`sponsoredFeeComponents`** parameter in the quote request to choose which specific fee components to sponsor. This allows you to sponsor some fees (e.g. execution and relay fees) while letting the user pay others (e.g. swap fees).
For more granular control, use the **`sponsoredFeeComponents`** parameter in the quote request to choose which specific fee components to sponsor. This allows you to sponsor some components (e.g. `execution` and `platform`) while letting the user pay others (e.g. `swap`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Fee sponsorship example uses a rejected v2 enum value

sponsoredFeeComponents is sent to the quote API, whose accepted component name for Relay's platform fee is relay, not platform. A live /quote/v2 request accepts relay through enum validation but rejects platform as unsupported. Change this example to use execution and relay; otherwise, integrators copying it will receive an invalid quote request.

T-Rex Ran code and verified through T-Rex

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

Want your agent to iterate on Greptile's feedback? Try greploops.

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.

3 participants