docs: clarify fixedRate and subsidizeFees are independent - #464
Conversation
The fixed-rate section only documented the sponsored configuration: its worked figures assume subsidizeFees: true and the only request example passes it, so integrators read fee sponsorship as a prerequisite for fixed rates. Document the subsidizeFees: false case, and describe fixedRateFee as a quote-time estimate rather than the settled amount. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Claude encountered an error after 3m 37s —— View job Code review — PR #464
Note on method: VerdictThe arithmetic is correct and the new model is self-consistent with the rest of the page — I checked it end to end. Taking "a fixed rate pins the pre-fee output" as the model:
The new figures also reconcile against the live response body already on the page: Two things I'd follow up on. 1. The new section says the settings are independent, then the Warning reveals a shared prerequisite
Read on its own, an integrator concludes that fixed rates need no fee-sponsorship setup. But the Warning added at So the parameters are independent, but the infrastructure isn't. The section is 600 lines away from the Warning that discloses this. Worth one sentence at L684 along the lines of: turning off 2. "your sponsoring wallet's balance" doesn't match the established terminology
The rest of the docs draw a distinction the new Warning collapses: the Fee Sponsorship Wallet is the wallet that funds your app balance, and fees are drawn from the app balance, not from the wallet ( Suggest "settles against your app balance." This is the only place in Smaller notesThe remaining request example still pairs the two. The PR description identifies "the only request example passes Pre-existing, but now load-bearing: Style (AGENTS.md §2.9): prose parameter references should be bold+backticks ( Unverifiable from this repo: No changes pushed — this was a review. |
|
| So with `"fixedRate": "1:1"` and `"subsidizeFees": false`, the pre-fee output is pinned at 100 USDT and the \~\$0.03 fee comes out of it. The user receives 99.97 USDT at any market rate, and your position is the spread alone: | ||
|
|
||
| If 1 USDT = 1.0000 USDC, user gets 99.97 USDT, you neither sponsor nor earn <br/> | ||
| If 1 USDT = 0.9995 USDC, user gets 99.97 USDT, you earn \$0.05 <br/> | ||
| If 1 USDT = 1.0005 USDC, user gets 99.97 USDT, you sponsor \$0.05 |
There was a problem hiding this comment.
Variable Fees Break Exact Output
This introduces the fee as approximately $0.03 but then guarantees that the user receives exactly 99.97 USDT “at any market rate.” Relay fees include variable components, and this page’s own quote example shows a different sponsored-fee total. A fixed rate pins the pre-fee amount, but it does not guarantee this exact post-fee output. Integrators relying on this statement could promise an amount that the resulting quote does not deliver; keep the amount approximate and direct readers to the quote’s actual output and fee fields.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
The fixed-rate section only documented the sponsored configuration: its worked figures assume subsidizeFees: true and the only request example passes it, so integrators read fee sponsorship as a prerequisite for fixed rates. Document the subsidizeFees: false case, and describe fixedRateFee as a quote-time estimate rather than the settled amount.