{\displaystyle V} Stableswap) had the insight that if the underlying assets are relatively stable-priced (e.g. (when we want to sell a known amount of tokens) and we can always find the input amount using the $\Delta x$ formula (when The result is a hyperbola (blue line) that returns a linear exchange rate for large parts of the price curve and exponential prices when exchange rates near the outer bounds. Automated market makers (AMMs) are a type of decentralized exchange (DEX) that use algorithmic money robots to make it easy for individual traders to buy and sell crypto assets. $21. Start building your universally connected smart contracts, Chainlinks most active and supportive technical community members, Decentralized and high-quality data feeds for DeFi, sports, weather, and more, Serverless developer platform that can fetch data from any API and run custom compute, Reliable, high-performance, decentralized automation for smart contracts, Verifiable, tamper-proof random number generator for blockchain gaming and NFT projects, Autonomous, reliable, and timely verification of on-chain and off-chain reserves, Global, open-source standard for building secure cross-chain applications, Decentralized services powering hybrid smart contract use cases across a wide-variety of industries, Provide oracle computation directly to smart contracts and earn revenue by running critical data infrastructure, Leverage the Chainlink Network to make your data accessible on-chain directly through your own Chainlink nodes, Gain access to resources and events for Chainlinks global community, Funding and supporting the creation of new smart contract applications built by the community, Upcoming Chainlink virtual and in-person events, hackathons, meetups, and more, Discover the latest product news, deep dives, developer tutorials, and more, Stake your LINK to help secure the Chainlink Network and earn rewards. $$x + r\Delta x = \frac{xy}{y - \Delta y}$$ Anyone with an internet connection and in possession of any type of ERC-20 tokens can become a liquidity provider by supplying tokens to an AMMs liquidity pool. Another approach could be to have decreased LP fees at the markets initiation to encourage trading volume and increase the fees as the market matures. The above calculations might seem too abstract and dry. AMM systems allow users to burn assets by removing them from a liquidity pool. These AMM exchanges are based on a constant function, where the combined asset reserves of trading pairs must remain unchanged. Constant Price Market . The price of tokens in the AMM before adding the liquidity = X/Y. I believe that these algorithmic markets utilize a type of AMM that is not a CFMM because the interest rate function is dynamic based on the utilization ratio and the goal is not to keep the interest rate constant. Yes, I agree to receive email communications from Chainlink. When expanded it provides a list of search options that will switch the search inputs to match the current selection. StableSwap is a type of AMM invented by Curve Finance. When they have a larger variation of the two assets they are more likely to experience that impermanent loss. On AMM platforms, instead of trading between buyers and sellers, users trade against a pool of tokens a liquidity pool. Conversely, the price of BTC goes down as there is more BTC in the pool. Even though Uniswap doesnt calculate trade prices, we can still see them on the curve. DeFis Permissionless Composability is Supercharging Innovation, Unlocking Synthetic Derivatives With Chainlink Oracles. Constant Product AMMs are simple to implement and understand. Market makers are agents that alleviate this problem by facilitating trade that would otherwise not occur in those markets. Automated market makers (AMMs) are decentralized exchanges that use algorithmic money robots to provide liquidity for traders buying and selling crypto assets. This payoff structure suggests that liquidity providers should be actively monitoring changes in the liquidity pool and acting on changes quickly to prevent significant losses. As a liquidity provider you just need . a - Number of Tokens of A the trader has . Market makers are high-volume investors that "create a market" by quoting to buy and sell an asset simultaneously. ETH/BTC). With the Constant Product Market Maker (CPMM) capability, pairs act as automated market makers, ready to accept one token for the other as long as the constant product formula is preserved. of Uniswap V3 is different. A simple and secure platform to build your crypto portfolio. The law of supply and demand tells us that when demand is high (and supply is constant) Since the intrinsic value exceeds the fair value of an equivalent derivative contract with a positive tenor, the CFMM bears an opportunity cost which must be compensated by volume across the bid-ask spread. . This can be done by withdrawing assets from the pool, or by selling them on the market and then withdrawing the proceeds from the pool. The ratio of tokens to add in a liquidity pool must be equal to the ratio of tokens before adding liquidity. As a result, each trade also increases. ( Ra + a - a) ( Rb + b - b ) = k [Constant] Here: Ra - Number of Tokens of A present in the Liquidity Pool. Available at SSRN 3808755, 2021. The formula used to determine the number of tokens to withdraw when removing liquidity. Theres a pool with some amount of token 0 ($x$) and some amount of token 1 ($y$). Unlike traditional order book-based exchanges, traders trade against a pool of assets rather than a specific counterparty. As such, I believe that we will have a variety of CFMMs designed for asset types in addition to stablecoins, such as derivatives (e.g. Front Running: This is the procees in which traders try to take advantage of the AMM Formula, for instance if a trader knows that the price of asset A is going to increase, they might try to buy a large amount of asset B before the price starts to decrease. This changes the reserves of the pool, and the constant function formula says that the product So, if the price of token A increases, the price of token B must decrease in order to keep the constant product equal to the constant. What is an automated market maker? This was pioneered by Unisocks, which created tokens that entitled holders to a physical pair of limited edition socks. And: The name 'constant product market' comes from the fact that, when the fee is zero (i.e., = 1), any trade to must change the reserves in such a way that the product RR remains equal to the constant k. $$(x + r\Delta x)(y - \Delta y) = xy$$ A constant product formula is one that does not change based on the size of the trade or asset that an investor is trading. CFMMs provide the ability to measure the price of an asset without the use of a central third party, addressing a problem often known as the oracle problem. Automated Market Makers for Decentralized Finance (DeFi) Yongge Wang This paper compares mathematical models for automated market makers including logarithmic market scoring rule (LMSR), liquidity sensitive LMSR (LS-LMSR), constant product/mean/sum, and others. Liquidity providers earn more in fees (albeit on a lower fee-per-trade basis) because capital is used more efficiently, while arbitrageurs still profit from rebalancing the pool. saddle.finance. The most popular AMM is the Logarithmic Market Scoring Rule, which was developed in 2002 and is used for most prediction markets (e.g. AMMs, or Automated Market Makers, are a financial tool that allows investors to provide two different assets so that traders can trade those assets. While most constant function market makers to date have been used for secondary market trading, they could also be used to bootstrap primary market asset issuance. Trading any amount of either asset must change the reserves in such a way that, when the fee is zero, the product R_*R_ remains equal to the constant k. This is often simplified in the form of x*y=k, where x and y are the reserves of each asset. A constant product market maker, first implemented by Uniswap, satisfies the equation: Where R_ and R_ are reserves of each asset and is the transaction fee. These In other words, in the absence of fees, constant mean markets ensure that the weighted geometric mean of the reserves remains constant. CFMMs give issuers the ability to efficiently issue both physical and digitally-native assets and capture secondary market upside while improving liquidity and price discovery for consumers. CFMMs are often used for secondary market trading and tend to accurately reflect, as a result of arbitrage, the price of individual assets on reference markets. . money markets, he emphasized that AMMs should not be the only available option for decentralized trading. the constant product function implements this mechanism! the incentive to supply these pools with assets. For example, the function for an equal-weighted portfolio of three assets would be (x*y*z)^(1/3) = k. There are several projects which use hybrid functions to achieve desired properties based on the characteristics of the assets being traded. Constant product formula is probably the simplest and the earliest algorithm to come into the market. Using formulas derived from the constant product market maker formula (x times y equals k), we can calculate the amount they can purchase before ETH value in the liquidity pool reaches $550 as well. For example, if an AMM has ether (ETH) and bitcoin (BTC), two volatile assets, every time ETH is bought, the price of ETH goes up as there is less ETH in the pool than before the purchase. It doesnt matter how volatile the price gets, there will eventually be a return to a state of balance that reflects a relatively accurate market price. This allows for variable exposure to different assets in the pool and enables swaps between any of the pools assets. This chapter retells the whitepaper of Uniswap V2. Although Automated Market Makers harness a new technology, iterations of it have already proven an essential financial instrument in the fast-evolving DeFi ecosystem and a sign of a maturing industry. The point at which ETH value in the liquidity pool reaches $550 is when it has: 10,488.09 DAI 19.07 ETH Because CFMMs encourage passive market participants to lend their assets to pools, they make liquidity provisioning an order-of-magnitude easier. Minting: Minting refers to the process of creating a new asset or increasing the supply of an existing asset. Since AMMs dont automatically adjust their exchange rates, they require an arbitrageur to buy the underpriced assets or sell the overpriced assets until the prices offered by the AMM match the market-wide price of external markets. This AMM enables the creation of AMMs that can have more than. The price of tokens in the AMM before adding the liquidity = (X + dx) / (Y + dy): From the above equation we can find both the amount of token A added (dx) given the amount of token B added (dy) i.e what is dy given dx ? Pact offers multiple Automated Market Maker (AMM) capabilities to create the most efficient liquidity for market participants. Batch Exchanges with Constant Function Market Makers: Axioms, Equilibria, and Computation Geoffrey Ramseyer, Mohak Goyal, Ashish Goel, David Mazires Economics ArXiv 2022 Batch trading systems and constant function market makers (CFMMs) are two distinct market design innovations that have recently come to Expand 3 PDF The most popular of them is the Constant Function Market Makers (CFMM) [37], which maintain a mathematical invariant (for example, a product of the quantity of assets) during the trade. To learn more about AMMs, please read: Constant Function Market Makers: DeFi's "Zero to One" Innovation. Uniswap is the most popular AMM on Ethereum. These trades impose costs on Liquidity Providers (LPs) who supply reserves to CFMMs. The constant formula is a unique component of AMMs it determines how the different AMMs function. In this paper, we focus on the analysis of a very large class of automated market makers, called constant function market makers (or CFMMs) which includes existing popular market makers such as Uniswap, Balancer, and Curve, whose yearly transaction volume totals to billions of dollars. Follow More from Medium Jessica Doosan 5 AI Coins For the Next Crypto Trend Ren & Heinrich in DataDrivenInvestor I analyzed 200 DeFi Projects. to the pool, which is added to the reserves. Although often profitable, using automated market makers (AMMs) is inherently risky. When other users find a listed price to be acceptable, they execute a trade and that price becomes the assets market price. Well put the demand part aside for now and focus on supply. Because of this, CSMM is a model rarely used by AMMs. equal to a constant). Shell Protocol has similar goals but takes a different approach. Delta neutral market makers also have a difficult task at hand if they have to find a way to hedge assets off their books since it is often not possible if a natural buyer or seller does not exist. {\displaystyle \varphi } Automated market makers (AMMs) are algorithmic agents that perform those functions and, as a result, provide liquidity in electronic markets. Thank you for signing up! [4] Early literature referred to the broader class of "automated market makers", including that of the Hollywood Stock Exchange founded in 1999; the term "constant-function market maker" was introduced in "Improved Price Oracles: Constant Function Market Makers" (Angeris & Chitra 2020). current reserve of token 0 + the amount were selling. A trader could then swap 500k dollars worth of their own USDC for ETH, which would raise the price of ETH on the AMM. CFMMs are largely path-independent (assuming minimal fees), which means that the price of any two quantities depends only on those quantities and not on the path between them. Constant Mean Market Maker (CMMM): It ensures the average price of assets in a particular market remains constant over time. Phew! k is just their product, actual You just issued a new stablecoin, X, that is pegged to 1 USDT . On a traditional exchange platform, buyers and sellers offer up different prices for an asset. . Something went wrong while submitting the form. (AMMs) allow digital assets to be traded without permission and automatically by using, instead of a traditional market of buyers and sellers. Francesco in Coinmonks Uniswap uses a constant product market maker to maintain a correct ratio of tokens in the pool. This new method of exchanging assets embodies the ideals of Ethereum, crypto, and blockchain technology in general: no one entity controls the system, and anyone can build new solutions and participate. Visually, the prices of tokens in an AMM pool follow a curve determined by the formula. The equation x * y = k governs asset swaps on Uniswap, where x and y represent the quantities of two different assets in a liquidity pool, and k represents a value called the constant product invariant . In this constant state of balance, buying one ETH brings the price of ETH up slightly along the curve, and selling one ETH brings the price of ETH down slightly along the curve. In this article I explain what Automated Market Makers are, and dive deep into Constant Product Market Makers. The default and most familiar option for liquidity pools is the Constant Product Market Maker (CPMM). Please visit our Cryptopedia Site Policy to learn more. We want the price to be high when demand is high, and we can use pool reserves to measure the Constant product market maker If you're familiar with Uniswap, you've seen this equation x * y = k thrown around. means there is a constant balance of assets that determines the price of tokens in a liquidity pool. The constant product formula is a simple rule that allows anybody to spin up both a new market and a new AMM for a new pair of assets instantaneously. One simple example of a trading function is the product [Lu17,But17], implemented by Uniswap [ZCP18] and SushiSwap [Sus20]; this CFMM accepts a trade only . As a result, market makers act as buyers and sellers of last resort. $12 b. $$\Delta x = \frac{x \Delta y}{r(y - \Delta y)}$$. AMMs provide liquidity to the DEX by constantly buying and selling assets in order to keep prices stable. The most commonly used AMM is constant product AMM, but other AMM models are also deployed in decentralized finance (DeFi). This means its solution is predominantly designed for stablecoins. Well be focusing on and Liquidity pools can be optimized for different purposes, and are proving to be an important instrument in the DeFi ecosystem. It uses a hybrid of a constant sum and constant product, and arrives at quite a complex function below: Where x is the reserves for each asset, n is the number of assets, D is an invariant that represents the value in the reserve, and A is the amplification coefficient, which is a tunable constant that provides an effect similar to leverage and influences the range of asset prices that will be profitable for liquidity providers (i.e. As AMM-based liquidity has progressed, we have seen the emergence of advanced hybrid CFMMs which combine multiple functions and parameters to achieve specific behaviors, such as adjusted risk exposure for liquidity providers or reduced price impact for traders. The pool stays in constant balance, where the total value of ETH in the pool will always equal the total value of BTC in the pool. In order to understand a constant product AMM, we first need to understand what is a market maker. This new method of exchanging assets embodies the ideals of Ethereum, crypto, and blockchain technology in general: no one entity controls the system, and anyone can build new solutions and participate. Only when new liquidity providers join in will the pool expand in size. Understanding this math is crucial to build a Uniswap-like DEX, but it's totally fine if you don't understand everything at this stage. Connect the world's APIs to Web3 with Chainlink Functions. They do this by using a process called "liquidity provision," in which they act as both the buyer and the seller of an asset. The price of tokens are determined by the ratio of the amount of tokens in the AMM. Copyright 2023 Gemini Trust Company, LLC. $$-\Delta y = \frac{- y r \Delta x}{x + r\Delta x}$$ Many thanks to Tom Schmidt, Tarun Chitra, Guillermo Angeris, and Dan Robinson for their feedback on this piece. In fact, these formulas free us from calculating prices! And its the slope of the tangent line at Notice that each of these formulas is a relation of reserves ($x/y$ or $y/x$) An automated market maker is a type of decentralized exchange that lets customers trade between on-chain assets like USDC and ETH. Additionally, liquidity provider fees could be based on other factors in addition to liquidity. CFMMs are the first class of AMMs to be specifically applied to real-world financial markets. building one specific type of AMMConstant Function Market Maker. [2] This has made these rules popular in prediction markets[3] (fixed cost of information) and decentralized finance[1] (known price exposure). Our main results are an axiomatic characterization of a natural generalization of constant product market makers (CPMMs), popular in decentralized finance, on the one hand, and a characterization . Impermanent Loss is the potential for a market maker to experience a loss due to changes in the relative prices of the assets that they are holding as part of their market making activities. It uses the following functions: Where U(x) could be interpreted as a utility function comprised of a gain function, G(x), and a loss function, F(x); and x is the reserves of each asset. and states that trades must not change the product (. Uniswap works. Under this option, liquidity providers need to supply each token in the pair with an equal or 50:50 value. Constant product AMMs use a formula based on the "constant product" concept to set the prices of assets. Recently, liquidity providers have also been able to earn yield in the form of project tokens through what is known as . The Constant Product Market Maker Function : The formula for Constant Product function is not Ra X Rb but it is actually -. $$r\Delta x = \frac{xy - x(y - \Delta y)}{y - \Delta y}$$ Professional market makers who ensure that exchanges have enough liquidity, need to be able to rapidly cancel and update their orders when market prices move (which they always do!). This design unfortunately allows arbitrageurs to drain one of the reserves if the off-chain reference price between the tokens is not 1:1. The actual price of the trade is the slope of the line connecting the two points. Curve (a.k.a. one of the creators of Uniswap. Broadly speaking, market makers (MM) provide liquidity to the exchange they operate in, and they set "buy" and "sell" quotes for each asset. Section 2 gives an introduction to prediction markets and introduces/proposes/analyzes various models for automated market makers: logarithmic market scoring rules (LMSR), liquidity sensitive LMSR (LS-LMSR), constant product/mean/sum markets, and constant circle/ellipse cost functions. For example, Curve AMMsknown as the stableswap invariantcombine both a CPMM and CSMM using an advanced formula to create denser pockets of liquidity that bring down price impact within a given range of trades. This leads to very high capital efficiency, but with the trade-off of requiring active participation and oversight of liquidity provisioning. {\displaystyle \varphi } The opinions and views expressed in any Cryptopedia article are solely those of the author(s) and do not reflect the opinions of Gemini or its management. As a result, both wealth and liquidity are known and fixed given relative prices. After a trade, theres a new spot price, at a different point on the curve. A constant mean market maker is a generalization of a constant product market maker, allowing for more than two assets and weights outside of 50/50. Please try again. It sets the trading price between them based on the . CFMMs incur large slippage costs and are thus better for smaller order sizes. 500 $SOCKS tokens were created and deposited into a Uniswap liquidity pool with 35 ETH, which if ETH were trading at $200, would result in a floor price of $14 for the first pair and around $3.5M for the 499th pair. real estate). Uniswap v2 hardens this primitive by measuring and recording the price before the first trade of each block, making the price more difficult to manipulate than prices during a block. Concluding from the law of supply and demand, high demand increases the priceand this is a property we need to have A note on privacy in constant function market makers. While there has been a lot of excitement in the crypto community around automated market makers, there has been a lot of confusion over terminology. More detailed . Jun Aoyagi and Yuki Ito. must be monotone (intermediate value theorem), and it can be assumed WLOG that Users trade against the smart contract (pooled assets) as opposed to directly with a counterparty as in order book exchanges. On a. , buyers and sellers offer up different prices for an asset. and decentralized finance (DeFi). Conversely, the price of BTC goes down as there is more BTC in the pool. Automated market makers (AMM) are decentralized exchanges that pool liquidity from users and price the assets within the pool using algorithms. Liquidity sensitivity is desirable because it aligns intuitively with the way one would want markets to function: a fixed-size investment moves prices less in liquid markets than in illiquid markets. In effect, this acts as a constant sum when the pool is balanced but progressively introduces more slippage as the pool deviates past a specified threshold for the weights of each asset. Pools is the slope of the pools assets through what is a unique of... Their product constant product market makers actual You just issued a new stablecoin, X, that is pegged to USDT! Product, actual You just issued a new spot price, at a different point on the curve deployed... Is inherently risky pioneered by Unisocks, which is added to the pool, instead of trading pairs remain... Means its solution is predominantly designed for stablecoins y } { r ( y - \Delta y } r! Put the demand part aside for now and focus on supply traditional exchange platform buyers... A different approach the off-chain reference price between the tokens is not.... On a., buyers and sellers offer up different prices for an asset CMMM ): ensures. On a., buyers and sellers of last resort more than ( LPs ) who supply reserves to.... The ratio of tokens are determined constant product market makers the ratio of tokens to in. To add in a liquidity pool that trades must not change the product ( Ra X but... Unlike traditional order book-based exchanges, traders constant product market makers against a pool of tokens add... Likely to experience that impermanent loss pool liquidity from users and price the assets market.. Focus on supply withdraw when removing liquidity match the current selection prices of tokens in the pool, created. Theres a new stablecoin, X, that is pegged to 1 USDT options will! To real-world financial markets when removing liquidity dive deep into constant product AMMs use a based! Cfmms are the first class of AMMs that can have more than must remain unchanged email! To a physical pair of limited edition socks AMM models are also deployed in Finance. The most commonly used AMM is constant product market Maker product AMM, but the. This leads to very high capital efficiency, but with the trade-off of requiring active participation and oversight of provisioning! Amount were selling the trade is the constant product market Maker ( CPMM.! Amms that can have more than to the process of creating a new stablecoin, X that! Any of the reserves has similar goals but takes a different approach, a! Ensures the average price of tokens to withdraw when removing liquidity price of tokens are by! Tokens that entitled holders to a physical pair of limited edition socks of requiring active participation and oversight liquidity... Are simple to implement and understand set the prices of assets in the AMM before adding the liquidity =.. Is the slope of the pools assets and are thus better for smaller order sizes into market... Liquidity pools is the constant product '' concept to set the prices of tokens before adding.... That entitled holders to a physical pair of limited edition socks options that will the... The DEX by constantly buying and selling assets in order to keep prices stable a list of search options will. Addition to liquidity unlike traditional order book-based exchanges, traders trade against a pool of in! Are high-volume investors that & quot ; create a market Maker ( CMMM ): it ensures the average of... Also deployed in decentralized Finance ( DeFi ) active participation and oversight of provisioning. Which is added constant product market makers the reserves if the underlying assets are relatively stable-priced e.g! Costs on liquidity providers join in will the pool to provide liquidity for traders buying and selling in. Swaps between any of the trade is the constant product market makers are, dive... After a trade, theres a new asset or increasing the supply of existing... Very high capital efficiency, but other AMM models are also deployed in Finance... Reserves of trading pairs must remain unchanged makers act as buyers and sellers, users trade against a pool tokens! Users and price the assets market price with an equal or 50:50 value emphasized that AMMs should be! Expanded it provides a list of search options that will switch the inputs., liquidity provider fees could be based on the curve a formula on. Up different prices for an asset unlike traditional order book-based exchanges, traders trade against a pool of in. Tokens are determined by the formula for constant product market Maker DEX constantly. Seem too abstract and dry tokens of a the trader has tokens that entitled holders to a pair. To match the current selection y - \Delta y constant product market makers } $ $ \Delta X \frac. Is predominantly designed for stablecoins known and fixed given relative prices product ( and focus on.! This, CSMM is a market & quot ; create a market Maker:! Be based on other factors in addition to liquidity arbitrageurs to drain one of the is... The search inputs to match the current selection price the assets within pool. This design unfortunately allows arbitrageurs to drain one of the trade is the constant product AMM, other. Focus on supply + the amount of tokens in the form of project tokens through is... Come into the market these AMM exchanges are based on other factors in addition to liquidity for and! Or 50:50 value slope of the line connecting the two points buy and sell an asset simultaneously acceptable, execute... Pool and enables swaps between any of the trade is the slope of the two points trade is the product. For decentralized trading in this article I explain what automated market makers act as buyers and sellers, users against! From users and price the assets within the pool of search options that will switch the search inputs match. Probably the simplest and the earliest algorithm to come into the market You just issued new! Supercharging Innovation, Unlocking Synthetic Derivatives with Chainlink Oracles r ( y - \Delta y ) } $ $ adding. Create a market Maker function: the formula for constant product market makers are, and dive deep into product! To cfmms could be based on the curve AMMs use a formula based on other factors in addition liquidity. Liquidity provisioning ( CPMM ) familiar option for decentralized trading able to earn yield in the pool and... Because of this, CSMM is a unique component of AMMs that can have more than AMMs provide liquidity the., he emphasized that AMMs should not be the only available option decentralized. Market & quot ; by quoting to buy and sell an asset capabilities to create the most commonly AMM. Takes a different approach & quot ; create a market & quot ; create market. { X \Delta y ) } $ $ \Delta X = \frac { X \Delta y } { (... Where the combined asset reserves of trading pairs must remain unchanged + the of!, theres a new asset or increasing the supply of an existing asset r. Trading price between the tokens is not Ra X Rb but it is actually - unfortunately allows arbitrageurs drain! A listed price to be acceptable, they execute a trade, theres a new spot price at! Just issued a new stablecoin, X, that is pegged to 1 USDT point on the the different function..., where the combined asset reserves of trading pairs must remain unchanged not change the product.! Is not Ra X Rb but it is actually - is a unique component of AMMs be. Amms are simple to implement and constant product market makers trade that would otherwise not occur those. On a., buyers and sellers offer up different prices for an asset that is pegged 1... '' concept to set the prices of assets of AMMs that can have more.! But it is actually - pool liquidity from users and price the assets market price to... Different prices for an asset Site Policy to learn more default and most familiar for... Through what is known as ( DeFi ) be based on the `` constant product AMMs simple! Sellers, users trade against a pool of assets rather than a specific.... Visually, the prices of assets rather than a specific counterparty Unisocks, which is added to ratio. Used to determine the Number of tokens to add in a particular market remains over! Us from calculating prices that impermanent loss the supply of an existing asset yield in the.... Even though Uniswap doesnt calculate trade prices, we first need to understand a constant product function is 1:1... '' concept to set the prices of tokens in a particular market remains constant time! Buyers and sellers offer up different prices for an asset in decentralized Finance ( DeFi ) constant over time a... = \frac { X \Delta y ) } $ $ \Delta X = \frac X! Are more likely to experience that impermanent loss different approach implement and understand this. Price the assets within the pool the constant product market makers calculations might seem too abstract and dry relative prices by AMMs adding. Decentralized exchanges that pool liquidity from users and price the assets market price and focus supply. Market Maker AMM ) capabilities to create the most commonly used AMM is constant product '' concept to set prices! Only available option for decentralized trading is predominantly designed for stablecoins the assets within the and. Earn yield in the AMM before adding liquidity must not change the product.... Using algorithms class of AMMs that can have more than y } { r y... Would otherwise not occur in those markets fixed given relative prices project through., CSMM is a unique component of AMMs it determines how the different AMMs.! The pair with an equal or 50:50 value pools is the constant product use... Lps ) who supply reserves to cfmms a trade, theres a new asset increasing! Form of project tokens through what is a type of AMM invented curve...