So player A takes Player B stake of 100 gem gets 50 gems.

Player A spends the 50 gems.

Player A powers down. Player B takes back his 50 gem.

Player B now has 100 gem and Player A has 50 gem.

Is this what you intended to do?

What is your QA process in this company? Another really Messed up situation.

Take it even further. Player A retake the 50 Gem again after Player B takes it back.

Rinse and repeat for UNLIMITED GEMS?

WTF?