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

Review Weighted Pool fees/guardrails for "near-proportional" unbalanced adds #913

Closed
EndymionJkb opened this issue Aug 20, 2024 · 1 comment

Comments

@EndymionJkb
Copy link
Collaborator

v2 used to calculate the maximum invariant growth (and charge fees) based on the entire amount of liquidity added; in v3, we changed this to only charge fees on the "unbalanced" portion. So, adding very large amounts to a pool with very different weights "almost" proportionally will incur almost no fees. With batch settlement, it's possible to add unbalanced/withdraw proportional at almost no cost.

@jubeira
Copy link
Contributor

jubeira commented Oct 16, 2024

This has been reviewed. The implicit fee added in #1020 for sensitive pools (e.g. stable with low liquidity) + the rounding direction in computeInvariant should do the trick.

Moreover, there's no way to exit in the same tx without paying fees, as add unbalanced + remove proportional is taxed anyways.

@jubeira jubeira closed this as completed Oct 16, 2024
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

2 participants