Skip to content

docs(protocol-fees): add protocol fees documentation and navigation#68

Open
aimensahnoun wants to merge 1 commit into03-02-docs_api-features_rewrite_platform-fees_as_implementation-focused_guide_refactor_api-features_platform-fees.mdx_to_document_platform-fee_configuration_clearly_and_accurately_for_v2_api_consumers._-_remove_ai_placeholder_framing_from
03-02-docs_api-features_add_protocol-fees_page_and_include_it_in_fee_structure_nav_introduce_a_dedicated_protocol_fees_page_using_legacy_fee_documentation_as_the_source_of_truth_and_register_it_in_api_features_navigation._-_add_api-fe
Open

docs(protocol-fees): add protocol fees documentation and navigation#68
aimensahnoun wants to merge 1 commit into03-02-docs_api-features_rewrite_platform-fees_as_implementation-focused_guide_refactor_api-features_platform-fees.mdx_to_document_platform-fee_configuration_clearly_and_accurately_for_v2_api_consumers._-_remove_ai_placeholder_framing_from
03-02-docs_api-features_add_protocol-fees_page_and_include_it_in_fee_structure_nav_introduce_a_dedicated_protocol_fees_page_using_legacy_fee_documentation_as_the_source_of_truth_and_register_it_in_api_features_navigation._-_add_api-fe

Conversation

@aimensahnoun
Copy link
Member

@aimensahnoun aimensahnoun commented Mar 2, 2026

TL;DR

Added comprehensive documentation for protocol fees charged by Request Network API on all payment types.

What changed?

Created a new documentation page api-features/protocol-fees.mdx that explains:

  • Protocol fee structure (5 basis points with ~$25/€25 cap for major stablecoins)
  • Payment types subject to fees (ERC20, native currency, conversion, batch, crosschain, and upcoming subscription payments)
  • Default fee responsibility (payer bears the cost)
  • Method to shift fees to payee by reducing invoice amount
  • Platform fee integration and batching
  • Fee information included in API responses

Added the protocol fees page to the navigation structure under the "Fee Structure" group in docs.json.

How to test?

Review the documentation page to ensure:

  • Fee calculations and examples are accurate
  • Navigation links work properly in the documentation site
  • Content is clear and follows existing documentation standards
  • JSON response examples are properly formatted

Why make this change?

This documentation provides essential transparency about Request Network's fee model, helping developers understand costs associated with API usage and giving them options for fee management in their applications.

…cture nav

Introduce a dedicated Protocol Fees page using legacy fee documentation as the source of truth, and register it in API Features navigation.
- add `api-features/protocol-fees.mdx` with legacy-aligned protocol fee content
- preserve legacy fee structure details (rate, cap, covered payment types)
- keep legacy “Who Pays the Fee?” and “Shifting the Fee to the Payee” explanations and examples
- include protocol + platform fee coexistence section and metadata response example
- update `docs.json` to add `api-features/protocol-fees` under Fee Structure
This separates protocol-fee policy from platform-fee implementation and improves Fee Structure discoverability.
This was referenced Mar 2, 2026
Copy link
Member Author

aimensahnoun commented Mar 2, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@aimensahnoun aimensahnoun self-assigned this Mar 2, 2026
@aimensahnoun aimensahnoun changed the title docs(api-features): add protocol-fees page and include it in Fee Structure nav Introduce a dedicated Protocol Fees page using legacy fee documentation as the source of truth, and register it in API Features navigation. - add `api-features/protocol-fees.md docs(protocol-fees): add protocol fees documentation and navigation Mar 2, 2026
@aimensahnoun aimensahnoun marked this pull request as ready for review March 2, 2026 14:34
@greptile-apps
Copy link

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Adds comprehensive protocol fees documentation explaining Request Network's 5 basis point fee structure with ~$25/€25 cap on stablecoins. Found two grammar errors and one calculation error in the fee-shifting example that need correction.

Key Issues:

  • Grammar: "fees applies" should be "fee applies" (line 16)
  • Typo: "simple reduce" should be "simply reduce" (line 42)
  • Logic: Fee-shifting example shows incorrect payee receives amount - should be 999.50 USDC, not 999.95 USDC (lines 46-51)

What Works Well:

  • Clear fee structure table and payment type coverage
  • Good cross-references to platform fees and fee breakdowns
  • Proper navigation placement in docs.json
  • Well-structured examples for default fee flow

Confidence Score: 3/5

  • Safe to merge after fixing calculation error and grammar issues
  • Documentation-only changes with no runtime impact, but contains accuracy issues that should be corrected: two grammar errors and an incorrect mathematical example in the fee-shifting section that could mislead users
  • Fix calculation in api-features/protocol-fees.mdx lines 46-51 before merging

Important Files Changed

Filename Overview
api-features/protocol-fees.mdx New protocol fees documentation with grammar errors and incorrect calculation in fee-shifting example
docs.json Properly adds protocol-fees to Fee Structure navigation group

Last reviewed commit: c0b0763

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

| ------------ | ---------------------- | ------------------------------------------------- |
| Protocol Fee | 5 basis points (0.05%) | ~$25/€25 for main USD and EUR backed stablecoins |

The protocol fees applies to all the payment types
Copy link

Choose a reason for hiding this comment

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

grammar: "fees applies" is incorrect - use "fee applies" (singular) or "fees apply" (plural)

Suggested change
The protocol fees applies to all the payment types
The protocol fee applies to all the payment types


## Shifting the Fee to the Payee

If you want the payee to bear the protocol fee instead of the payer, simple reduce the invoice amount by 5bps (0.05%) before creating the request.
Copy link

Choose a reason for hiding this comment

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

"simple reduce" should be "simply reduce"

Suggested change
If you want the payee to bear the protocol fee instead of the payer, simple reduce the invoice amount by 5bps (0.05%) before creating the request.
If you want the payee to bear the protocol fee instead of the payer, simply reduce the invoice amount by 5bps (0.05%) before creating the request.

Comment on lines +46 to +51
- Original intended payment: 1000 USDC
- Reduce by 0.05%: 1000 - (1000 x 0.05%) = 999.50 USDC
- Total paid by the payer: 1000 USDC + gas fee
- Amount received by payee: 999.95 USDC

This way, the payer pays approximately the original amount while the payee effectively absorbs the fee.
Copy link

Choose a reason for hiding this comment

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

incorrect calculation - if invoice is reduced to 999.50 USDC, the payee receives 999.50 USDC, not 999.95 USDC

The math should be:

  • Reduced invoice: 999.50 USDC
  • Payer pays: 999.50 + (999.50 × 0.05%) ≈ 999.9975 USDC (≈ 1000 USDC)
  • Payee receives: 999.50 USDC (not 999.95)
Suggested change
- Original intended payment: 1000 USDC
- Reduce by 0.05%: 1000 - (1000 x 0.05%) = 999.50 USDC
- Total paid by the payer: 1000 USDC + gas fee
- Amount received by payee: 999.95 USDC
This way, the payer pays approximately the original amount while the payee effectively absorbs the fee.
- Original intended payment: 1000 USDC
- Reduce by 0.05%: 1000 - (1000 x 0.05%) = 999.50 USDC
- Invoice amount: 999.50 USDC
- Protocol fee: 999.50 x 0.05% = 0.4975 USDC
- Total paid by the payer: 999.9975 USDC ≈ 1000 USDC + gas fee
- Amount received by payee: 999.50 USDC

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.

1 participant