The Thermodynamics of Unequal Exchange