[V134-specific] Do not swallow add liquidity to a non-empty zero-units pool
[V134-specific]
Together with !2866
'Zero-unit pools in querier (and modifications to full-withdraw logic and RagnarokTx Amount)',
closes #1506
'Add liquidity and /pools endpoint do not reflect zero-LP_units pools'.
Specifically, this is intended to be a straightforward change to resolve the second portion of that Issue:
if a new liquidity provider attempts to add liquidity to the pool (expecting it to again have units), they find the pool swallows their added liquidity, leaving them with no
units
norasset_deposit_value
norrune_deposit_value
.
Update:
According to this discussion thread (and its linked regression tests),
a CalcUnits
now added to update the SynthUnits before the add liquidity DepositValue calculations.
2024-05-17 update:
As this has now affected a Mainnet user
(details in #1506, loss of 8,230 RUNE and ~16.55 ETH.WSTETH unless refunded through Treasury or store migration)
I increase the Priority label from P3
P3 = feature request or other new business
to P0
P0 = loss of funds, chain downtime, etc.
.