blockparty
blockparty copied to clipboard
Handle undividable leftover deposit
When 4 deposits are split by 3 people, the division becomes 1.3333.... which leaves small portion into the contract and make contract balance inconsistent with the actual balance.
The solution would be
- Rather than resetting
balance = 0
at payout, dobalance = balance - payout
- Return the remaining to contract owner when the event ends.