{"id":3363,"date":"2022-12-14T20:11:13","date_gmt":"2022-12-14T12:11:13","guid":{"rendered":"https:\/\/www.picol.com\/blog\/?p=3363"},"modified":"2022-12-15T11:14:37","modified_gmt":"2022-12-15T03:14:37","slug":"what-is-merkle-tree-en","status":"publish","type":"post","link":"https:\/\/www.picol.com\/blog\/en\/what-is-merkle-tree-en\/","title":{"rendered":"What is Merkle Tree"},"content":{"rendered":"\n<p>Recently FTX\u2019s bankrupt shocked the whole industry. Almost all top exchanges have announced their 100% proof of reserve. Different exchanges chose different approaches. Some chose Merkle Tree, some published their wallet address, while some chose the independent audit. So you must be curious about what is Merkle Tree.<\/p>\n\n\n\n<h2><strong>Picol 100% Reserve Plan<\/strong><\/h2>\n\n\n\n<p>Picol has been operating for more than 3 years, and keeping 100% reserve as our responsibility. We promise that we will never embezzle users&#8217; funds and users can withdraw their coins at any time. This time Picol has chose the appraoch of Merkle Tree to prove our 100% reserve.<\/p>\n\n\n\n<h2><strong>Explanation of Merkle Tree<\/strong><\/h2>\n\n\n\n<p>Merkle Tree was invented by Ralph Merkle in 1979, which has been more than 40 years since it\u2019s born. It\u2019s a kind of algorithm based on zero-knowledge to let every single node to be able to verify if the whole data is trustable.<\/p>\n\n\n\n<p><strong>1. Hash algorithm<\/strong><\/p>\n\n\n\n<p>Before learning Merkle Tree, we need to understand what is the Hash algorithm. Hash algorithm is a mathematical function that garbles data and makes it unreadable. Hashing algorithms are one-way programs, so the text can&#8217;t be unscrambled and decoded by anyone else. Cryptocurrencies like Bitcoin also utilize hash algorithm. For example, you don\u2019t know the private key if you know one\u2019s Bitcoin address, while you can generate your address if you have the private key.<\/p>\n\n\n\n<p><strong>2. Generate Merkle Tree<\/strong><\/p>\n\n\n\n<p>After understanding hash algorithm, we can start to generate a Merkle Tree now. First of all, we need to generate a \u201cleaf\u201c for every single user. These leaves contain the ID and assets data snapshot at a specific time. Picol uses the userid, the coins a user owns, and the balance of these coins as the basic data. According to these data, we calculate every basic data into a hashed value. Every user will have a hashed value, like Hash1, Hash2, Hash3, Hash4. Here we have the first layer of \u201cbranch\u201c.<\/p>\n\n\n\n<p>Then let\u2019s generate the second layer of branch. Let\u2019s combine the hash 1 and hash 2 together, and calculate the Hash12 for Hash1+Hash2. And also we will have Hash34 using the same method. That\u2019s how we have the 2nd layer of branch.<\/p>\n\n\n\n<p>If we keeps combining the hash values of the second branch, we will have a new layer of branch, with the new hash values like Hash1234.<\/p>\n\n\n\n<p>At last, we will have only one hash value in the end. We call that value the \u201cHash Root\u201c.<\/p>\n\n\n\n<p>Here\u2019s how we get a Merkle Tree from scratch.<\/p>\n\n\n\n<p>Thanks for your support.<\/p>\n\n\n\n<p>Picol team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently FTX\u2019s bankrupt shocked the whole industry. Alm &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.picol.com\/blog\/en\/what-is-merkle-tree-en\/\"> <span class=\"screen-reader-text\">What is Merkle Tree<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[34],"tags":[],"_links":{"self":[{"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/posts\/3363"}],"collection":[{"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/comments?post=3363"}],"version-history":[{"count":3,"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/posts\/3363\/revisions"}],"predecessor-version":[{"id":3370,"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/posts\/3363\/revisions\/3370"}],"wp:attachment":[{"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/media?parent=3363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/categories?post=3363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.picol.com\/blog\/wp-json\/wp\/v2\/tags?post=3363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}