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

Simplify allocate and deallocate flow for solvers #115

Open
1 task
0xJepsen opened this issue Apr 2, 2024 · 0 comments
Open
1 task

Simplify allocate and deallocate flow for solvers #115

0xJepsen opened this issue Apr 2, 2024 · 0 comments
Labels
📃 contracts Anything related to the DFMM contracts (or strategies) 🧹 improvement Code improvements or cleanup 🛠️ kit Anything related to the DFMM kit

Comments

@0xJepsen
Copy link
Contributor

0xJepsen commented Apr 2, 2024

The log normal solver has redundant implementations for the allocation and deallocation data getters. They should only return abi byte encoded deltas. In general each solver should have three pure getters that return the

  • valid abi encoded data for the update data call(s)
  • valid abi encoded data for the allocate and deallocate calls and
  • valid abi encoded data for the swap calls.

I think the update and swap calls are correct right now I have only implemented the pool type here #35, after merging in the spearbit fixes and getting new bindings. But the Constant sum allocations are not there and the log normal allocations are redundant. I have yet to finish the G3M and n-pools G3M.

Should we use the strategy lib here? there are redundant implementations it seems.

  • Rename allocate and deallocate helpers to prepare

functions in each solver should call the strategy lib and return the abi-encoded result

@0xJepsen 0xJepsen added 🧹 improvement Code improvements or cleanup 🛠️ kit Anything related to the DFMM kit 📃 contracts Anything related to the DFMM contracts (or strategies) labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📃 contracts Anything related to the DFMM contracts (or strategies) 🧹 improvement Code improvements or cleanup 🛠️ kit Anything related to the DFMM kit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant