Closed fuzzyduke closed 5 months ago
This fall more into this case:
Bond | Value | Compensation | Value |
---|---|---|---|
bond amount | 10 ITHEUM | accumulated amount | 0 ITHEUM |
remaining amount | 10 ITHEUM |
After 5% and 50% | Bond | Value | Compensation | Value |
---|---|---|---|---|
bond amount | 10 ITHEUM | accumulated amount | 5.5 ITHEUM | |
remaining amount | 4.5 ITHEUM |
If user tries to withdraw before unbond period(timestamp) 35% is added
After another 35% | Bond | Value | Compensation | Value |
---|---|---|---|---|
bond amount | 10 ITHEUM | accumulated amount | 5.5 + 3.5(9) ITHEUM | |
remaining amount | 4.5 - 3.5 (1.5) ITHEUM |
But there is another check here: remaining amount (4.5) - penalty (3.5) > accumulated_amount (5.5), because this check is false
the value it's "forfeit".
The user should be able to withdraw 1.5 after the unbond period has passed.
CC: @damienen @newbreedofgeek
Solved. Closing
Bond amount: 10 ITHEUM
Penalty was set to 5% Maximum Slash: 50% Early withdrawal:35%
After penalty of 5% was applied, 9.5 ITHEUM remained After Slash of 50% was applied, 4.5 remained Early withdrawal of 35% threw an error below, when we still have 45% remaining. It should deduct and return 10% to the user.
https://devnet-explorer.multiversx.com/transactions/e8a346efc1cb30d5791c9dd390829631937e886b5da03890b23061522fd33d45