This article is divided into two key areas
Selling a token on Sushi (like $WIZARD or $PUNK)
Buying a token on Sushi (like $WIZARD or $PUNK)
Instructions for selling a token on sushiswap using etherscan
Step 1
Try making the trade on sushiswap. If you are reading this then chances are you have already tried and it didn't work, but nevertheless it will be important to know how much you need to spend (or expect to receive) to complete the trade.
For example if you are trying to sell 0.1 COOL and sushiswap says that you will receive 0.68 ETH, then make a note of that amount. (The next part of this tutorial will use the 0.68 ETH figure in the example) .
Note that if sushiswap says there is insufficient liquidity then the next part of the tutorial will not work. Insufficient liquidity means that the trade can not go through and for reason due to the amount of capital in the sushi pool.
Step 2
If you are selling a token on sushiswap (not buying it), then you will need to approve the token first. You can do this on the sushiswap app, and there's a chance you have already done it, in which case you can move on to the next step. You will know if it is already approved because the approve button will not show up when you try to swap (and you will see the "Swap" button instead)
Step 3
Make the trade using etherscan Go to the sushi router contract on etherscan here: https://etherscan.io/address/0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F#writeContract
Connect your wallet by clicking "Connect to Web3"
Let's assume you are trying to sell 0.1 COOL. This is how you will do it...
Open up the swapExactTokensForETH function (number 12).
Go to https://eth-converter.com/ and type how much COOL you are trying to sell into the "Ether" field. For this example we will type 0.1.
Copy the amount shown in the Wei field which for this example will be 100000000000000000
.
Paste that amount into the first parameter of the function on etherscan (amountIn)
Next, go back to eth-converter and paste between (about) 80% of the amount you expect to receive into the "Ether" field.
Since we saw in Step 1 that we were expected to receive 0.68 ETH for 0.1 COOL, we will paste about 80% of 0.68.. so let's say 0.5 into the Ether field.
Now copy the amount show in the Wei field 500000000000000000
and go back to etherscan and paste it in the second parameter (amountOutMin).
For the next parameter, path, we will need to enter the route the trade will take. Since we are selling COOL for ETH, the first part of the route will be the COOL address and the second part will be the WETH address.
The address of COOL can be found on the NFTX COOL vault info page (0x114f1388fAB456c4bA31B1850b244Eedcd024136
) and the address of WETH on mainnet is 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
. We will need to put this into an array with square brackets around it and a comma and a space in between, so the text we will put into the path field is: [0x114f1388fAB456c4bA31B1850b244Eedcd024136, 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2]
For the next parameter, "to", you will put the address of our own account.
And for the last parameter, deadline, put 10000000000
Now click the "Write" button at the bottom of the function on etherscan and submit the transaction (you may want to select higher gas if you are using metamask before submitting so it goes through quickly)
Instructions for buying a token on sushiswap using etherscan
Step 1
Try making the trade on sushiswap.
If you are reading this then chances are you have already tried and it didn't work, but nevertheless it will be important to know how much you need to spend (or expect to receive) to complete the trade.
For example if you are trying to buy 0.1 COOL and sushiswap says that it will cost 0.687341 ETH, then make a note of that amount. (The next part of this tutorial will use the 0.687341 ETH figure in the example)
Note that if sushiswap says there is insufficient liquidity then the next part of the tutorial will not work.
Insufficient liquidity means that the trade can not go through and for reason due to the amount of capital in the sushi pool.
Step 2
Make the trade using etherscan Go to the sushi router contract on etherscan here: https://etherscan.io/address/0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F#writeContract
Connect your wallet by clicking "Connect to Web3"
If you are trying to buy a vault token then use the function swapExactETHForTokens. If you are trying to sell a vault token then use the function swapExactTokensForETH.
Let's assume you are trying to buy 0.1 COOL. This is how you will do it...
Open up the swapETHForExactTokens
function (number 9).
Use the figure from step 1 (0.687341) but round it up 10% or so to make sure the transaction goes through.
For this example we will round it up to 0.75.
Type 0.75
into the first parameter of the function on etherscan (payableAmount
)
Now go to https://eth-converter.com/ and type the amount of COOL you want to receive into the "Ether" field, which for this example is 0.1.
Copy the amount shown in the Wei which will be 100000000000000000
.
Paste that amount into the second parameter of the function on etherscan (amountOut
)
For the next parameter, path, we will need to enter the route that the trade will take.
Since we are selling ETH to buy COOL, the first part of the route will be the WETH address and the second part will be the COOL address.
The address of WETH is 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
and the address of COOl can be found on the NFTX COOl vault info page (0x114f1388fAB456c4bA31B1850b244Eedcd024136
).
We will need to put this into an array with square brackets around it and a comma and space in between, so the text we will put into the path field is: [0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0x114f1388fAB456c4bA31B1850b244Eedcd024136]
For the next parameter, "to
", you will put the address of our own account.
And for the last parameter, deadline
, put 10000000000
Now click the "Write
" button at the bottom of the function on etherscan and submit the transaction (you may want to select higher gas before submitting so it goes through quickly)