{"id":10158,"date":"2023-01-09T09:12:46","date_gmt":"2023-01-09T09:12:46","guid":{"rendered":"https:\/\/www.bitnovo.com\/blog\/?p=10158"},"modified":"2022-05-17T02:05:35","modified_gmt":"2022-05-17T02:05:35","slug":"what-is-a-double-spending-attack","status":"publish","type":"post","link":"https:\/\/www.bitnovo.com\/blog\/en\/what-is-a-double-spending-attack","title":{"rendered":"What is a double-spending attack?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Alternar tabla de contenidos\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ffffff;color:#ffffff\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ffffff;color:#ffffff\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-a-double-spending-attack\/#history_of_double_spending\" >History of double spending<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-a-double-spending-attack\/#how_does_a_double-spending_attack_work\" >How does a double-spending attack work?<\/a><\/li><\/ul><\/nav><\/div>\n<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Tiempo de lectura:<\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span><p>The attack known as\u00a0<strong>double spending<\/strong>\u00a0translates as the ability to duplicate a currency and use it in more than one transaction.<\/p>\n<p>When we talk about double-spending we refer to one of the most frequent attacks in the cryptocurrency world. This type of attack allows attackers to use the same coin<strong>\u00a0several times<\/strong>. The problem is that this attack affects the technology and operation of cryptocurrencies with respect to decentralization.<\/p>\n<p>Due to these attacks, developers have been creating various\u00a0<strong>methods<\/strong>\u00a0of protection against double spending. It would be the perfect comparison between counterfeiting banknotes in FIAT money but in the world of cryptocurrencies.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"history_of_double_spending\"><\/span><strong>History of double spending<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>The first\u00a0<strong>system against a double-spending<\/strong>\u00a0attack in history was created long before the first attack even took place, even before the launch of the first cryptocurrency, Bitcoin. Before that there were many failed attempts to create digital money.<\/p>\n<p><b>David Chaum\u00a0<\/b>was the creator of the first digital currency called\u00a0<strong>E-Cash<\/strong>\u00a0in the early\u00a0<strong>1980s<\/strong>. With it, the concept of\u00a0<strong>electronic money<\/strong>\u00a0was created, but with it the possibility of being able to duplicate it. For this reason, Chaum included a protection system against\u00a0<b>double spending attacks.<\/b><\/p>\n<p>This system was a c<strong>ryptographic<\/strong>\u00a0mechanism called blind or opaque signatures. Its operation consisted of preventing the issuer from knowing the origin of the money. At the same time, it kept a central server from which the coins were kept under control, thus avoiding\u00a0<strong>double spending.<\/strong><\/p>\n<p>Up to this point everything was going great and we already had a defense mechanism, but there was a reason why E-Cash did not become the first cryptocurrency. The reason was this very mechanism. By having everything controlled by a\u00a0<strong>centralized<\/strong>\u00a0system and making the whole system centralized, it was enough to take control of the\u00a0<strong>core<\/strong>\u00a0to compromise the entire platform and its users. This became the weak point of E-Cash and that is why the project failed.<\/p>\n<p>Years later, the implementation of\u00a0<strong>Bitcoin<\/strong>\u00a0came about thanks to\u00a0<strong>Satoshi Nakamoto<\/strong>. Satoshi found a solution to this centralization that compromised the project based on\u00a0<strong>consensus<\/strong>. He replaced the central with a consensus of multiple\u00a0<strong>nodes<\/strong>\u00a0connected to each other and to the network itself, in charge of validating and confirming transactions. Today, this process is the one that runs on blockchains and for which nodes receive\u00a0<strong>rewards<\/strong>\u00a0that keep them incentivized to continue their work.<\/p>\n<p>In case there is a malicious node that wants to attack the network, it will have to compete for the\u00a0<strong>Hash<\/strong>\u00a0that the rest of the connected nodes that work in an honest way have. The network is growing daily and it is becoming increasingly\u00a0<strong>difficult<\/strong>\u00a0to carry out attacks.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div id=\"image_878469922\" class=\"img has-hover x md-x lg-x y md-y lg-y\">\n<div class=\"img-inner dark\"><img fetchpriority=\"high\" decoding=\"async\" class=\"attachment-large size-large lazyloaded\" src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/03\/Qu%C3%A9-es-doble-gasto3.jpg\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/03\/Qu\u00e9-es-doble-gasto3.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/03\/Qu\u00e9-es-doble-gasto3-300x205.jpg 300w\" alt=\"Qu\u00e9 es doble gasto\" width=\"768\" height=\"526\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/03\/Qu\u00e9-es-doble-gasto3.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/03\/Qu\u00e9-es-doble-gasto3-300x205.jpg 300w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/03\/Qu\u00e9-es-doble-gasto3.jpg\" data-sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/div>\n<\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"how_does_a_double-spending_attack_work\"><\/span><strong>How does a double-spending attack work?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>As we already know, a double-spending attack occurs when a user wants to use\u00a0<strong>the same currency to perform two or more transactions<\/strong>. Below we will see how such an attack works and how the attacker can manage to get two or more transactions by paying only one.<\/p>\n<p>In the world of cryptocurrencies, the user carries out<strong>\u00a0two different transactions<\/strong>\u00a0at the same time. He buys the product from both sellers at the same time and performs both transactions once he has his product. The nodes then begin to create blocks and\u00a0<strong>validate<\/strong>\u00a0these two transactions. It is inevitable that at some point one block will be confirmed\u00a0<strong>before<\/strong>\u00a0the other, since one of them will be transmitted to more nodes and faster. This means that eventually one block will be\u00a0<strong>confirmed<\/strong>\u00a0and one will not, thus leading to the\u00a0<strong>double spending<\/strong>\u00a0problem. In this case one of the sellers can collect his sale, while the other would have been\u00a0<strong>cheated.<\/strong><\/p>\n<p>This type of attack is also known as\u00a0<strong>race attack<\/strong>. In addition, there are other types of attacks derived from the double-spending attack, such as the well-known\u00a0<strong>51% attack<\/strong>. To carry out this attack, the attacker must control more than 50% of the hash power or\u00a0<strong>mining<\/strong>\u00a0power in the entire network.<\/p>\n<p>This attack requires a lot of computational power and at first glance is difficult to implement. However, we should not be overconfident, since in certain circumstances this attack can be very\u00a0<strong>easy<\/strong>\u00a0to carry out.<\/p>\n<p>Taking into account that cryptocurrencies act by\u00a0<strong>consensus<\/strong>, since there is no central controlling them, they are executed by all nodes. This system aims to\u00a0<strong>create and validate blocks<\/strong>\u00a0and transactions. This forces the attacker to control more than 50% of the network if he wants to achieve a\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-a-51-blockchain-attack\/\">51% attack<\/a>. But what would happen if the attacker succeeds?<\/p>\n<p>In this case the cybercriminal could\u00a0<strong>mine and validate<\/strong>\u00a0the blocks faster than we know leaving the rest of the users behind. This could trigger a double-spending attack with a high probability of success. There are also other\u00a0<strong>double-spending<\/strong>\u00a0attacks with some nuances such as the\u00a0<strong>Finney attack<\/strong>, the\u00a0<strong>Vector 76<\/strong>\u00a0attack or the\u00a0<strong>brute<\/strong>\u00a0<strong>force attack<\/strong>, among others.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Tiempo de lectura:<\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span>The attack known as\u00a0double spending\u00a0translates as the ability to duplicate a currency and use it in more than one transaction. When we talk about double-spending we refer to one of the most frequent attacks in the cryptocurrency world. This type of attack allows attackers to use the same coin\u00a0several times. The problem is that this [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":8068,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10158","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-criptomonedas"],"_links":{"self":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/10158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/comments?post=10158"}],"version-history":[{"count":0,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/10158\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media\/8068"}],"wp:attachment":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media?parent=10158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/categories?post=10158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/tags?post=10158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}