Quote a bid and an ask while customers arrive: earn the spread, manage the inventory you pile up and see when informed traders take your money.
A market maker stands ready to buy at the bid and sell at the ask, all day, to anyone. When a buyer and a seller arrive one after the other, the market maker earns the spread between the two prices. That is the business: income is roughly the spread times the volume that is matched on both sides. The catch is that customers do not arrive in neat pairs. Between trades the market maker holds inventory whose value moves with the market, and some customers trade because they know where the price is going. This lab lets you play the role yourself and see where the money comes from and where it goes.
By buying at the bid and selling at the ask. Each matched round trip earns the spread, so a first estimate of income is spread × matched volume. A wider spread earns more per trade but attracts fewer customers, because they can find better prices elsewhere or simply decide not to trade. The best spread balances income per trade against the number of trades, which you can find by experiment in the lab.
Because the number of fills falls as the spread widens. If the arrival rate of customers decays with the distance of your quote from the fair price, doubling the spread can more than halve the volume. Total income is the product of the two, so it rises at first and then falls. A spread that is too narrow, on the other hand, may not cover the losses to informed traders.
When more customers sell to you than buy from you, you end up long the asset, and the other way round. That position gains or loses as the price moves, often much more than the spread you earned on the trades. Market makers therefore shade their quotes: with a long position they lower both bid and ask to encourage buyers and discourage further sellers, until the inventory comes back towards zero.
Some customers trade because they know the price is about to move. They buy from you just before the price rises and sell to you just before it falls, so every trade with them loses money. A common misconception is that the spread is pure profit; in reality part of it is an insurance premium paid by uninformed traders to cover the losses to informed ones.