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

Better LP fee evaluation based on virtual takers not real takers #2305

Closed
davidsiska-vega opened this issue Jun 19, 2024 · 5 comments
Closed
Assignees

Comments

@davidsiska-vega
Copy link
Contributor

At the moment the LP rewards are distributed based on LP fees received. This is gameable. Instead calculate "virtual LP fees received in quantum" which would be the amount resulting from the of trade notional of one quantum unit, happening at current markprice, once per LP fee evaluation time step. Distribute LP rewards at epoch end relatively based on this accumulate "virtual LP fee received in quantum".

@witgaw
Copy link
Contributor

witgaw commented Jul 8, 2024

PR on hold for now.

@barnabee
Copy link
Member

To prioritise this it would be useful to add in this ticket the exploit vectors and a brief assessment of the probability and impact of each @davidsiska-vega

@davidsiska-vega
Copy link
Contributor Author

How to game current setup:

  1. as an LP keep badly priced volume most of the epoch.
  2. at a chosen time place your volume better so you are scored highly
  3. start some wash trading bots (with a different key); this collects trading fees for you and you get most (because of your well priced volume)
  4. move your volume out again to reduce position risk
  5. at epoch end, rewards distributed based on LP fees received mean that you collect most rewards even if you didn't provide good liquidity (or better than others anyway).

@davidsiska-vega
Copy link
Contributor Author

Maybe not a big deal; if other LPs on the market notice this, they can do the same thus negating this attack.

@davidsiska-vega
Copy link
Contributor Author

Close this - won't be an issue with liquidity v3.0

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

Successfully merging a pull request may close this issue.

4 participants