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

Fix: Update Liquidity #159

Open
maxrobot opened this issue Oct 31, 2022 · 0 comments
Open

Fix: Update Liquidity #159

maxrobot opened this issue Oct 31, 2022 · 0 comments

Comments

@maxrobot
Copy link
Contributor

maxrobot commented Oct 31, 2022

Description:

Currently liquidity and thus terminal price are fixed upon deployment of a vAMM.

However in the future we may wish to both:

  • Increase/Decrease Liquidity
  • Repeg the terminal price

Alteration of liquidity could be performed by passing a new invariant (k = x*y) and applying the ratio of the root of k to both the quote and base asset reserves. Doing so changes the liquidity without significant change in the terminal price (in theory).

Repegging the terminal price works slightly differently. Where terminal price is the price on initialisation or on the closure of all user positions.

Since in the Margined vAMM price = quote_asset_reserves/base_asset_reserves one approach could be to simply update the quote and base asset reserves. However, doing so would not allow us to immediately adjust the terminal price as all existing positions would not have been applied.

Therefore repegging must take into account the existing delta between the users positions to repeg directly.

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