Fundamentals of Automated Market Makers
We finished our recent series on auctions by underscoring that, as important as they are as a mechanism for price discovery and allocating scarce resources, they’re just one of a range of tools that can be utilized to manage, sustain and grow an asset marketplace. Auctions are optimized for the sale of novel or idiosyncratic items available in limited quantities. They’re less suitable for assets that are available in very large quantities or that are functionally interchangeable — that is to say, fungible items.
Simply selling such items at a fixed posted price is one way to allocate such assets. But it can be difficult to ensure that static prices reflect real demand in the marketplace. Items that are priced too low may sell out quickly to speculators, who resell them for much higher prices on secondary markets. Items that are priced too high may gather dust on virtual shelves indefinitely.
But what if there were an alternative means of asset allocation that smoothly and automatically adjusted pricing in response to demand? What if these price shifts could also be designed to shape and regulate market behavior, to ensure that markets aren’t just orderly, but optimized?
That’s the promise offered by automated market makers, which not only provide continuous, on-demand asset liquidity, but also can be designed to programmatically implement incentives and disincentives for buying, selling or holding assets. And by using AMMs, marketplace operators can guide marketplace behavior across a full market ecosystem, since they can serve as a persistent benchmark for other transaction platforms, establishing a price that other market mechanisms must match or beat.
Automated market makers have existed for decades in traditional finance — different implementations of AMMs are used in many modern exchanges, such as NYSE, NASDAQ, and Toronto Stock Exchange. In the context of blockchain, AMMs are smart contracts that transact digital assets automatically based on predetermined algorithms. They can be used to mint and distribute new assets in exchange for collateral, or they can be used to control the exchange rate between two existing assets — a common use case for AMMs in the world of decentralized finance. In fact, AMM-driven DEXs now own 93% of DEX transaction market share, and AMMs have been a primary engine for the overall growth of DeFi.
AMMs have several built-in advantages that make them a valuable complement to other methods of asset transaction. Perhaps the most basic one is that they provide continuous liquidity: Other mechanisms, such as posted-price sales, order books and auctions, suffer when there are few participants, since it becomes harder and harder to match buyers and sellers at any given price point.
But by using AMMs, participants in a marketplace can essentially always buy or sell an asset, round the clock, at a price determined by algorithm. They’re not limited by the existence of a counter party, by available listings in an order book, or by the timing of an auction. By offering an always-on source of asset liquidity at a transparent price, AMMs can help to both energize and stabilize markets — encouraging trading and managing volatility, while capturing information about market demand that can guide the macroeconomic decisions of asset issuers.
That information can be crucial in a situation where a new asset is being introduced into the wild. Most means of shaping markets — like adjusting asset supply or the velocity of asset transaction or, as we’ve seen in our discussion of auctions, altering transaction rules — can have major unintended consequences that can be difficult to unwind. AMMs offer marketplace operators a way to influence markets with a lighter, more nuanced touch, and more predictable outcomes.
What makes this possible is because AMMs are driven by math functions: algorithms that define a pricing curve for an asset that provide different incentives for marketplace participants depending on the supply of that asset in the marketplace. Each additional unit of the asset purchased from the AMM moves pricing to the right on the curve; each unit sold to the AMM moves it to the left. At different stages of supply, depending on the shape of this pricing curve — linear, logarithmic, exponential, sigmoidal, and so on — marketplace participants will thus be encouraged to buy, sell, hold or stake the asset, in order to maximize their expected gains. Because AMMs work continuously and react instantly to changes in demand, they serve as an invisible robot hand in the market, pushing it in directions that can advance the specific goals of an asset issuer or marketplace operator.
Here are some examples of pricing curves, and how they shape behavior by offering a different set of expected costs or payouts as the supply of an asset increases or decreases.
- A constant linear math function (y=k) is the equivalent of a posted price — the cost for an asset is the same whether it is the first item being sold or the 1000th. A fixed-price function creates no particular incentive for participants to invest or hold the asset over time; the item’s value will always be the same, regardless of when it is purchased or sold.
- A sloping linear math function (y=kx) establishes a steady-state growth or decline in an asset’s value. The second item is priced at an increment over the first; the third, at the same increment over the second, and so on. This ensures that the value of an asset will continually appreciate as time goes on and more items are sold, but it doesn’t incentivize participants to buy assets earlier, hold them longer, or sell them later — the rate of appreciation is the same regardless of when you get in or out of the market.
- An exponential curve (y = k*xn) offers flat pricing initially, but massively increases the price of an asset as time goes on. The sharp rise of pricing means that those who invest relatively early in an asset’s existence — e.g., during the flat part of the curve — are guaranteed very high returns later in its existence. In practice, this often encourages predatory speculation and wild volatility, because once the market hits the very steep part of the pricing curve, incremental shifts along the curve send pricing up and down by a significant amount.
- A logarithmic curve (y = k*log(x)) arcs prices upwards early, but becomes flatter over time. This pricing curve encourages early market entry, since the steepest part of the curve takes place at very low asset supply; as supply increases, the price begins to flatten, reducing incentive to purchase as return on investment gets less, although a logarithmic curve still continues to increase indefinitely over time.
- A sigmoidal curve initially looks exponential, but then hits an inflection point that causes it to transition over time toward a price that approaches a plateau. Sigmoidal curves offer perhaps the most flexibility for marketplace design, incentivizing asset purchases early and rewarding those early investors with sharp price increases, but then flattening out returns and stabilizing prices as the market for an asset matures.
The power and adaptability of AMMs has made them a pillar of the emerging digital asset economy. But, AMMs are not without limitations and vulnerabilities, and the very things that make them uniquely useful also present unique challenges. Fortunately — as we’ll explore over the course of this series — there are ways to mitigate many of these concerns, and AMMs are continuing to evolve rapidly as they emerge as one of the most essential tools in blockchain economies.
Interested in contributing to our Community Economics series? We’d love to hear from you. Comment below or email us at cec@forte.io.
Follow us on Twitter @FortePlatform.