It's possible for the USD value of the pool to go up while the total supply increases even further, in which case the user won't pay the uplift fee.
The value of the LP token will compute the total USD value in the pool divided by the total supply. If the value from the moment of the withdrawal goes up compared with the value of the deposit, the user must pay a uplift fee, otherwise he must pay a minimum fee.
The value of the LP token will be the USD value of the tokens in the pool divided by the total supply.
We are able to simulate a scenario where the USD value of the pool goes up and the user still doesn't pay the fee if the total supply increases further. For example:
We can see the LP value went down (from ~15e18 to 10e18), but the nominal USD value in the pool went up (from 32000 USD to 32500 USD).
However, even if the nominal USD value went up, Alice didn't had to pay the uplift fee since the lp value is used to compute the uplift.
User can bypass the uplift fee and ultimately pay less to close his position.
Manual review.
Consider using the nominal USD value instead of the USD value divided by the total supply. However, If this behavior is intended, consider adding a comment in the codebase to clarity this scenario.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.