From eb012e1fc667796c7f61c262a3932d73177c9450 Mon Sep 17 00:00:00 2001 From: Scout <3745266+relay-scout[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 10:54:27 +0000 Subject: [PATCH 1/2] docs(app-fees): add feature page intro Add the approved marketing introduction above the existing App Fees integration guide. Keep the pending rev-share cross-link and dashboard earnings tie-in out until their launches are ready.\n\nLinear: MAR-1411 --- features/app-fees.mdx | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/features/app-fees.mdx b/features/app-fees.mdx index 073b38e..9adfe73 100644 --- a/features/app-fees.mdx +++ b/features/app-fees.mdx @@ -3,6 +3,46 @@ title: "App Fees" description: "Add App Fees on any route and collect in stablecoins " --- +**App Fees: monetization built in.** + +Add your fee to any transaction. Collected at settlement, settled in USDC. + +Your product already powers the flows: swaps, onboarding, top-ups, and payments run through it every day, and most integrators give all of it away for free. Charging for it normally means building billing infrastructure: collection logic, settlement handling, and a treasury slowly filling with small amounts of hundreds of tokens across dozens of chains that someone has to reconcile and convert. + +Add your fee to any quote in basis points and it's collected at settlement, automatically. Fees accrue in a single USDC balance no matter which tokens or chains your users touched, claimable whenever you want. No invoicing, no per-chain treasury, no reconciliation. + +App fees are distinct from rev share: rev share is a cut of Relay's fee, app fees are your own pricing on your own flows. + +## How it works + +1. **Set** your fee on the quote: basis points of the input value, with one or more recipients. +2. **Transact:** your user completes the flow as normal; the fee is collected at settlement, automatically. +3. **Accrue:** fees land in one USDC balance, regardless of the tokens and chains involved. +4. **Claim** whenever you want: free on Base, or on any chain in any currency, via the Relay app, the API, or a multisig or smart contract. + +## Why it matters + +- **Turn existing flows into a revenue line.** Your pricing, set per flow and per quote. Dial it by product, tier, or promotion. +- **No billing infrastructure.** Collection happens at settlement; there's nothing to invoice, chase, or reconcile. +- **Clean revenue.** One USDC balance instead of a dust-token treasury. Finance can actually account for it. + +## Who it's for + +- **Wallets and wallet infrastructure:** the swaps, top-ups, and onboarding you already facilitate become revenue. +- **Payment service providers:** price your own service on top of the rail. Mark up flows per merchant or per product, collect at settlement, and reconcile one balance. +- **Onchain apps:** swap revenue is the business model. Set your fee on every trade and collect it in one balance. +- **DEXes and aggregators:** monetize your frontend's order flow without building fee collection into every route. + +## What you get + +Per-quote control in bps of input value across supported flows (cross-chain and same-chain swaps, bridges, calls, wraps, deposit-address flows, and gasless swaps); multiple recipients per quote; one USDC balance claimable on any chain (free on Base) through the Relay app, API, or SDK; smart contract and multisig claiming (EIP-1271) for DAOs and treasuries; and verification endpoints to confirm quoted versus collected fees per transaction. + +## Limitations + +App fees aren't supported on sends or transfers, or on gasless execution without a prior quote. Some same-chain collection constraints apply on SVM and SUI, and fees below a minimum threshold aren't collected. Details are in the integration guide below. + +--- + ## What are App Fees? App fees are additional fees set by third-party developers on top of existing fees. These fees are specified when generating a quote. To improve the gas costs of fee setting, App fees are not paid out in real-time. Rather, App Fees accrue in an offchain base _USDC,_ balance and can be withdrawn as desired at your convenience. From 8e4fd944a8cf7bc968085f78966927329ddcd724 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 31 Jul 2026 17:10:22 -0700 Subject: [PATCH 2/2] docs(app-fees): refine feature page intro Amp-Thread-ID: https://ampcode.com/threads/T-019fba8a-904c-771f-ba8f-bf94e3c754b8 Co-authored-by: Amp --- features/app-fees.mdx | 67 +++++++++++++------------------------------ 1 file changed, 20 insertions(+), 47 deletions(-) diff --git a/features/app-fees.mdx b/features/app-fees.mdx index 9adfe73..cb69a5c 100644 --- a/features/app-fees.mdx +++ b/features/app-fees.mdx @@ -1,53 +1,26 @@ --- title: "App Fees" -description: "Add App Fees on any route and collect in stablecoins " +description: "Add your own fees to any Relay transaction and collect in stablecoins" --- -**App Fees: monetization built in.** +App Fees let you monetize supported transactions without building separate fee collection and settlement infrastructure. Set a fee on each quote, and Relay collects it when the transaction settles. Fees accrue in a single USDC balance, regardless of the input token or chain. Claim your balance for free on Base whenever it is convenient. -Add your fee to any transaction. Collected at settlement, settled in USDC. +## How App Fees work -Your product already powers the flows: swaps, onboarding, top-ups, and payments run through it every day, and most integrators give all of it away for free. Charging for it normally means building billing infrastructure: collection logic, settlement handling, and a treasury slowly filling with small amounts of hundreds of tokens across dozens of chains that someone has to reconcile and convert. +1. **Set a fee** — Add one or more recipients and set a fee in basis points of the input value in the quote request. +2. **Complete the transaction** — Your user follows a normal Relay flow. Relay collects the fee at settlement. +3. **Collect fees** — Collected fees accrue to the recipient's USDC balance. +4. **Claim the balance** — Withdraw through the Relay API or SDK. Multisigs and smart contracts can claim through EIP-1271. -Add your fee to any quote in basis points and it's collected at settlement, automatically. Fees accrue in a single USDC balance no matter which tokens or chains your users touched, claimable whenever you want. No invoicing, no per-chain treasury, no reconciliation. +## Why use App Fees? -App fees are distinct from rev share: rev share is a cut of Relay's fee, app fees are your own pricing on your own flows. - -## How it works - -1. **Set** your fee on the quote: basis points of the input value, with one or more recipients. -2. **Transact:** your user completes the flow as normal; the fee is collected at settlement, automatically. -3. **Accrue:** fees land in one USDC balance, regardless of the tokens and chains involved. -4. **Claim** whenever you want: free on Base, or on any chain in any currency, via the Relay app, the API, or a multisig or smart contract. - -## Why it matters - -- **Turn existing flows into a revenue line.** Your pricing, set per flow and per quote. Dial it by product, tier, or promotion. -- **No billing infrastructure.** Collection happens at settlement; there's nothing to invoice, chase, or reconcile. -- **Clean revenue.** One USDC balance instead of a dust-token treasury. Finance can actually account for it. - -## Who it's for - -- **Wallets and wallet infrastructure:** the swaps, top-ups, and onboarding you already facilitate become revenue. -- **Payment service providers:** price your own service on top of the rail. Mark up flows per merchant or per product, collect at settlement, and reconcile one balance. -- **Onchain apps:** swap revenue is the business model. Set your fee on every trade and collect it in one balance. -- **DEXes and aggregators:** monetize your frontend's order flow without building fee collection into every route. - -## What you get - -Per-quote control in bps of input value across supported flows (cross-chain and same-chain swaps, bridges, calls, wraps, deposit-address flows, and gasless swaps); multiple recipients per quote; one USDC balance claimable on any chain (free on Base) through the Relay app, API, or SDK; smart contract and multisig claiming (EIP-1271) for DAOs and treasuries; and verification endpoints to confirm quoted versus collected fees per transaction. - -## Limitations - -App fees aren't supported on sends or transfers, or on gasless execution without a prior quote. Some same-chain collection constraints apply on SVM and SUI, and fees below a minimum threshold aren't collected. Details are in the integration guide below. +- **Control your pricing** — Set fees per quote and adjust them by product, customer, or promotion. +- **Collect at settlement** — Avoid separate invoices, payment collection, and settlement logic. +- **Simplify accounting** — Track one USDC balance instead of reconciling tokens across chains. --- -## What are App Fees? - -App fees are additional fees set by third-party developers on top of existing fees. These fees are specified when generating a quote. To improve the gas costs of fee setting, App fees are not paid out in real-time. Rather, App Fees accrue in an offchain base _USDC,_ balance and can be withdrawn as desired at your convenience. - -## Setting App Fees +## Setting up App Fees App Fees are measured in basis points (bps) based on the input value of an order. When setting an app fee, an EVM-based claim address must be provided, which will be used for withdrawing accumulated fees. A single quote can include multiple App fees. You can accrue fees by including `AppFees` in the Quote API: @@ -60,7 +33,7 @@ App Fees are measured in basis points (bps) based on the input value of an order ] ``` -### Additional Considerations +**Additional considerations** - On same-chain operations where the solver holds neither the input or output currency, an extra swap is added within the transaction to swap from the input currency into a currency accepted by the solver for App Fees - For this to occur, the fee to be taken needs to be greater than $0.025. This is to prevent the situation where the action of taking the app fee will consume more in gas than the fee itself. @@ -69,10 +42,10 @@ App Fees are measured in basis points (bps) based on the input value of an order - App fees work the same way with deposit address flows as with regular quote requests. -If you include the `appFees` parameter on an unsupported transaction type (such as sends, transfers, or gasless execution without a prior quote), the API will not return an error — but no fees will be collected. Always verify fee collection is working using the [monitoring endpoints](#verifying-fee-collection) described below. +If you include the `appFees` parameter on an unsupported transaction type (such as sends, transfers, or gasless execution without a prior quote), the API will not return an error — but no fees will be collected. Always verify fee collection using the verification endpoints described below. -## Supported Transaction Types +**Supported transaction types** App fees are supported on the following transaction types: @@ -87,7 +60,7 @@ App fees are supported on the following transaction types: | Gasless swaps | ✅ Fees from original quote are respected | | Gasless execution (no prior quote) | ❌ Same-chain only — e.g. 7702 wallet upgrades | -### Chain-Specific Notes +**Chain-specific notes** **EVM (same-chain):** Fully supported. Fees can be collected from the input currency, the output currency, or via a parallel swap to USDC. @@ -95,7 +68,7 @@ App fees are supported on the following transaction types: **Cross-chain (all combinations):** Fully supported. Same-chain limitations do not apply to cross-chain swaps — fees are calculated based on the solver's deposit currency on the origin chain. -## Verifying Fee Collection +**Verifying fee collection** You can verify that app fees are being collected correctly using the following endpoints: @@ -109,7 +82,7 @@ App balance accrue in USDC from app fees, and can be claimed on any chain. The b The easiest way to claim your App Balance is to use the [Relay App](https://relay.link/claim-app-fees). The Relay App Balance page also supports withdrawing via a multisig. Here's how you can withdraw via the API: -### Get App Balance +**Get App Balance** To check your accrued App Balance, use the App fee balances API. Here's an example curl command and response. The response includes the `balances.currency` field reflecting your off-chain balance for each currency accumulated. @@ -141,7 +114,7 @@ curl --location 'https://api.relay.link/app-fees/0x03508bb71268bba25ecacc8f620e0 To learn more about this api, see the [Get App Fee Balance](/references/api/get-app-fee-balances) API reference. -### How to withdraw your off-chain balance? +**Withdraw your balance** To withdraw your app fees, use the app fees claim API. If using the API, the response will guide you through signing and submitting a message to the `/execute/permit` endpoint to verify ownership of your claim address. The SDK automates this process for you. @@ -219,7 +192,7 @@ curl -X POST \ Once done, you can check your balance again to verify the withdrawal. To learn more about this api, see the [Claim App Fee Balance](/references/api/claim-app-fees) API reference. -### Withdrawing via a smart contract +**Withdraw through a smart contract** In some cases you may want to accrue fees into a smart contract instead of an EOA. This can easily be done by setting the app fees recipient. The challenge is in claiming the fees to the contract. The claim API requires a signature to claim app fees but contracts cannot sign messages. To solve this, the API supports [EIP-1271](https://eips.ethereum.org/EIPS/eip-1271) which allows a smart contract to validate a signature using arbitrary logic. Once implemented our backend will check if the contract implements `isValidSignature` and use that method to verify the signature.