Skip to content

feat: allow any fastswap slippage#922

Merged
owen-eth merged 2 commits intomainfrom
fastswap-slippage-cap
Apr 28, 2026
Merged

feat: allow any fastswap slippage#922
owen-eth merged 2 commits intomainfrom
fastswap-slippage-cap

Conversation

@owen-eth
Copy link
Copy Markdown
Contributor

Describe your changes

-Cap user-supplied slippage at 2% before calling Barter (Barter's max), in both CallBarterAPI (Path 1) and CallBarterAPIForETH (Path 2). Higher user tolerances now route successfully instead of being rejected by Barter.

-UserAmtOut (user's minAmountOut) is untouched and still enforced via the existing outAmt < UserAmtOut check, so any actual slippage between 2% and the user's tolerance flows through as settlement surplus → more miles.

-Added Info log when slippage is capped (with requested value + path) and Warn log when slippage is unparseable or out of [0, 100] (falls back to existing 0.5% default — no behavior change, just visibility).

Issue ticket number and link

Fixes # (issue)

Checklist before requesting a review

  • I have added tests that prove my fix is effective or that my feature works
  • I have made corresponding changes to the documentation

@owen-eth owen-eth changed the title allow any slippage, cap barter call at 2% but still use provided minOut feat: allow any slippage, cap barter call at 2% but still use provided minOut Apr 24, 2026
@owen-eth owen-eth changed the title feat: allow any slippage, cap barter call at 2% but still use provided minOut feat: allow any fastswap slippage Apr 24, 2026
@kant777 kant777 self-requested a review April 24, 2026 04:04
@owen-eth owen-eth merged commit c84c550 into main Apr 28, 2026
7 checks passed
@owen-eth owen-eth deleted the fastswap-slippage-cap branch April 28, 2026 21:50
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.

2 participants