[Curve Finance- An Efficient Automated Market Maker] || Crypto Academy / S5W7 || Homework Post for @sapwood|| By @salmanwains

This is Season 5 Week 7 of Steemit Crypto Academy and I'm writing homework task about "Curve Finance" assigned by Professor @sapwood

Curve-Finance-Added-Euro-as-Secondary-Currency.jpg

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft.png

Question# 1

Discuss the various features of Curve Finance? What are the different types of pools available in Curve Finance? What are the major DeFi protocols Curve is integrated with? How does Curve Finance improves the second layer utility of a token of a different protocol?

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft.png

we have discussed and delve into the details of many decentralized exchanges Curve Finance is also a DEX that features various liquidity pools and allow for exchanging and lending different currencies supported on the Ethereum protocol. To answer this post, we will explore the Curve Finance.

Go to Curve.fi

Home
The first interface when you land on the website is the home page here you can see the feature to exchange stable coins. You can also see the feature of connecting to the wallet through which you will be able to carry out different operations involving coins and fees.

1.png

Pools

2.png

the next option you can notice on the main interface is the pools here you can see various pools. You can notice many pools including the Compound, PAX, USDT, BUSD, 3POOL, Y, REN, SETH, SBTC.

The different types of pools are the Lending pools, Tripools and the Bitcoin pools.

The lending pools are those pools by contributing or locking your assets into which you can earn extra income when you lend crypto assets via the Curve Finance platform.

The Tripool are also known as the plain pools. It is the largest Curve pool and comprises of the three stable coins and so the name Tri. These include DAI, USDC, and USDT. These are the type of non-lending pools.

The Bitcoin pool as the name suggests are designed for earning transaction fees or storing Bitcoins such as the renBTC, wBTC, hBTC, and sBTC.

Factory-Create Pool
By clicking on the factory tab you have the sub option of creating your own pool. The interface shows various requirements and key steps in the generation of new pools.

3.png

These may include selection of the type of the pool, the tokens that will make up the pool, the implementation, the parameters, and the Metadata.

Trade

4.png

The trade feature allows for the exchange of various other tokens not avialbel on the home page more explicitly through the chart with different time frames.

Major Defi protocols

The major Defi protocols integrated in the Curve Finance are Compound, Yearn Finance, Synthetix, and AAVE. The liquidity providers because of this integration can supply liquidity through the Compound or Yearn Finance and can earn greater margins of profit.

This is made possible by linking the Finance Curve's lending pools with platforms such as Compound, Yearn Finance, AAVE and allowed them to lend money to the main Finance Curve platform.

The integrated pools are made of the wrapped versions of the token that hold equal importance in terms of value and functionality to the main token. This is integration can thus be taken as a series circuit and therefore the major drawback is that fault in effects all the others.

How Curve Finance does improve the second layer utility of a token of a different protocol?

Curve Finance improve the second layer utility of token of a different protocol through the introduction of the interoperable tokens or wrapped tokens as ctokens. Curve Finance allows its users to earn money not only through pooling on Curve but on other integrated platforms.

It has adopted the mechanism of forming a pact or agreement with the integrated platforms and it working on the principles of compos ability which involves bringing in harmony and agreement with other individual for mutual benefits.

What happens is when we lend a DAI in compound protocol a cDAI token is generated which is held as a collateral and allows us to earn and withdraw interest from the DAI that we lent. Fortunately, these cDAI can further be used in the Curve Finance in the liquidity pools to earn more profits and an additional layer of profit on the initial investment.

The user feels extremely benefited in these circumstances since he have double opportunity to earn profits all thanks to the compos ability Curve has established with various protocols.

250279614_769067857386583_6146508252355001787_n.png

Question# 2

What is impermanent loss? Explain with examples? How does Curve Finance mitigate this loss?

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft.png

Impermanent loss can be defined as a temporary loss that occurs due to the change in the price of an asset held in the liquidity pool. When we provide liquidity, we need to add a pair of tokens whose cumulative sum should make up to certain value. Impairment loss occurs when the price of one asset changes drastically against the other coin of the pair. These types of losses are seen with platforms with pools regulated by Automated Market makers.

For example, if the current price of SAND id 5USDT and you want to add to the SAND/USDT pool you will have to deposit 5 USDT for every SAND. In an impermanent loss the price of the asset drastically changes as compared to the asset already deposited. The greater the change the greater will be the loss. this can also be called as a change in the asset as compared to when it was deposited.

You will only realize this loss upon withdrawing the liquidity otherwise the impermanent loss keeps swinging for or against.

The AMM works to maintain the ratio as xy=K and thus equilibrium will have to be maintained using the Arbitrage traders no matter what.

For example, in case of the above example at the time of deposit 1SAND=5USDT and we deposit 5 SAND the total would be 50USDT but later the price changed to 1SAND=7USDT the arbitrage traders will add more USDT and withdraw the SAND until the equilibrium is restored. This will affect our investment value.

This is common among coin pairs in which one currency is volatile and the other is stable. Therefore Curve has adopted this mechanism of only allowing pairs that behave in somewhat similar fashion to prevent such or mitigate suchs risks.
Here we have separate genre of pools the stable coin pools such as that DAI, USDT, USDC or tokenized assets pools such as the cBTC etc.

250279614_769067857386583_6146508252355001787_n.png

Question# 3

What is the difference between constant product invariant and constant sum invariant? How does Curve Finance accommodate these two to offer a wider zone of INPUT/OUTPUT balance? How does it lower the slippage?

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft.png

Difference between constant product invariant and constant sum invariant is as follows.

Constant Product InvariantConstant Sum Invariant
Constant product invariant is the formula used by many AMM-based decentralized exchanges to calculate the value of tokens held in the in-liquidity pools.Constant sum invariant by Curve Finance to calculate the value of the tokens held in the liquidity pools.
The formula of the Constant product invariant is XY=K.The formula of the Constant Sum Invariant is X+Y=K.
The constant here is K. the AMM is so designed to keep K constant by keeping the Product XY constant.The constant here is K. AMM is so designed to keep K constant by keeping the sum X+Y constant.
It is represented by Hyperbola which has a limited liquidity and a higher slippage zone on the side of the curve.It is represented by the straight line which theoretically states zero slippage and infinite liquidity.
When the slippage zone is thus reached there is very low output even at high inputs.The actual functionality in the Curve Finance is the hybrid of both in such a way that it is a graph that has smooth central zone similar to a straight line or a flat region.
According to the curve the price fluctuates a lot when it moves between two values.Similarly, the price does not fluctuate when the graph moves between two quantities.

As it is pretty clear that curve Finance value calculation model is designed to broaden the flat curve during which the price does not fluctuate a lot. The Curve Finance model is therefore designed to reduce the slippage as much s possible by decreasing the slippage zone on the first place.

It is also ensured by contributing to the liquidity pools of the stable coins or the tokenized coins whose price fluctuate comparably and they remain in the flat curve region. This is done to ensure the minimum slippage as less as 1%.

250279614_769067857386583_6146508252355001787_n.png

Question# 4

What is veCRV? What are the benefits of holding veCRV token?

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft.png

VeCRV token is the rewarding token that you are rewarded by the Curve Finance when you lock up the CRV governance token. CRV on the first place is an incentive token when users contribute to the liquidity pools to get the decision making and governance rights in the platform.

The VeCRV is held as collateral to the users who contribute to the liquidity of the governance token. It stands for vote-escrowed CRV. The mechanism of reward is such that the longer you hold the CRV the more VeCRV you acquire.

Following are the powers or benefits you acquire with VeCRV:

  1. Provides governance rights to its holders.
  2. Provides voting and decision-making rights.
  3. Commissions on transactions on the liquidity pools of around 2.5X.
  4. Profits from loans on the liquidity pools.
  5. With 2.500 veCRV users can create an official DAO vote.
  6. You can get access to various tools such as the signaling tool by acquiring 1 VeCRV.

250279614_769067857386583_6146508252355001787_n.png

Question# 5

Perform a stablecoin swap using Curve Finance using a suitable network of your choice? Include the transaction hash? Indicate the total fees incurred during the entire process? State your observation?Screenshot/Transaction Hash required?(Hint- You may use Polygon Network, I have provided the RPC details to add Polygon Network in your Metamask wallet, should you need this.)?

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft.png

Prior to this I have already added polygoan network to the Metamask

5.png

To perform this transaction, go to https://curve.fi

Click on connect wallet

Click on Metamask

6.png

In the next step click on next

7.png

Then click on Connect

8.png

The wallet was connected

9.png

We now have to deposit some MATIC to carry out this transaction.After the deposition of the MATIC you will be able to carryout this transaction.

10.png

Here click on sell to proceed. In the next step you need to confirm for the commission (screenshot missing mistakenly) in the next step. The commission is around is 0.04 Matic.

11.png

In the next step you will have to click on confirm.

The total transaction fee was only around 0.07471 USD which is quite cheap. And the waiting time to was around 4 to 5 minutes.

Conclusion:



In this assignment we studies about the Curve Finance. The mechanism of calculating the value of the tokens in the liquidity pool and the difference between the Constant product invariant model and the constant Sum invariant and we also studied how the curve Finance model can reduce slippage and increase liquidity returns. In addition to that we also swap stable coins using the Curve Finance by connecting with the Metamask wallet.

250279614_769067857386583_6146508252355001787_n.png

Note :

All the Screenshots have been taken from the Curve.fi platform.
CC:
@sapwood

250279614_769067857386583_6146508252355001787_n.png

Club5050 Eligible


evd.png

250279614_769067857386583_6146508252355001787_n.png

Sort:  
Loading...
Loading...

Hello
Can I get your Discord id??

Coin Marketplace

STEEM 0.27
TRX 0.11
JST 0.031
BTC 67974.72
ETH 3841.39
USDT 1.00
SBD 3.74