We study a barter economy in which each good is produced in two qualit
ies and no trader can distinguish between the qualities of those goods
he neither consumes nor produces. We show that in competitive equilib
rium there exists a (unique) good-the one for which the discrepancy be
tween qualities is smallest-that serves as the medium of exchange: thi
s good mediates every trade. Equilibrium is inefficient because produc
tion of the medium would be lower if it were not for its mediating rol
e. Introducing fiat money enhances welfare by eliminating this distort
ion. However, high inflation drives traders back to the commodity medi
um.