Idk if anyone has played pokemon when they where young, but the trafing system on that is pretty good. Both players choose what they want to trade and at the end they both need to accept it or else you cant trade. If someone closes the app or loses connection, both players will keep their items.
Trading system*