{"id":4068,"date":"2022-06-22T04:03:54","date_gmt":"2022-06-22T04:03:54","guid":{"rendered":"http:\/\/cryptcard.cc\/?p=4068"},"modified":"2023-02-21T11:13:16","modified_gmt":"2023-02-21T11:13:16","slug":"the-many-use-cases-of-wrapped-tokens-like-wbtc-and-weth","status":"publish","type":"post","link":"https:\/\/cryptcard.cc\/the-many-use-cases-of-wrapped-tokens-like-wbtc-and-weth\/","title":{"rendered":"The Many Use Cases of Wrapped Tokens Like WBTC and\u00a0WETH"},"content":{"rendered":"\r\n<h4 class=\"wp-block-heading\">Learn by example why wrapped tokens were invented.<\/h4>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"683\" class=\"wp-image-4073\" src=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/use-cases-of-wrapped-tokens-like-wbtc-and-weth-1024x683.jpg\" alt=\"\" srcset=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/use-cases-of-wrapped-tokens-like-wbtc-and-weth-1024x683.jpg 1024w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/use-cases-of-wrapped-tokens-like-wbtc-and-weth-300x200.jpg 300w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/use-cases-of-wrapped-tokens-like-wbtc-and-weth-768x512.jpg 768w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/use-cases-of-wrapped-tokens-like-wbtc-and-weth-1536x1024.jpg 1536w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/use-cases-of-wrapped-tokens-like-wbtc-and-weth.jpg 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>WBTC, WETH and many other wrapped tokens are intriguing, to say the least. If you have been reading about it online, you&#8217;d probably get the idea of what they are and why we need them.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Here&#8217;s a quick recap.<\/p>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote\">\r\n<p>&#8220;Wrapped tokens are used to bridge between different blockchains like Bitcoin with Ethereum\u200a-\u200aBTC and WBTC&#8221;<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<blockquote class=\"wp-block-quote\">\r\n<p>&#8220;They are also used to allow smart contract to accept compatible tokens. Like converting ETH\u200a-\u200aa non ERC-20 compatible token to WETH, an ERC-20 token.&#8221;<\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\n<p>But let&#8217;s dig deeper to learn how they are actually used.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><br \/>Mining Pools<\/h3>\r\n\r\n\r\n\r\n<p>One of the many good use cases of WETH, a wrapped version of ETH is in mining pools. We all hate the exorbitant gas prices we have to pay on Ethereum. So, imagine if you&#8217;re mining for ETH. The amount of work and cost involved are already extreme let alone transferring out the ETH once you mined them. The gas fee will surely eat into your profit.\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Therefore, some mining pools are actually paying out in WETH instead of ETH. By using a separate L2 layer network like Polygon.<\/p>\r\n\r\n\r\n\r\n<p>So, instead of doing payouts in ETH on Ethereum, the pool pays you in WETH on Polygon network while absorbing the cost of gas which is negligible compared to gas on Ethereum. As WETH on Polygon is pegged to ETH on a one-to-one basis, you are actually getting ETH value in return. All you have to do is swap your WETH on Polygon at the bridge to actual ETH on Ethereum and voila, completo!<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Centralized and Decentralized Lending<\/h3>\r\n\r\n\r\n\r\n<p>Let&#8217;s examine a use case for WBTC. Say you own lots of BTC and you want to lend them out to gain interest. Since Bitcoin doesn&#8217;t have smart contract capability, most lending protocols use Etherum network instead. It&#8217;s also obvious that you cannot send your BTC to Ethereum chain cos they are not compatible to one another. But what you can do is bridge your BTC to <a href=\"https:\/\/coinmarketcap.com\/currencies\/wrapped-bitcoin\/\" target=\"_blank\" rel=\"noreferrer noopener\">W<\/a><a href=\"https:\/\/coinmarketcap.com\/currencies\/wrapped-bitcoin\/\" target=\"_blank\" rel=\"noreferrer noopener\">BTC on Ethereum<\/a> and deposit your newly owned wBTC on lending protocols like Celsius (centralized) or Aave (decentralized). Both of these protocols run on Ethereum, not Bitcoin.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"723\" class=\"wp-image-4069\" src=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/aave-wbtc-lending-pool-1024x723.png\" alt=\"\" srcset=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/aave-wbtc-lending-pool-1024x723.png 1024w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/aave-wbtc-lending-pool-300x212.png 300w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/aave-wbtc-lending-pool-768x542.png 768w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/aave-wbtc-lending-pool-1536x1084.png 1536w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/aave-wbtc-lending-pool.png 1916w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption><a href=\"https:\/\/app.aave.com\/reserve-overview\/?underlyingAsset=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&amp;marketName=proto_mainnet\" target=\"_blank\" rel=\"noreferrer noopener\">W<\/a><a href=\"https:\/\/app.aave.com\/reserve-overview\/?underlyingAsset=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&amp;marketName=proto_mainnet\" target=\"_blank\" rel=\"noreferrer noopener\">BTC lending pool<\/a> on\u00a0Aave.<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p><br \/>Borrowers on those protocols could borrow these wrapped BTC from the specific lending pools which now have some of your WBTC tokens. They could use it to say earn from arbitrage on exchanges (buy WBTC from one exchange and sell on another while pocketing the difference in the price) or borrow using flash loans on Aave. Here&#8217;s a practical guide to <a href=\"https:\/\/medium.com\/@mwhc00\/how-flash-loan-actually-works-step-by-step-ffd47cbf58c0\" target=\"_blank\" rel=\"noreferrer noopener\">how flash loans work<\/a>.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Decentralized Exchange\u00a0(DEX)<\/h3>\r\n\r\n\r\n\r\n<p>A DEX is managed independently on smart contracts. So, imagine you&#8217;re on Uniswap, one of the most popular decentralized exchanges, and you wish to swap from ETH to LINK because you need to use Chainlink oracle service.<\/p>\r\n\r\n\r\n\r\n<p>When you convert your ETH tokens, they actually get wrapped into WETH (the ERC-20 version of ETH) prior to being sent to the swapping smart contract. This is done via the deposit function in the WETH contract. The WETH tokens are then converted into LINK ERC-20 tokens.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"802\" class=\"wp-image-4070\" src=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/weth-smart-contract-1024x802.png\" alt=\"\" srcset=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/weth-smart-contract-1024x802.png 1024w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/weth-smart-contract-300x235.png 300w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/weth-smart-contract-768x602.png 768w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/weth-smart-contract.png 1279w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption><a href=\"https:\/\/etherscan.io\/token\/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2#writeContract\" target=\"_blank\" rel=\"noreferrer noopener\">D<\/a><a href=\"https:\/\/etherscan.io\/token\/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2#writeContract\" target=\"_blank\" rel=\"noreferrer noopener\">eposit function<\/a> in WETH smart contract. Credit: Etherscan.<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>This deposit function is not actually part of the ERC-20 token standard but as long as the token adheres to its minimum standard of having <a href=\"https:\/\/docs.openzeppelin.com\/contracts\/2.x\/api\/token\/erc20#IERC20\" target=\"_blank\" rel=\"noreferrer noopener\">specific functions<\/a> like totalSupply, approve, transferFrom, etc, it&#8217;s fine.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">NFT Auctions<\/h3>\r\n\r\n\r\n\r\n<p>OpenSea is known for requiring you to convert your ETH to WETH when you wish to bid on NFT auctions on their marketplace. Why so?<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"730\" height=\"784\" class=\"wp-image-4071\" src=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/how-to-wrap-eth-on-opensea.png\" alt=\"\" srcset=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/how-to-wrap-eth-on-opensea.png 730w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/how-to-wrap-eth-on-opensea-279x300.png 279w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/>\r\n<figcaption>Option to <a href=\"https:\/\/support.opensea.io\/hc\/en-us\/articles\/360063498293-What-s-WETH-How-do-I-get-it-\" target=\"_blank\" rel=\"noreferrer noopener\">wrap your ETH<\/a> on OpenSea. Credit:\u00a0OpenSea.<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>It&#8217;s to allow you to bid on auctions without actually spending your cryptos. This means if you bid on an auction and when you win or the seller accepts your bid, your WETH gets spent, otherwise, it will be returned to you. In order to program that logic, OpenSea relies on (you guessed it) smart contract. From what we have learned, smart contract only accepts ERC-20 token thus WETH is required.<\/p>\r\n\r\n\r\n\r\n<p>Without smart contracts, you could imagine the gas cost and hassle of running an auction. You have to send your ETH to OpenSea&#8217;s auction wallet and if you lose the bid they have to refund you the ETH. That&#8217;s two transfers each tied to a gas fee. Now, multiply that with the thousands of transactions for all the auctions with all the bidders!<\/p>\r\n\r\n\r\n\r\n<p>Thank God for wrapped tokens and smart contracts.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Port Your Dapp to an EVM Blockchain Using Wrapped ERC-20\u00a0Token<\/h3>\r\n\r\n\r\n\r\n<p>The third example covers the use of wrapped ERC-20 token. There&#8217;s a <a href=\"https:\/\/chainlist.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">long list of EVM<\/a> (Ethereum Virtual Machine) compatible blockchains that work the same way as Ethereum network except they are not. They are like copies of Ethereum without the expensive gas fees.<\/p>\r\n\r\n\r\n\r\n<p>If you&#8217;re a dapp developer who issue your own ERC-20 tokens, you could consider sparing your users from paying crazy gas fees by allowing them to use an alternative EVM chain that works with your dapp. To do this, you need to create a wrapped version of your token on the new EVM chain.<\/p>\r\n\r\n\r\n\r\n<p>To facilitate this conversion, the blockchain protocol should provide you a bridging dapp that enables you to create a wrapped version of your token for their chain. For example, Polygon network has a <a href=\"https:\/\/wallet.polygon.technology\/bridge\/\" target=\"_blank\" rel=\"noreferrer noopener\">bridge dapp<\/a> that lets you do this. So does <a href=\"https:\/\/bridge.metis.io\" target=\"_blank\" rel=\"noreferrer noopener\">Metis<\/a> and <a href=\"https:\/\/rainbowbridge.app\/\" target=\"_blank\" rel=\"noreferrer noopener\">Aurora\/NEAR<\/a> protocol. But please note that not all chains are willing to accept your wrapped tokens on their platform. <a href=\"https:\/\/bridge.avax.network\/\" target=\"_blank\" rel=\"noreferrer noopener\">Avalanche<\/a>, for instance, has not open up their bridging facility to every token issuer. Below explains why.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"136\" class=\"wp-image-4089\" src=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/why-avax-does-not-accept-any-tokens-for-its-bridge-1024x136.png\" alt=\"\" srcset=\"https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/why-avax-does-not-accept-any-tokens-for-its-bridge-1024x136.png 1024w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/why-avax-does-not-accept-any-tokens-for-its-bridge-300x40.png 300w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/why-avax-does-not-accept-any-tokens-for-its-bridge-768x102.png 768w, https:\/\/cryptcard.cc\/wp-content\/uploads\/2022\/06\/why-avax-does-not-accept-any-tokens-for-its-bridge.png 1064w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\r\n","protected":false},"excerpt":{"rendered":"<p>Learn by example why wrapped tokens were invented. WBTC, WETH and many other wrapped tokens are intriguing, to say the least. If you have been reading about it online, you&#8217;d probably get the idea of what they are and why we need them.\u00a0 Here&#8217;s a quick recap. &#8220;Wrapped tokens are used to bridge between different [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4073,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[56,58,57,54,55],"_links":{"self":[{"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/posts\/4068"}],"collection":[{"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/comments?post=4068"}],"version-history":[{"count":22,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/posts\/4068\/revisions"}],"predecessor-version":[{"id":4850,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/posts\/4068\/revisions\/4850"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/media\/4073"}],"wp:attachment":[{"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/media?parent=4068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/categories?post=4068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cryptcard.cc\/api\/wp\/v2\/tags?post=4068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}