Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

allow slippage to be set when pay by swap #14680

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gilescope
Copy link
Contributor

Currently None is passed as the minimum swap return amounts when paying by swap. In a heavy MEV environment this could lead to people paying too much in fees. This PR surfaces the optional max_fee parameter so that wallets can (and ideally should) set this to a sensible value to ensure that there is a limit to how much a MEV bot could manipulate the fx rates and the transaction still succeed.

@gilescope gilescope requested review from a team July 29, 2023 08:23
@gilescope gilescope added A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. B1-note_worthy Changes should be noted in the release notes labels Jul 29, 2023
@gilescope gilescope added the T1-runtime This PR/Issue is related to the topic “runtime”. label Jul 29, 2023
Copy link
Contributor

@jsidorenko jsidorenko left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B1-note_worthy Changes should be noted in the release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. T1-runtime This PR/Issue is related to the topic “runtime”.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants