Skip to content
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

feat: price impact excludes fees #325

Merged
merged 4 commits into from
Sep 8, 2023
Merged

Conversation

Voyz
Copy link
Contributor

@Voyz Voyz commented Mar 18, 2023

  • added util functions for fee calculations
  • price impact calculation now excludes fees

Based on discussion in: #310

@Voyz
Copy link
Contributor Author

Voyz commented Jun 22, 2023

@ErikBjare just wanted to bring this PR to your attention again

Copy link
Member

@ErikBjare ErikBjare left a comment

Choose a reason for hiding this comment

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

Looks good! Just remove the unused function and format with black.

uniswap/util.py Outdated
def fee_to_fraction(fee:int):
return fee / 1000000

def fraction_to_fee(fraction:float):
Copy link
Member

Choose a reason for hiding this comment

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

Unused

@Voyz
Copy link
Contributor Author

Voyz commented Jul 21, 2023

Hey @ErikBjare removed the function and formatted with black 👍

@Voyz
Copy link
Contributor Author

Voyz commented Sep 7, 2023

@ErikBjare just wanted to bring this PR to your attention again

@ErikBjare
Copy link
Member

Very nice, thanks for the ping!

@ErikBjare ErikBjare merged commit 9a1318f into uniswap-python:master Sep 8, 2023
@ErikBjare
Copy link
Member

And thanks for contributing! ❤️

@Voyz
Copy link
Contributor Author

Voyz commented Sep 8, 2023

Glad to have helped! 🙌

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