From what I have heard, the exchange of goods defined by the intersection of supply and demand generally maximize quantity traded, although this doesn't apply in cases of monopolies, imperfect information etc. I am trying to understand why this is true, and came across what appears to be a counter example:
There are 4 people in a market for eggs, 2 buyers and 2 sellers. The buyers are each willing to pay up to \$10 and \$3 for 1 egg each. The sellers are willing to sell an egg each at \$9 and \$2. The most productively efficient trades are when one egg is bought for some price between \$9 and \$10 and another is bought for some price between \$2 and \$3. What happens according to supply and demand is that one egg is traded for a price between \$3 and \$9.
The fact that there is one price seems, in this case, to reduce the total traded quantity. What am I missing?