Resolve "[docs] Add liquidity_tolerance_bps to quickstart swap guide"
Summary
Updates the swap quickstart guide to promote liquidity_tolerance_bps as the preferred slippage
parameter over the legacy tolerance_bps parameter.
Changes
-
Primary Update: Changed recommended slippage parameter from
tolerance_bpstoliquidity_tolerance_bps - Key Improvement: The preferred parameter accounts for swap and outbound fees when calculating price limits, resulting in fewer failed swaps for users
-
Documentation Fixes:
- Updated all example URLs throughout the guide to use
liquidity_tolerance_bps - Modernized error response examples to match current API format
- Added new error sections for minimum swap amount and dust threshold
- Updated all example URLs throughout the guide to use
Motivation
The tolerance_bps parameter calculates price limits based solely on the input asset value without
accounting for fees. This causes swaps to fail more frequently when the actual output (after fees) falls
below the limit, even though the swap would be acceptable to users.
The liquidity_tolerance_bps parameter calculates limits based on expected_amount_out, which already
accounts for all fees, providing a more accurate and user-friendly slippage protection mechanism.
Testing
-
✅ All example URLs tested against live API -
✅ Error messages verified against current API responses -
✅ Technical claims validated against source code (x/thorchain/querier_quotes.go) -
✅ Cross-references checked and validated -
✅ Trunk linting passed
Related Issue
Closes #2258 (closed)
Edited by GrassRoots Crypto