{"id":234980,"date":"2022-05-10T01:30:13","date_gmt":"2022-05-10T01:30:13","guid":{"rendered":"https:\/\/www.cryptoknowmics.com\/news\/?p=234980"},"modified":"2022-05-09T18:24:36","modified_gmt":"2022-05-09T18:24:36","slug":"mining-zrc-2-tokens-in-zilliqa-your-adventure-begins-here","status":"publish","type":"post","link":"https:\/\/www.cryptoknowmics.com\/news\/mining-zrc-2-tokens-in-zilliqa-your-adventure-begins-here","title":{"rendered":"Mining ZRC-2 Tokens in Zilliqa &#8211; Your Adventure Begins Here"},"content":{"rendered":"<p><span style=\"font-weight: 400\">For the past couple of years, the race to build blockchain applications has seen exponential growth in their adoption by businesses and consumers. As a result, the number of projects within this space has also increased exponentially. And yet, scalability, cost, and security continue to remain major barriers to the adoption of blockchain networks. <\/span><a href=\"https:\/\/www.cryptoknowmics.com\/news\/zilliqa-zil-bullish-despite-a-33-drop-from-april-2022-highs\"><span style=\"font-weight: 400\">Zilliqa<\/span><\/a><span style=\"font-weight: 400\"> aims to solve these issues with its high throughput and low-cost transaction capability. Therefore, this article aims to explain how to mine your ZRC-2 tokens in Zilliqa.<\/span><\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"https:\/\/en.ethereumworldnews.com\/wp-content\/uploads\/2021\/07\/Zilliqa-July-23rd.jpg\" alt=\"Mining ZRC-2 Tokens in Zilliqa - Your Adventure Begins Here\" width=\"685\" height=\"417\" \/><\/p>\n<h2><b>Zilliqa Blockchain Platform<\/b><\/h2>\n<p><span style=\"font-weight: 400\">Zilliqa is a blockchain platform whose aim is to solve scalability and scalability problems. The Zilliqa platform aims to deliver high performance with low computational cost and scale. This is done at thousands of transactions per second.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">With the increasing popularity of blockchain applications, the demand for the use of blockchain networks has soared. However, the scalability issue which has been existing in the blockchain technology domain has been identified as the major cause of failure of blockchain systems.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Zilliqa is trying to solve this problem by developing a new blockchain technology called \u201c<\/span><a href=\"https:\/\/www.techtarget.com\/searchoracle\/definition\/sharding\"><span style=\"font-weight: 400\">sharding<\/span><\/a><span style=\"font-weight: 400\">.\u201d Sharding is the breaking up of a single network into multiple parallel networks. Each network will be able to run many thousands of transactions per second. Hence, the thorough capability provided by Zilliqa has led to the attention of many enterprises across the world.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Zilliqa&#8217;s main aim is to solve the issues of scalability and transaction costs that have plagued blockchains since their inception. As a result, it has a high throughput capacity and a low transaction cost.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">This feature has made it an attractive option for both businesses and individuals who want to conduct decentralized and secure cross-border payments. Their governance mechanism is also unique as it doesn\u2019t reward token holders at the expense of the network.<\/span><\/p>\n<h2><b>What is ZRC-2 Token?<\/b><\/h2>\n<p><span style=\"font-weight: 400\">Miners can earn a new type of digital token called a ZRC-2 (short for Zilliqa Revenues) when they contribute their computer resources to verifying transactions on Zilliqa. These tokens are created as an incentive for miners to contribute their computer resources, i.e., CPU and GPU power, towards verifying and supporting the secure execution of smart contracts on Zilliqa&#8217;s scalable platform.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Each time a new block is added to the blockchain, all active miners get awarded with new blocks containing payouts of transaction fees and newly minted tokens (also known as block rewards). In total, about 13% of all new tokens are allocated to mining rewards every year \u2013 that\u2019s equivalent to 12.6 million tokens every year!<\/span><\/p>\n<h3><b>Creating and Dispersing Coins<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Querying the token account balance while moving tokens across accounts<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Obtaining the total number of tokens in circulation.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enabling another person to spend tokens on your behalf, etc<\/span><\/li>\n<\/ul>\n<h3><b>Examples of ZRC<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">XGSD: First Singapore dollar-pegged stablecoin produced by Xfers is ZRC-2#\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">gZil: ZIl token provided by the Zilliqa Seed Node Staking Program\u00a0<\/span><\/li>\n<\/ul>\n<h2><b>Checking The Compliance of the ZRC contract<\/b><\/h2>\n<p><span style=\"font-weight: 400\">It is important to ensure that your smart contract is ZRC-2 compliant before starting any integration with ZRC-2. Compatibility issues with other contracts or dApp\/exchange integrations may occur if the standard is not met. However, the Developer part of this developer site has a subsection dedicated to the ZRC-2 specification.<\/span><\/p>\n<h2><b>Monitoring Arrival of ZRC-2 Deposit<\/b><\/h2>\n<p><span style=\"font-weight: 400\">To monitor every new deposit of a specific ZRC-2 token:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Using the API &#8220;GetTxnBodiesForTxnBlock,&#8221; poll the blockchain block by block and execute each transaction.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Perform the following steps for each transaction in the TxBlock:<\/span><\/li>\n<\/ol>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Determine if &#8220;toAddr&#8221; corresponds to the ZRC-2 token contract address. For instance, the contract address for the gZIL ZRC-2 token is a845c1034cd077bd8.32be0447239c7e4be6b21<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Verify that the success field contains the value true. If it is false, it indicates that the network did not accept this transaction.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Look for Transfer or TransferFrom tag under data. Verify that the value conforms to the base16 address format of your deposit address.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If it matches, value is the number of tokens being sent to your deposit address from the sender.<\/span><\/li>\n<\/ul>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Additionally, you can examine event logs to ensure the following:<\/span><\/li>\n<\/ol>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">_eventname is equal to Transfer<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Both &#8220;TransferSuccess&#8221; and &#8220;address&#8221; are equal to your deposit address value<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">vname sender identifies the transaction sender<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The vname recipient refers to your deposit address.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">vname amount represents the number of tokens sent.<\/span><\/li>\n<\/ul>\n<h2><b>Mining in Zilliqa<\/b><\/h2>\n<p><span style=\"font-weight: 400\">Mining in Zilliqa works in a similar way to Bitcoin mining. However, miners are rewarded with tokens for their contribution to the network in this process. This is done by validating transaction data through sharding and through a process known as \u2018Scheduling.\u2019 Therefore, after a transaction is scheduled, the miner will broadcast the transaction to the network to verify it and add it to the network blockchain.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In Zilliqa, you can mine ZRC-2 tokens in two ways:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Contracting for Scilla tokens<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Utilizing a ZRC-2 token maker<\/span><\/li>\n<\/ol>\n<h3><b>Contracting for Scilla tokens<\/b><\/h3>\n<p><span style=\"font-weight: 400\">The creation of ZRC-2 tokens requires a smart contract from Scilla. A ZRC-2 implementation has to allow the maintenance, monitoring, owning, and trading peer-to-peer of fungible tokens using wallets or exchanges. So, using the ZRC-2\u00a0 contract published on the official website is the simplest method to get started.<\/span><\/p>\n<p><span style=\"font-weight: 400\">You can create a new contract in the Neo Savant IDE (https:\/\/ide.zilliqa.com\/) and paste the reference contract into it to deploy the contract.\u00a0<\/span><\/p>\n<h3><b>Deploying the Token Contract<\/b><\/h3>\n<p><span style=\"font-weight: 400\">Click the DEPLOY button on top of the contract, then fill out the following:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">contract-owner: This should contain information on the token&#8217;s owner and the account&#8217;s address that deployed the contract. It is advisable to let the address format be in base16<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">name \u2014 A descriptive name for the token you&#8217;re creating should be given.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Symbol of your token<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Symbol decimal \u2014 The precision level for your tokens. For instance, if you set it to 2, your token\u2019s small denomination can be as low as 0.01.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Unit supply \u2014 the total number of tokens in circulation. This number depends on the decimal you&#8217;ve specified. For instance, if the decimal is set to 2, setting the unit supply to 100000 will result in 1000 tokens, which is 100000 \/ 100. (because of 2 decimal places).<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Among other things, the information above will display you the token&#8217;s name, supply, and current holders (under the HOLDERS tab).<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To make a copy of the contract&#8217;s address, click on the copy button.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Upon completion of the fields, click the Deploy Contract button to deploy your contract. To complete the transaction, ZilPay will ask for payment.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can then enter your confirmation code.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">After payment and deployment, your token will be created.<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>For the past couple of years, the race to build blockch &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.cryptoknowmics.com\/news\/mining-zrc-2-tokens-in-zilliqa-your-adventure-begins-here\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cMining ZRC-2 Tokens in Zilliqa &#8211; Your Adventure Begins Here\u201d<\/span><\/a><\/p>\n","protected":false},"author":288,"featured_media":235116,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"aside","meta":{"_mi_skip_tracking":false},"categories":[30121,42106,1267,1,28,107377,236,79047],"tags":[111476,27623,113018,113019,112970],"yst_prominent_words":[2617,3943,2413,2403,101119,4077,20955],"_links":{"self":[{"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/posts\/234980"}],"collection":[{"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/users\/288"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/comments?post=234980"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/posts\/234980\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/media\/235116"}],"wp:attachment":[{"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/media?parent=234980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/categories?post=234980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/tags?post=234980"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.cryptoknowmics.com\/news\/wp-json\/wp\/v2\/yst_prominent_words?post=234980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}