Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/fee-sponsorship.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ When you sponsor transactions, the quote response includes a `fees` object with
}
```

For more details on the fee structure, see [Relay Fees](/references/api/api_core_concepts/fees).
For more details on the fee structure, see [Cost & Fee Structure](/references/api/api_core_concepts/fees).

---

Expand All @@ -257,5 +257,5 @@ For more details on the fee structure, see [Relay Fees](/references/api/api_core
- [App Fees](/features/app-fees) — Learn how to collect fees from your users
- [Get App Fee Balances](/references/api/get-app-fee-balances) — API reference for checking balances
- [Get Quote](/references/api/get-quote-v2) — API reference for quote requests
- [Relay Fees](/references/api/api_core_concepts/fees) — Understanding Relay's fee structure
- [Cost & Fee Structure](/references/api/api_core_concepts/fees) — Understanding Relay's fee structure
- [Solana Support](/references/api/api_guides/solana) — Guide to depositing and withdrawing on Solana
2 changes: 1 addition & 1 deletion features/price-stabilization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1300,4 +1300,4 @@ curl --request POST \

Stablecoin pairs are uniquely suited to price stabilization because the swap impact component of Relay's fees is typically sub 1bps between major stablecoins. That leaves the flat execution fee (\~\$0.02) and the Relay bps fee as the dominant costs — both small, predictable amounts that are cheap to sponsor or absorb into a fixed rate.

For a full breakdown of Relay's fee components and pricing tiers, see [Relay Fees](/references/api/api_core_concepts/fees).
For a full breakdown of Relay's fee components and pricing tiers, see [Cost & Fee Structure](/references/api/api_core_concepts/fees).
31 changes: 16 additions & 15 deletions references/api/api_core_concepts/fees.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: "Fee Structure"
description: "Learn about Relay's fee structure"
title: "Cost & Fee Structure"
description: "Learn about Relay's cost and fee structure"
---

In any given token swap or bridge powered by Relay, there are four potential fees:
In any given token swap or bridge powered by Relay, there are four potential fee and cost components:

1. **Execution Fees**
1. **Execution Cost (formerly Execution Fees)**

Covers execution costs including network gas on the origin and/or destination chain, and includes:
- $0.02 flat fee — always included
- Destination (fill) gas estimate — always included, covers transaction fulfillment on the destination chain
- Origin gas estimate — only included for gasless transactions, covers transaction submission on the origin chain on the user's behalf

For regular (non-gasless) transactions, the user pays origin gas directly from their own wallet to the network — it's not part of the Execution fee.
For regular (non-gasless) transactions, the user pays origin gas directly from their own wallet to the network — it's not part of the Execution Cost.

2. **Swap Fees**
2. **Swap Cost (formerly Swap Fees)**

Covers payments to liquidity providers that facilitate cross-asset and cross-chain token swaps, and includes:
- DEX fees
Expand All @@ -23,7 +23,7 @@ In any given token swap or bridge powered by Relay, there are four potential fee

Note: Hyperliquid charges a $1 activation fee for new deposits. Relay cannot change this fee — it is passed through to users.

3. **Relay Fees**
3. **Platform Fees (formerly Relay Fees)**

A flat basis point fee charged for using the Relay API gateway and related services, including via the Relay.link frontend.

Expand All @@ -39,7 +39,7 @@ In any given token swap or bridge powered by Relay, there are four potential fee
</thead>
<tbody>
<tr>
<td>Relay Fee charged to end users</td>
<td>Platform Fees charged to end users</td>
<td>0.00%</td>
<td>0.01%</td>
<td>0.06%</td>
Expand All @@ -48,7 +48,7 @@ In any given token swap or bridge powered by Relay, there are four potential fee
</tbody>
</table>

Relay integrators can receive a revenue share on the Relay Fee. The revenue share varies by asset pair type and volume tier, as detailed below. To qualify, integrators must:
Relay integrators can receive a revenue share on the Platform Fees. The revenue share varies by asset pair type and volume tier, as detailed below. To qualify, integrators must:

1. Pass an API key in the Relay quote
2. Complete Know Your Business (KYB) verification
Expand Down Expand Up @@ -117,21 +117,22 @@ _Please note that the above fee structure applies to standard cases. In certain

[`GET /requests/v3`](/references/api/get-requests) returns a request's fees in the `data.fees` object, with `quoted` (estimated at quote time) and `actual` (computed at fill time) values. It breaks fees down into the following components:

**execution** - Execution fees covering network gas on the origin and/or destination chain plus the flat fee.
**execution** - Execution costs covering network gas on the origin and/or destination chain plus the flat fee.

**swap** - Swap costs from cross-currency and cross-chain exchange, including DEX fees, swap slippage, and solver rebalancing.

**platform** - The platform fee, the flat basis-point fee charged by Relay for routing and meta-aggregation services.
**platform** - The Platform Fees, a flat basis-point fee charged by Relay for routing and meta-aggregation services.

**app** - App fees added on top by the integrator, when present.

**sponsored** - The portion of fees the integrator subsidizes on behalf of the user via [Fee Sponsorship](/features/fee-sponsorship).

<Tip>
When displaying fees to users, we recommend mapping the `data.fees` fields as follows:
- **platform** → Provider Fee
- **app** → Your App's Fee
- **swap** + **execution** → Swap Impact
- **execution** → Execution Cost
- **swap** → Swap Cost
- **platform** → Platform Fees
- **app** → App Fee
</Tip>

<Note>
Expand All @@ -142,7 +143,7 @@ In the quote API and [`GET /requests/v2`](/references/api/get-requests-v2), this

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

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

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


Deposit addresses do not support `sponsoredFeeComponents`.

Expand Down
2 changes: 1 addition & 1 deletion references/api/api_guides/bridging-integration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ While not mandatory for integration, doing the following will improve the UX for
- [**Deposit Addresses**](/features/deposit-addresses): Use Relay deposit addresses to unlock new chains and reduce wallet friction.
- [**Fee Sponsorship**](/features/fee-sponsorship): Sponsor fees for your users to reduce friction and improve the user experience.
- [**Handling Errors**](/references/api/api_core_concepts/handling-errors): Handle quote errors when using the Relay API.
- [**Relay Fees**](/references/api/api_core_concepts/fees): Understand the fees associated with using the Relay API.
- [**Cost & Fee Structure**](/references/api/api_core_concepts/fees): Understand the fees associated with using the Relay API.
2 changes: 1 addition & 1 deletion references/api/api_guides/calling-integration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1030,4 +1030,4 @@ const txs = [
- [**App Fees**](/features/app-fees): Monetize your integration by adding a fee (in bps) to every quote.
- [**Fee Sponsorship**](/features/fee-sponsorship): Sponsor fees for your users to reduce friction and improve the user experience.
- [**Handling Errors**](/references/api/api_core_concepts/handling-errors): Handle quote errors when using the Relay API.
- [**Relay Fees**](/references/api/api_core_concepts/fees): Understand the fees associated with using the Relay API.
- [**Cost & Fee Structure**](/references/api/api_core_concepts/fees): Understand the fees associated with using the Relay API.
2 changes: 1 addition & 1 deletion solutions/payment-service-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Relay screens every transaction in real time against multiple independent blockc

## Pricing

Relay's cost is transparent in every quote. The `expandedPriceImpact` object breaks each payment into its execution, swap, and Relay fee components, plus any app fee you add — so your finance team can model unit economics exactly. Integrators above a volume threshold qualify for a revenue share on the Relay fee. See [Fee Structure](/references/api/api_core_concepts/fees).
Relay's cost is transparent in every quote. The `expandedPriceImpact` object breaks each payment into its execution, swap, and Relay fee components, plus any app fee you add — so your finance team can model unit economics exactly. Integrators above a volume threshold qualify for a revenue share on the Relay fee. See [Cost & Fee Structure](/references/api/api_core_concepts/fees).


## Security
Expand Down
Loading