How are discrepancies with integer division handled in production contracts?

In my Escrow contract I have an item worth

0.1 ether and 1 wei = 100,000,000,000,000,001 wei.

I need to divide this amount in half, and send it to two people.

100,000,000,000,000,001 / 2

Each person would be receiving 50,000,000,000,000,000 and ignoring the 1 wei because of the floor division in Solidity.

payable(user_one).transfer(50000000000000000);
payable(user_two).transfer(50000000000000000);

How is this issue handled in production? Is it ignored because of the insignificant amount being lost?

Leave a Comment