That seems to be okay. I'm worried about security if you are relying on the client to tell the server what it wants to trade. A more secure solution is to send down which inventory slot you want to trade to the server and then the server determines what object is in that slot... they should be the same. This way you avoid a hack where a client can trade an object it doesn't have by sending down the ID of an object it doesn't have.

Other than that, seems doable... but the proof is in the pudding. You'll need to implement your idea in order to truly see if it will work!