Why Automatic Market Makers?
Overview
Markets have existed for thousands of years as mechanisms for matching buyers and sellers. In their simplest form, buyers submit bids, sellers submit offers, and transactions occur whenever the two agree on a price.
While simple in principle, this approach becomes increasingly difficult as markets become larger, more dynamic and more decentralised. Buyers and sellers may not always arrive simultaneously, liquidity may be limited, and finding a fair market price can require significant coordination.
Historically, these problems have been addressed through market makers.
A market maker continuously quotes prices at which they are willing to buy and sell an asset, providing liquidity even when no direct counterparty exists. Rather than waiting for buyers and sellers to find each other, the market maker sits in the middle, facilitating trades and continuously adjusting prices as market conditions change.
An Automatic Market Maker (AMM) replaces this human decision making with mathematics.
Instead of manually quoting prices, an AMM uses a pricing function that continuously determines buy and sell prices from the current state of the market.
From Human Market Makers to Algorithms
Traditional exchanges rely on order books.
Buyers submit bids.
Sellers submit offers.
Whenever the highest bid exceeds the lowest offer, a trade occurs.
This works well for highly liquid markets, but performs poorly when liquidity is fragmented or participants arrive asynchronously.
Market makers solve this problem by continuously offering to buy and sell assets.
Rather than discovering prices through negotiation alone, prices become the output of a continuously updated pricing strategy.
Automatic Market Makers extend this idea one step further.
The pricing strategy itself becomes an algorithm.
Instead of asking a trader what price should be quoted, the algorithm computes the price directly from the current state of the market.
Examples of Automatic Market Makers
Different AMMs have been designed for different purposes.
Logarithmic Market Scoring Rule (LMSR)
One of the earliest examples was the Logarithmic Market Scoring Rule (LMSR), developed by Robin Hanson for prediction markets.
Rather than determining the price of a physical asset, LMSR estimates the probability of future events.
As participants buy or sell contracts, the pricing function continuously updates the market's implied probability.
The objective is information aggregation.
Constant Product Market Makers
More recently, decentralised finance introduced Constant Product Market Makers, popularised by Uniswap.
Rather than matching buyers and sellers directly, liquidity providers deposit two assets into a shared pool.
The relationship
[ x \times y = k ]
defines the pricing curve.
Whenever one asset is purchased, its quantity decreases while the other increases, automatically adjusting prices to balance supply and demand.
The objective is continuous liquidity.
Different Objectives Require Different Pricing Functions
These examples illustrate an important principle.
An Automatic Market Maker is not defined by a particular mathematical equation.
Instead, an AMM is defined by the idea that prices are determined algorithmically rather than through direct negotiation between buyers and sellers.
Different markets require different pricing functions because they are attempting to achieve different objectives.
For example:
| Market | Primary Objective |
|---|---|
| Prediction markets | Aggregate information |
| Cryptocurrency exchanges | Maintain liquidity |
| Stablecoin exchanges | Minimise slippage |
| Electricity systems | Coordinate physical resources |
The pricing function should therefore be designed around the objective of the market it serves.
Electricity is Fundamentally Different
Electricity is unlike almost every other traded commodity.
Transactions cannot occur freely between arbitrary buyers and sellers.
Every transaction must satisfy the physical laws governing the electricity network.
The network itself determines whether a transaction is physically feasible.
Examples include:
- Transmission line thermal limits.
- Distribution network capacity.
- Voltage limits.
- Generator availability.
- Frequency stability.
- Power flow constraints.
Unlike financial assets, electricity cannot simply be transferred wherever two participants agree to trade.
The physical network determines which transactions are possible.
This raises an important question.
How should an Automatic Market Maker be designed for a physical system whose feasible transactions are continuously changing?
The Role of Price
Traditional electricity markets typically treat price as the outcome of matching supply and demand.
FP-AMM takes a different perspective.
Price is viewed as a control signal.
Rather than simply reflecting market conditions, prices actively encourage behaviours that improve the performance of the electricity system.
For example:
- encourage consumption when renewable generation is abundant,
- discourage demand when supply is scarce,
- encourage generation where the network requires support,
- discourage exports that worsen congestion,
- attract flexibility to the locations where it provides the greatest benefit.
Price therefore becomes a mechanism for coordinating millions of independent devices while respecting the physical constraints of the electricity network.
Designing an Automatic Market Maker for Electricity
The remainder of this section develops an Automatic Market Maker specifically for electricity systems.
Unlike existing AMMs, the objective is not to maximise liquidity or trading activity.
Instead, the objective is to maximise the amount of consumer demand served using available renewable generation while respecting the physical limits of the electricity network.
This requires answering four fundamental questions:
- What should the pricing function optimise?
- How should network constraints influence prices?
- How should the physical state of the grid be measured?
- How can prices continuously adapt as the state of the network evolves?
The following pages develop the pricing mechanism that underpins FP-AMM and demonstrate how algorithmic pricing can be used to coordinate distributed energy resources while remaining physically feasible.