What about non-competitive equilibria?
In my last post, I went through the process used to derive the competitive equilibrium allocation that I plugged into the trade function in our economic simulator. It wasn't just some arbitrary trade rule; I derived it from the agents' utility functions, making sure to meet certain conditions to define a competitive equilibrium.
To reach a competitive equilibrium, we must assume that both agents are price takers. That is, they don't set the terms of their trade; the market does, and they just trade according to the market price. In a competitive market, the equilibrium price is the one that satisfies the demand functions of all the agents, even when there are only two of them.
But what if we relax those assumptions? Our model is still using a barter economy, after all, and some people are better negotiators than others. So let's consider trades where the outcome will still be on the contract curve (i.e., the outcome will still be an equilibrium; i.e., there will be no more ways to trade without making someone worse off). But now let's look at what happens when one agent is able to negotiate a better price. The weaker negotiator will still benefit from trade, but not as much as they did in a competitive equilibrium.