1e18 was a magic number we derived as for most cases, most pool will have at least that amount of liquidity easily
Why we change:
potentially there might be other scenario that we've missed where pool might have lesser than 1e18 liqudity (eg. pool where token0 and token1 price differences are very big and very little token in pool)
1e3 would probably be a good min level (similar to pcs v2 of burning 10e3 lp), as attacker need at least 3x fund of victim to perform share inflation. eg. if they mint with 1000 token, attacker need 1000 * 1e3 tokens.
However we are keeping the initial 2 ** 128 for now until we see such cases where we need to adjust setMinBinSharesForDonate
This PR tweaks the
minBinShareForDonate
from1e18
to1e3
Context:
1e18
was a magic number we derived as for most cases, most pool will have at least that amount of liquidity easilyWhy we change:
potentially there might be other scenario that we've missed where pool might have lesser than 1e18 liqudity (eg. pool where token0 and token1 price differences are very big and very little token in pool)
1e3
would probably be a good min level (similar to pcs v2 of burning10e3
lp), as attacker need at least 3x fund of victim to perform share inflation. eg. if they mint with 1000 token, attacker need 1000 * 1e3 tokens.However we are keeping the initial
2 ** 128
for now until we see such cases where we need to adjustsetMinBinSharesForDonate