March 31, 2023
Featured Articles Learn Press Releases

The Basics of AMMs and Yield Farms

Polygon-Times-News-Article-Graphic-11

⚠️Disclaimer: The information on this article should not be interpreted as financial advice.⚠️

Decentralized Finance is full of all sorts of interesting projects! From AMMs (Automated Market Makers), to semi-collateralized stable coins, synthetic assets, yield farms, and lots of other interesting stuff. The beauty of smart contracts (the technology on which all decentralized applications, dApps for short, are based) is that the sky’s the limit!

Today we’ll be taking a brief look at what an AMM is, what benefits they have, how they work, and how they tie back to a yield farming platform like Crystl Finance.

What is an AMM?

Unlike a traditional centralized exchange (CEX), which uses an order book market system – an AMM, or Automated Market Maker is a type of Decentralized Exchange (DEX) in which the user interacts with a smart contract (instead of another user) in order to swap one cryptocurrency for another.

How Do AMMs Work?

Not all AMMs are created equal, some use extremely simple mathematical equations, some far more complicated, but they all follow the concept of a constant product formula. The main principle is that any user in the world can create liquidity pools (LPs) for a pair of tokens – in other words: allowing other users to exchange or “swap” these tokens for one another. When a user wishes to buy a token (X), they withdraw that token from the liquidity pool and contribute the other token (Y) in exchange or vice versa. When doing this, users also pay a small fee which is left in the pool and distributed among the existing liquidity providers.

When such an exchange occurs, this offsets the number of token (X) in the pool from the number of token (Y) in the pool, causing less supply in the former, and more in the latter. As the ratio of the tokens in the pool changes, this is what leads to a price increase of token (X) within that pairing. The inverse is true for selling operations. You’re adding more of token (X), and withdrawing token (Y), this leads to a price decrease in (X). Below you will find a more specific example for a liquidity pool made from $CRYSTL💎 and $MATIC tokens.

Why Should I Contribute to LPs?

The benefit of contributing to a liquidity pool is that every time a token swap is made by any user of the protocol, a small portion of that swap is divided as a fee between everyone contributing to the liquidity pool (yes, even if you’re only providing 10$ worth in liquidity! No, you probably won’t be able to buy a Lamborghini with your earnings on this investment, but Rome wasn’t built in a day, and neither is your DeFi portfolio). To learn how to add liquidity, see the guide or video here.

What Is Impermanent Loss?

Given the volatile nature of most cryptocurrencies (with the exception of some stablecoins like $DAI and $USDC), they are subject to a constant change in value. Due to the fact that one must contribute tokens A and B at equal ratio based on market price in the Pool, what happens if one or both of those tokens change prices?

The AMM will automatically swap one asset for the other to ensure an equal pairing. What does this mean for you as an investor?

Let’s say you put in $50 dollars of token A and $50 of Token B, and A has a price of $2 per token, and B is $1. Then, you would have contributed 25 A and 50 B. Let’s say the value of B jumps up to $2 per token, and A stays at the same price, and you go to withdraw your liquidity. You’d quickly realize that you now have less of token B and more token A compared to when you initially added liquidity! If liquidity is withdrawn at this pricing, you’d have incurred roughly a 6 percent loss when compared to if you just held token B instead of contributing to the LP as you now have less tokens. Bear in mind, this is an extreme example to illustrate the point. A useful tool for calculating impermanent loss can be found here.

A lot of investors get frightened by the concept of impermanent loss, and never become a liquidity provider. In many cases, this is quite unreasonable. Why? Because of one important fact: Liquidity providers earn fees. Consider the case that a trading pair experiences a high volume of trades, so much that the liquidity pool ends up earning more fees than the loss incurred due to price volatility! Consider another case, where the price ratio of two tokens remains the same but volume remains high. In such a scenario, the liquidity provider has a lot to benefit from! Furthermore, providing liquidity is often incentivized with yield farming rewards, which we will get into later in the article. But to put it simply, on top of earning fees from providing liquidity, yield farming protocols reward liquidity providers with an additional token called a yield farming token. This token has its own value, and often comes with its own set of utilities. For instance, with Crystl.Finance on the Mines page users can contribute liquidity provider tokens (LP tokens) and earn the $CRYSTL token at high interest rates. Later, they can either sell these $CRYSTL tokens or use them as a tool to generate passive income in other tokens by depositing them on the Pools page.

Slippage and Price Impact

Slippage is the threshold that the buyer accepts to “lose” on a sale or purchase. This slippage is caused because there is some time taken in between when you submit your trade, and when it actually gets executed. AMMs are protocols that are accessible globally after all, and so trades still continue to happen even in the brief moment that you submit a swap transaction! Sometimes even inside the transaction you submitted, your amount of tokens might change, such as what happens with tokens that have a transfer tax.

This is why for tokens like $SING with these taxes, you must increase the slippage to account not only for the price volatility in the pool but also for the transfer tax – in order to execute the trade. It’s important to note that you should always try transactions with the lowest possible slippage, as if you set the slippage too high, you will most likely get a bad deal on your swap.

Price impact is quite simply described as the increase or decrease in price caused by the addition or subtraction of tokens from the LP. If liquidity is shallow (not a lot of tokens in liquidity, but you are making a huge trade) and there are less tokens available for trading, one can expect a higher price impact. This may require you to increase slippage to allow your transaction to process, as other people’s trades will also have that same degree of price impact, meaning the price may change to outside your slippage threshold before your transaction gets included in the blockchain.

What is a Yield Farm?

A yield farm is a DeFi protocol that provides incentives to liquidity providers. Crystl Finance is a Vaulting and Yield Farming platform. Often, yield farms are directly linked with AMMs, but they can be completely unrelated projects all together. What yield farms aim to do is provide added incentive to contribute liquidity to a given pool (on top of the liquidity fees!). Yield farms can help to offset the cost of impermanent loss and increase earnings by rewarding users who stake their LP tokens on their platform with a special token called a farm token. These farm tokens act like any other cryptocurrency on an Ethereum-based blockchain (BSC, POLYGON, FANTOM, etc.) in that they can be bought, sold and interact with other smart contracts.

Common Misconceptions About Yield Farms

Due to an enormous surge in popularity of yield farms, and the fact that just about anyone can spin up a DeFi project, they tend to get a bit of bad press. Some of the common accusations about yield farms are that because the tokens tend to be inflationary (no maximum supply), they are all zero sum games in which some people make millions, and those who get in late are left holding the bag. Farming tokens are printed and rewarded to liquidity providers, who sell them because they wish to make profits, and the high circulating supply of farming tokens and low liquidity results in a diminishing price for the farming token. This is not a rule.

There are many fantastic yield farms that have created good, sustainable use cases for their tokens either through means like NFTs, games, or in the case of Crystl Finance, lots of partner Pools adding utility for the farming token, by being able to use it to earn more rewards!

A good example of this is Crystl Finance‘s already rather large base of partner tokens which have Pools on the platform with which you can stake the native farm token ($CRYSTL) to earn non-native tokens such as $ETH, $MATIC, $USDC and some other interesting, less well known projects like JDI. This has 3 large benefits to $CRYSTL holders and the ecosystem as a whole;

  1. Rather than parting with their farmed $CRYSTL reward tokens, investors can choose to earn other tokens with $CRYSTL that are easier to sell in larger quantities on the open market without having an effect on the price of $CRYSTL.
  2. Investors can expand their portfolio to gain tokens they may not have otherwise been exposed to, taking on very little risk when compared to buying those tokens.
  3. Partners benefit by getting exposure to investors on the Crystl Finance platform, allowing them to earn their token passively, potentially leading to another long term holder.

Yield farming is an interesting way to gain passive income, but it is important to know that at its base, the price should not be speculated upon, as there are simply far too many factors contributing to its value to be able to make guesses on price swings.

These sorts of tokens are meant to be used on the platform as a tool for passive income, and are not speculative assets like Bitcoin or Dogecoin.

If you purchase a yield farm token and hold it with the assertion that it will skyrocket in value overnight, that assertion will probably turn out to be false. A successful yield farm token has a slow but steady increase in value as more and more interest is built on the platform. But – especially in its early days, is subject to some rather extreme price volatility due to a number of factors, such as low liquidity, hype, as well misunderstanding of the token’s utility. Price appreciation for yield farming tokens like $CRYSTL enters the picture as more and more people realize the benefits of using $CRYSTL as a tool to generate passive income in the long term rather than selling the rewards right away.


Disclaimer: This is a paid press release, PolygonTimes does not endorse and is not responsible for, or liable for any content, accuracy, quality, advertising, products or other materials on this page. Readers should do their own research before taking any actions related to the company. PolygonTimes is not responsible, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any content, goods or services mentioned in the press release.

X