I found the reference to "- 1%" ...
I found the reference to "- 1%" to be confusing. At first I was trying to take 1% of the remaining balance.
This sentence made it clear: "+ 1% from the withdrawn cash plus the robots cannot go beyond the card’s balance."
Perhaps the comments in the code can be updated to reflect this such as: