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

SOR Add hooks support #809

Open
johngrantuk opened this issue Aug 20, 2024 · 0 comments
Open

SOR Add hooks support #809

johngrantuk opened this issue Aug 20, 2024 · 0 comments
Assignees

Comments

@johngrantuk
Copy link
Member

  • Any Balancer supported hook should be added to Balancer Maths package which will handle calculations given relevant pool and hook state.
  • Any Balancer supported hook should also be added to API (by API team) which will handle collecting/storing relevant hook state.
  • Pools with non-supported hooks should be ignored by SOR.
  • In the current SOR implementation the BalancerMaths library is also being used with pool state provided from API. Hook state should be passed in a similar manner.
  • Ideally we want to structure this in a way that makes this easy to do as we will likely have a number of hooks to support (doc of process would be helpful)

I'd suggest starting by adding support for the ExitFee hook. This has already been added to maths package and I believe Jarek has already added support in API.
See Balancer Maths ExitFee hook test for example of hook state required.
Currently maths uses hookType(see here) field on pool state to map a pool<>hook. Currently a string name. This may not match API implementation and we can figure out best approach.

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