-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does this formula really work? #1
Comments
What is K actually? |
Does |
How much profit did you guys get? |
@pememoni Absolutely correct, this repo wrongly assumes the same k for the frontrun tx and the sandwiched tx. Indeed, k remains constant within a single swap only, because of the liquidity provider fees. To verify this claim, take the following lp parameters:
Calling |
I think you have assumed that K is constant; while in practice, Uniswap applies a 0.30% fee to trades, which is added to reserves. As a result, each trade actually increases k. So if we want to use this formula a) we should know the K exactly before the execution of our transaction which is not possible as we don't have control on the previous transaction even if we bribe the miner to execute it in a higher-order b) we should compute the new K after our front-running tx and affect it for the original transaction. Am I right?
The text was updated successfully, but these errors were encountered: