Analysis Capital markets Feature News

DeFi disruptors: An intro to DeFi and Uniswap’s automated market making

defi disruptors uniswap

Will blockchain automated market makers put an end to exchanges as we know it? That’s the question explored here by delving into the Uniswap decentralized exchange (DEX).

But first a quick look at why decentralized finance (DeFi ) has suddenly become popular.

Disruptors is a new series. Some of these analytical articles will be about DeFi and cryptocurrency projects. Our daily news reporting is NOT switching to crypto news. The purpose is to explore potential innovations. 

Despite the current attention, DeFi isn’t new. Some of the leading DeFi solutions such as MakerDAO, the Compound lending protocol and Uniswap launched between December 2017 and November 2018. The most popular applications include lending, exchanges, derivatives and tools to help optimize returns.

What’s driving the DeFi boom?

Mid-June marks the start of the current spike in attention, or bubble. That’s when multiple DeFi protocols started issuing governance tokens to be used as a reward. Rather than just earning interest by lending or borrowing tokens, people can also earn tokens when borrowing and lending. At times people borrowed, lent and re-borrowed to receive extra tokens. When added to the interest rate, the tokens meant that the ROI on lending and other DeFi applications skyrocketed. Hence the term yield farming.

Andre Cronje, the sole developer behind the popular Yearn protocol, described the boom as driven by greed. While some DeFi founders are part of the get-rich-quick brigade, Cronje did not allocate any Yearn tokens to himself and claimed to be short of cash. Meanwhile, the Yearn token issued in mid-July recently reached a billion dollar market capitalization.  

“The reason they’re making money in insane amounts is because we came up with a whole new Ponzi, which is governance tokens,” said Cronje in a Youtube panel. “Which is the wonderful way where we give away free worthless tokens that for some reason people buy. And then the next wave comes in and buys so the first wave can sell it into the one that just bought. And we just keep repeating this cycle while it’s accruing more and more value. “He concluded, “it’s not the sustainable part of DeFi…. If we look underneath it, we will see the protocols that are accruing value.” 

He’s right. Despite this Ponzi-like behavior, there are some novel innovations worthy of exploration. The governance tokens also enable the DeFi protocol developers to shift to the token holders some of the decision making about how these DeFi smart contracts run. That may or may not prove handy from a regulatory perspective.

In terms of scale, the entire DeFi ecosystem had $500 million committed this time last year. It grew respectably through to the start of June 2020, reaching $1 billion. But since the launch of yield farming, that amount has spiked to almost $10 billion. That figure is the capital committed to DeFi applications, such as making funds available for lending. It’s not the market capitalization of the DeFi governance tokens, though they aren’t unrelated because those token are sometimes lent out. The combined market cap of the top six DeFi governance tokens issued since mid-June is around $3.7 billion, most of which were issued for ‘free’. With the value that’s getting placed on these tokens, or the expectation of that profit, giving the tokens away doesn’t mean they’re not securities.

The subject of this article, the Uniswap decentralized exchange (DEX), had not yet issued a token. Until last week. It’s gone from funds committed of $43 million at the start of June, to $1.9 billion. Daily trading volumes now regularly exceed the big centralized cryptocurrency exchanges.

Why automated market making?

Decentralized exchanges are smart contracts that operate on the blockchain. The reason they’re so useful is the building block nature of DeFi, which is one of the key reasons traders would use a DEX. On-chain trades are a critical element for other DeFi solutions, in the same way that on-chain money is so important for settling any blockchain transaction. 

But not all decentralized exchanges have used automated market making (AMM). The problem with market making using order books in a DEX is it’s expensive to update the order book pricing. The relatively high costs of running smart contracts, Ethereum gas fees, act as a distortion resulting in stale order books. Hence it was only after automated market making took off that any DEX gained critical mass. 

Given high gas fees are in response to blockchain scalability issues, it follows that when the scalability issues are addressed and processing fees decline, the relative success of AMM compared to order books may also wane.

After all, the automated market making concept has been around for a while but has not gained traction outside of crypto.

The automated market making innovation

Uniswap doesn’t have an order book or market makers and no permission is required to participate. You just need some tokens. There is no exchange or institution. It’s just code or smart contracts running on the Ethereum blockchain. And hence, so far, it hasn’t been regulated. 

In place of an order book, liquidity providers lock up funds to pools of trading pairs such as between the Ethereum token (ETH) and a stable coin (eg. USDC), or other more exotic pairs. And the traders buy and sell against that liquidity. In a conventional exchange, transaction fees go to the exchange, but in Uniswap, they go to the liquidity providers.

Disintermediation is often one side effect of blockchain. Here several parties become redundant. There is no exchange institution, just a smart contract developer. And because there’s a single source of truth for transactions, there’s no need for teams performing reconciliations. There’s no bank for payment and because delivery versus payment removes counterparty risk, there’s no need for a central counterparty. However, there are several other risks that we’ll come back to.

To set prices, it uses a simple but elegant formula embedded in a blockchain smart contract. And provided there is sufficient money in the pool, there is always a price offered, unlike conventional market makers who may choose not to quote during tricky periods. The liquidity providers (LP) are more-or-less passengers in the automated market making process. An LP can be anybody committing $100 or less, or more likely a wealthy capital provider. 

The pricing formula:

Reserve value A X Reserve value B = Constant

10 ETH @ $400 x 4,000 USDC @ $1 = 16 million

9.99 ETH @ $400.40 x 4,000 USDC @$1 = 16 million

9 ETH @ $444.44 x 4,000 USDC @ $1 = 16 million

Take an example of a pool with 10 ETH at $400 and 4,000 stable coin USDC at $1, giving a 50:50 split – the way all liquidity providers add money to Uniswap. The constant product of the ETH and USDC is 4,000 x 4,000 or 16 million. Now, if someone comes along and buys 1 ETH at $400, leaving 9 ETH, to keep the 16 million constant product, the ETH price has to go up to $444.44. If instead only 0.01 ETH had been bought, the new price would be $400.40. 

In terms of price movement, if the trade is small compared to the liquidity pool, the price will only move a little. If the transaction is a big proportion of the pool, the price movement could be significant. 

As a result of the simplistic pricing formula, the actual price could differ momentarily from prices elsewhere, so arbitrageurs play a critical role in “correcting” the price.  

So far, we’ve done a high-level overview. This article is part of a series. In the next one, we explore the risks and benefits for each part of the Uniswap ecosystem. But a bit of a spoiler: with a few caveats, it looks reasonable for traders, great for arbitrageurs, and okay for liquidity providers provided there’s no bug in the software code. If there is a bug, liquidity providers risk losing part or all their money with no recourse. And even if it’s good for multiple parties, that doesn’t mean it’s optimal. Nor is it necessarily sustainable.