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

vAMM implementation introduced a number of approximaitons to the the formulae... #2357

Open
davidsiska-vega opened this issue Sep 4, 2024 · 0 comments

Comments

@davidsiska-vega
Copy link
Contributor

davidsiska-vega commented Sep 4, 2024

vAMM implementation introduced a number of approximations to the the formulae, we need to review those and update the spec to match.

Also add a note of the market parameter used for this vegaprotocol/vega#11642

We need a method / API to

  1. calculate the minimum valid commitment from:
  • market id (for market parameters like tick size and decimals etc.)
  • base price
  • range
  • leverage at bounds
  1. calculate minimum range from:
  • market id (for market parameters like tick size and decimals etc.)
  • commitment amount
  • base price
  • leverage at bounds
  1. calculate leverage at bounds:
  • market id (for market parameters like tick size and decimals etc.)
  • commitment amount
  • range
  • base price

We should make clear that a commitment amount that's been valid stays valid (unless the price move outside the range).

Comment from @JonRay15: "ideally this would be baked into that same estimateAMMBounds API I would imagine"

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

1 participant