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

Optmization: add helper function to get one direction protocolFee #40

Closed
chefburger opened this issue May 9, 2024 · 2 comments
Closed

Comments

@chefburger
Copy link
Collaborator

chefburger commented May 9, 2024

Consider add helper function to get protocolFee for a specific direction, so that instead of

uint16 protocolFee = params.zeroForOne
    ? slot0Start.protocolFee.getZeroForOneFee()
    : slot0Start.protocolFee.getOneForZeroFee();

we can have

uint16 protocolFee = slot0Start.protocolFee.getProtocolFee(param.zeroForOne);

Originally posted by @ChefMist in #36 (comment)

@ChefMist
Copy link
Collaborator

I think its fine not to have this, current way is fine too. what do you think?

@chefburger
Copy link
Collaborator Author

same page, close for now

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

No branches or pull requests

2 participants