**Abstract:**

We consider the bilateral trade of an object between a seller and a buyer through an intermediary who aims to maximize his expected gains as in Myerson and Satterthwaite \cite{ms83}, in a Bayes-Nash equilibrium framework where the seller and buyer have private, discrete valuations for the object. Using duality of linear network optimization, the intermediary's initial problem is transformed into an equivalent linear programming problem with explicit formulae of expected revenues of the seller and the expected payments of the buyer, from which the optimal mechanism is immediately obtained. Then, an extension due to Spulber
\cite{spul88} is considered where the seller is also a producer with a cost parameter that is private information. Assuming suitable utility and production functions for the respective parties, the resulting non-convex mechanism design problem of a utility maximizing broker is revealed to have hidden convexity and transformed into an equivalent (almost) unconstrained convex optimization problem over output variables, which, in many cases, can be solved easily by calculus.
{\bf Keywords:} Bilateral intermediated trade, linear programming, duality, hidden convexity.