first collector
top collector
latest collector

Tutorial: How to swap on Curve (Polygon)

CurlyBracketEffect
CurlyBracketEffect
0x8926
August 21st, 2021

What is Curve?

Curve is an automated market maker (AMM) protocol that allows users to swap assets using liquidity pools, similar to Uniswap. However, Curve differs from Uniswap in that it is optimized to allow users to trade stablecoins with as little gas fees and slippage as possible.

Slippage is a term that refers to how much the price of an asset shifts during the time that it takes for your order to go through and is the result of a few factors:

  1. The amount of Liquidity in a pool
  2. The size of your order
  3. Other market conditions (ie other users performing swaps on with the same pool at the same time.)

For example, if you wanted to trade 100 DAI for 100 USDC and the total liquidity in the pool was only $1000, the slippage would be much higher than if the total liquidity was $10,000. - OR - If several users are all selling or buying the same asset in a pool the slippage for that asset will tend to be higher. Curve was designed to mitigate the impacts of slippage on pegged coins such as stable coins.

Like other AMMs Curve relies on users to provide liquidity to the pools it supports, and return gives users an opportunity to earn a yield through aggregating lending protocol APRs, trading fees, as well as occasional incentive programs.

Curve on Polygon?

In this tutorial, we will be covering how to perform a swap on Curve using the Polygon network. Polygon is an EVM smart contract-enabled side chain that is very similar to Ethereum. This means that you can use familiar tools like MetaMask to approve transactions. An added benefit is that the transaction fees on Polygon are much lower than on Mainnet Ethereum.

In order to get assets onto Polygon, you will need to use a bridge. Which you can find here: ETH<>Polygon bridge

Here is a tutorial on how to Use Polygon for the first time, but in this tutorial, I will assume you have already gone through it.

How to swap on Curve

What you will need:

  1. A supported web3 wallet.
  2. Some Matic in your wallet to pay gas fees
  3. At least 1 supported asset in your wallet on Polygon Network

I will also assume that you are familiar with approving transactions with your wallet software.

Once you have everything you need from the list above, we are ready to dive in.

Step 1. Go to the Curve homepage and connect your wallet

You can get to the homepage by clicking this link https://polygon.curve.fi/. It should prompt you to connect your wallet automatically, but if not, then you will need to click the “Connect wallet” button in the center near the top of the page and select the wallet software you prefer from the list. Make sure you set the network to the Polygon Mainnet.

If you are managing several wallets with the same software, you will also need to specify which address you wish to connect to the site.

Step 2. Select the asset you wish to swap and enter the amount

You can use the “Swap using all Curve pools” section in the middle of the page and it will find the best route for your trade to take across all the available options. Select the asset you want to sell from the dropdown list on the left and the asset you want to buy from the dropdown on the right. Enter the amount you wish to sell in the box beside the asset you want to sell, and the amount filed beside the assets you wish to buy automatically be populated with the amount you will receive based on the current market conditions. Just below that, you will also see some information about the trade, like the exchange rate, the price impact you will have on the pool (slippage) and which pool your trade will be routed through.

Alternatively, you can choose to use a specific pool from the “Curve pools” list, and the next steps will essentially be the same, but the page will just be laid out slightly differently.

Note that you will not be guaranteed to find the best price for your asset with this method

Step 3. Check your advanced options

Don’t let the advanced options area scare you. It simply allows you to set your slippage tolerance; meaning you can set the percentage you are comfortable with the price of the asset drifting from the price you are currently quoted while the trade is being processed. If the price drifts outside of this tolerance by the time your trade is being enacted, the trade will fail and be reverted, so that you do not incur an undesired loss. You can choose from the preset 0.5% or 1%, or you can input a custom percentage.

As mentioned earlier, in times of high volume slippage can be increased, so you may want to raise your allowance if you really need to have your trade go through. This may occur during some sort of black swan event.

Step 4. Click Sell and approve the transaction

Once you have input the desired values and double-checked them, you are ready to click “Sell”. If this is your first time trading that asset on Curve, you will need to approve the protocol to be able to access the token you wish to trade. A window displaying the transaction will pop up for you to approve. Once both transactions are approved and providing the asset price didn’t shift outside your tolerance, the transaction should be included in a block, at which point your trade will be complete. You should now see the asset you traded for in your wallet.

Congrats you now have completed your first swap on Curve!!

Always remember to return to the RabbitHole site in order to redeem each Task and then mark the Quest/Skill as complete within the timeframe so that you will be eligible for the reward.

Arweave TX
5BWDdyswDHm6cX-QfXZA3-qpFTZ0KaxMTFJmSKYgnfE
Ethereum Address
0x8926B75642C2650aE3c5b227bAD2F7158ceaCCD1
Content Digest
D9KDBrN3unVBBnOU5_A6Hv3VAEMsCHUSa5mCJfK-8SM