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

Every modifyPosition call burns less than 1 wei of fees owed to position #424

Open
moodysalem opened this issue Feb 26, 2021 · 1 comment
Labels
documentation testing verification verify properties of math or code

Comments

@moodysalem
Copy link
Contributor

moodysalem commented Feb 26, 2021

When we compute and accumulate feesOwed from the difference in fee growth inside snapshots, we lose less than 1 wei of fees in rounding error

An external user can mint 1 wei liquidity to a position they do not own to burn less than 1 wei of fees owed to the position owner

They can only do this for newly earned fees, i.e. after the call to mint the position must earn new fees for those fees to be burned

@moodysalem moodysalem added verification verify properties of math or code testing labels Feb 26, 2021
@moodysalem
Copy link
Contributor Author

moodysalem commented Feb 26, 2021

One solution to this problem is to use the remainder of the feesOwed calculation and the new liquidity value to compute the new fee growth inside snapshot for a position, however an average 0.5 wei of fees for the majority of tokens is not worth the gas to do this computation even on layer 2s

@moodysalem moodysalem changed the title Every modifyPosition call burns up to 1 wei, exclusive, of fees Every modifyPosition call burns up to 1 wei, exclusive, of fees owed to position Feb 26, 2021
@moodysalem moodysalem changed the title Every modifyPosition call burns up to 1 wei, exclusive, of fees owed to position Every modifyPosition call burns less than 1 wei of fees owed to position Mar 1, 2021
@Uniswap Uniswap deleted a comment from curtcurt87 Apr 4, 2021
@Uniswap Uniswap deleted a comment from hayalet27 Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation testing verification verify properties of math or code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@moodysalem and others