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

enforce positive invariant and max EPSILON for trading functions #15

Open
Autoparallel opened this issue Feb 22, 2024 · 0 comments
Open
Assignees
Labels
📃 contracts Anything related to the DFMM contracts (or strategies) 🧹 improvement Code improvements or cleanup

Comments

@Autoparallel
Copy link
Contributor

Idea

When we have our bisection yield us a value now that is validated -EPSILON < invariant < EPSILON we need to instead take:

  • 0<= invariant < epsilon (which means adjusting how we do bisection a bit)
  • epsilon< MAX where MAX is chosen such that the trading curve maintains convexity.
@Autoparallel Autoparallel added the 🧹 improvement Code improvements or cleanup label Feb 22, 2024
@0xJepsen 0xJepsen added this to the 🔍 Contracts Audit milestone Feb 24, 2024
@clemlak clemlak self-assigned this Feb 28, 2024
@clemlak clemlak added the 📃 contracts Anything related to the DFMM contracts (or strategies) label Feb 28, 2024
@0xJepsen 0xJepsen assigned kinrezC and unassigned clemlak Mar 4, 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
Projects
None yet
Development

No branches or pull requests

4 participants