From 73194f34a3b178a134187b12230eba84478a10c0 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Sat, 22 Jan 2022 20:52:35 +0100 Subject: [PATCH] [glossary,glossary/AMM,glossary/DEX][m]: start of a glossary covering exchanges i.e. AMM and DEX. --- glossary/AMM.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ glossary/DEX.md | 9 ++++++++ 2 files changed, 65 insertions(+) create mode 100644 glossary/AMM.md create mode 100644 glossary/DEX.md diff --git a/glossary/AMM.md b/glossary/AMM.md new file mode 100644 index 0000000..9ebd049 --- /dev/null +++ b/glossary/AMM.md @@ -0,0 +1,56 @@ +--- +aliases: Automated Market Maker +--- + +# AMM - Automated Market Maker + +Automated Market Maker i.e. an algorithmic platform for trading. + +From https://academy.binance.com/en/articles/what-is-an-automated-market-maker-amm: + +> You could think of an automated market maker as a robot that’s always willing to quote you a price between two assets. Some use a simple formula like Uniswap, while Curve, Balancer and others use more complicated ones. +> +> Not only can you trade trustlessly using an AMM, but you can also become the house by providing liquidity to a liquidity pool. This allows essentially anyone to become a market maker on an exchange and earn fees for providing liquidity. +> +> AMMs have really carved out their niche in the DeFi space due to how simple and easy they are to use. Decentralizing market making this way is intrinsic to the vision of crypto. + +## Examples + +* Uniswap +* SushiSwap +* Curve Finance +* Astroport + +### Uniswap + +Summary + +* [[Liquidity Providers]] (LPs) deposits tokens pairs e.g. ETH + some other token into a pool for trades of that pair +* LPs get paid 0.3% of each trade +* Current ratio in the pool determins the "theoretical" price. E.g. if 1 ETH and 100 OTHER then price is 1:100 +* Slippage i.e. the actual price is determined by formula $x * y = k$ where $k$ is a constant and $x$ and $y$ are numbers of tokens of each type in the pool. Simply put you are getting the price that would exist after the trade once the tokens you are offering are added to the pool and tokens you are buying are removed from the pool ... + +From https://academy.binance.com/en/articles/what-is-uniswap-and-how-does-it-work + +> Automated market makers are [smart contracts](https://academy.binance.com/en/articles/what-are-smart-contracts) that hold liquidity reserves (or liquidity pools) that traders can trade against. These reserves are funded by liquidity providers. Anyone can be a liquidity provider who deposits an equivalent value of two tokens in the pool. In return, traders pay a fee to the pool that is then distributed to liquidity providers according to their share of the pool. Let’s dive into how this works in more detail. + +Uniswap is iterating to favor "professional players": + +> One of the most significant changes coming with Uniswap v3 relates to capital efficiency. You see, most AMMs are very capital inefficient – that is, most of the funds sitting in them at any given moment are not being used. This is due to an inherent characteristic of this $x*y=k$ model discussed earlier. In a simplified way, the more liquidity there is in the pool, the bigger orders the system can support in a larger price range. +> +> However, liquidity providers (LPs) in these pools essentially provide liquidity for a price curve (range) between 0 and infinity. All that capital is sitting there reserved for the scenario when one of the assets in the pool 5x-s, 10x-s, 100x-s. +> +> If that happens, those idle assets ensure that there’s still liquidity left on that part of the price curve. This means that only a small portion of the liquidity in the pool is sitting where most of the trading happens. +> +> As an example, Uniswap currently has about 5B dollars of liquidity locked, while it does only about 1B of volume per day. You might think this isn’t a particularly elegant way of doing things, and it appears that the Uniswap team agrees. Uniswap v3 addresses this issue. +> +> Liquidity providers can now set custom price ranges for which they want to provide liquidity for. This should lead to more concentrated liquidity in the price range that most trading activity happens in. +> +> In some sense, Uniswap v3 is a rudimentary way of creating an on-chain order book on Ethereum, where market makers can decide to provide liquidity in the price ranges they set. It’s worth noting that this change favors professional market makers over retail participants. The beauty of AMMs is that anyone can provide liquidity and put their funds to work. +> +> However, with this additional layer of complexity, “lazy” LPs are going to earn much less in trading fees than professional players who can constantly keep optimizing their strategy. + +## References + +* https://academy.binance.com/en/articles/what-is-an-automated-market-maker-amm +* https://twitter.com/HideNotSlide/status/1386358389240958977 - someone getting excited about not having transparent market makers as if this is something innovative but what about e.g. https://en.wikipedia.org/wiki/IEX \ No newline at end of file diff --git a/glossary/DEX.md b/glossary/DEX.md new file mode 100644 index 0000000..8f62d62 --- /dev/null +++ b/glossary/DEX.md @@ -0,0 +1,9 @@ +# DEX = Decentralized EXchange + +Order-book based but p2p (i.e. without market makers). This contrasts with [[AMM]] (automated market makers) who don't have an order book. + +## Limitations + +From https://academy.binance.com/en/articles/what-is-uniswap-and-how-does-it-work + +> Due to the inherent limitations of [blockchain](https://academy.binance.com/en/articles/what-is-blockchain-technology-a-comprehensive-guide-for-beginners) technology, it has been a challenge to build DEXes that meaningfully compete with their centralized counterparts. Most DEXes could improve both in terms of performance and user experience. \ No newline at end of file