This PR supports more different types of withdraw stakes:
All, withdraw all the known stake
Percent, withdraw a given percentage of the known stake
Stake, withdraw a given amount of stake (i.e. balance)
The stake is calculated by the share price at this instant, it may not be accurate and may withdraw a bit more stake if there is reward happen later in this epoch
Share, withdraw a given amount of share, same as the current withdraw_stake
NOTE: the deposit that happens in the current epoch may not be withdrawn until the current epoch ends and the above
calculation doesn't include such a deposit.
This PR supports more different types of withdraw stakes:
withdraw_stake
NOTE: the deposit that happens in the current epoch may not be withdrawn until the current epoch ends and the above calculation doesn't include such a deposit.
cc @marc-aurele-besner
Code contributor checklist: