Closed prayagd closed 5 days ago
Hey team! Please add your planning poker estimate with Zenhub @ebma @Sharqiewicz @TorstenStueber
What does 'not calculated properly' mean? Can you give an example when it fails? Is removing the buttons the best idea to solve this though?
The way it was defined in the code (and I did not change this anymore when I took it over): the max button selects the maximum amount of tokens you could deposit in theory, i.e., 100% of your LP tokens. Similar for the 50% button.
However, that is not the actual maximum amount possible. In some situations you are not able to return all LP tokens because of some limits or because there are not enough tokens in the pool to return.
Here the argument is that the user would expect that the Max button does not select 100% of your LP tokens but the exact maximum of tokens you are able to return in this situation.
This kind of problem happens for four operations:
There is no function in the smart contracts to calculate these maximum values (and we can't add them, otherwise they become too big for pallet contracts).
That means that we would need to do the calculation of the current maximum amount in the UI. This is not trivial and I wanted to leave it out in the initial version of the Nabla UI.
What I mean: we should remove the 50% and Max buttons for all these four operations and not just for backstop pool withdrawals (and stated in this ticket).
@TorstenStueber got it, updated the ticket
Context
Currently the max values are not calculated properly in the Backstop pool(BSP) withdraw UI
Requirement
Note
This is both for the Pendulum and Foucoco deployment
Reference