All changes in the trade window (items put, items removed, changes in amounts of gold, clicking "trade") go through the server. It's trivial to alter the server so the trade is not made if the amount of gold or the items being traded have been changed in the last moment before the trade button is pressed, which is how 99.9999% of scams happen. Come on.