How to Yield $YOK with $CKB - A Tutorial

How to Yield $YOK with $CKB - A Tutorial

ยท

5 min read

YokaiSwap is the first AMM (Automated Market Maker), DEX (Decentralized Exchange), Yield Farming and Staking platform on the Nervos Network. And today, we're going to go through this easy tutorial where we're going to use $CKB tokens to yield $YOK - YokaiSwap's native token! YokaiSwap resides on Godwoken, Nervos' Layer 2. It's going to be an easy to follow tutorial where we deposit $CKB to Layer 2, swap some of it for $YOK, create a YOK-CKB liquidity pair and obtain LP tokens and then finally use those tokens to yield farm some $YOK ๐Ÿค‘ Sounds like a lot? Believe me, it's very easy, just follow these steps! Oh and btw, we're going to do all this on the testnet, not the actual network, so even if you mess things up, it's gonna be totally fine! The same steps will apply to the actual network once you're comfortable using YokaiSwap. Let's get started:

  1. Head over to Testnet YokaiSwap and click on the Connect Wallet button. Select Metamask from the popup that shows up.

  2. Metamask will show up and ask you to switch over to the Godwoken testnet network. Click on the Switch Network button to do that.

  3. Great, your wallet is now connected to the Yokaiswap app! We'll now need to deposit some $CKB tokens to Layer 2 (i.e. Godwoken network) using the Yokaiswap Bridge. Head over to the bridge by following this link.

  4. Once the bridge window opens, you'll see that your balance of $CKB is actually 0 (box #1) ๐Ÿ˜”. In the screenshot that I've attached below, you'll see that I have 9499 $CKB tokens. How did I get those? Well, Nervos allows us to claim some testnet $CKB tokens to play around with ๐ŸŽ‰. Copy your L1 address from the deposit section (box #2) and head over to the faucet. Screenshot 2022-01-07 at 5.01.47 PM.png

  5. Once you're at the faucet, paste your Layer 1 address that we earlier copied from the bridge and paste it in the faucet and hit claim. Confirm the transaction in the Metamask popup that shows up. You'll be able to see 10,000 $CKB tokens in your Metamask wallet in about 10 minutes. If it doesn't show up in the wallet for some reason, check the balance on the Yokaiswap bridge (where my balance was being shown as 9499 $CKB) and it'll be correctly updated there. Screenshot 2022-01-07 at 5.15.34 PM.png

  6. Wohooo! You now have 10,000 $CKB tokens to play with on your Layer 1 wallet... Let's go back to the bridge and deposit some tokens to Layer 2. All you have to do is to enter how many $CKB tokens you want to deposit (let's say 500?) and click on deposit. Sign the Metamask transaction that pops up. Screenshot 2022-01-07 at 5.22.52 PM.png

  7. Your transaction to deposit $CKB to layer 2 is now submitted. You can click on the View on explorer button to see when your transaction goes through on the CKB Explorer. Screenshot 2022-01-07 at 5.23.33 PM.png

  8. You'll be ready to yield farm some YOK once your transaction to deposit CKB to Layer 2 has gone through. We'll use the YOK-CKB farm. But before we do that, we'll have to provide some liquidity in YOK and CKB to obtain YOK-CKB LP tokens that we can then deposit in the farm and earn YOK! We already have CKB, we just need some YOK and we'll be ready to deposit our liquidity! How do we get YOK? By swapping some of our CKB and converting it into YOK. Head over to the swap link.

  9. I had deposited 1000 CKB tokens to layer 2, and hence the balance in the From section is being shown as 1000. I'll convert half of this into YOK, and will keep the other half in CKB itself. Remember, we need to form a YOK-CKB pair, so don't convert all of your CKB into YOK! Keep some CKB left over too. To convert to YOK, simply click on the dropdown in the To section and select YOK. The app will automatically update to show how much YOK you're gonna get for the CKB that you've specified in the From section. Click on the Swap button and then click on Confirm Swap from the popup that shows up. Once again, sign the transaction in the Metamask popup. This transaction too can be viewed on the CKB explorer like all previous transactions. Screenshot 2022-01-07 at 5.34.21 PM.png

  10. Once the transaction goes through, you'll have YOK tokens in addition to the CKB tokens that you had from before. Now it's time to create a liquidity pair using these two tokens. Head over to this link to add liquidity.

  11. In one of the inputs add CKB and in the other one, add YOK. Click on Enable YOK and sign the Metamask transaction. Then once that's done, click on the Supply button and sign the transaction. Once your transaction is complete, you'll see a new box appear at the bottom of the window that shows how many LP tokens you received in exchange for providing YOK and CKB as liquidity. Screenshot 2022-01-07 at 7.56.53 PM.png Screenshot 2022-01-07 at 6.51.38 PM.png

  12. Awesome, now that we have LP tokens, we're ready to deposit them to the YOK-CKB farm and earn some YOK ๐Ÿ’ฐ. Head over to the farms page and click on the YOK-CKB farm.

  13. Click on the Enable button and the Stake LP button after that. Click on Confirm in the popup that comes up. And that's it, you're now farming YOK using CKB! Wait for your harvests to come in ๐Ÿง‘โ€๐ŸŒพ Screenshot 2022-01-07 at 6.55.01 PM.png

  14. Once you've earned some YOK, you can click on the Harvest button in the farm (box #1) to collect it and transfer it to your wallet. Want to stop farming? Click on the minus button (box #2) and unstake your LP tokens. Once that's done, go to the liquidity window, select YOK-CKB pair and remove liquidity. You'll now see your CKB and YOK tokens back in your wallet! Screenshot 2022-01-07 at 7.08.41 PM.png

And that's it! You now know how to yield $YOK using $CKB. Play around with the faucet tokens and then you can use some of your funds when you're comfortable and understand the product better. You can go through this article to set up a wallet that contains $CKB. Hope you enjoyed going through this tutorial, until next time!

ย