  In this paper, we study a class of first-order mean-field games (MFGs) that
model price formation. Using Poincar{\'e} Lemma, we eliminate one of the
equations and obtain a variational problem for a single function. This
variational problem offers an alternative approach for the numerical solution
of the original MFGs system. We show a correspondence between solutions of the
MFGs system and the variational problem. Moreover, we address the existence of
solutions for the variational problem using the direct method in the calculus
of variations. We end the paper with numerical results for a linear-quadratic
model.
