{"id":10527,"date":"2023-02-14T18:30:13","date_gmt":"2023-02-14T18:30:13","guid":{"rendered":"https:\/\/www.bitnovo.com\/blog\/?p=10527"},"modified":"2025-09-10T15:22:58","modified_gmt":"2025-09-10T15:22:58","slug":"what-are-flash-loans-defi-loans","status":"publish","type":"post","link":"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans","title":{"rendered":"What are flash loans? DeFi Loans"},"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' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans\/#typical_types_of_loans\" >Typical types of loans<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans\/#loans_without_collateral\" >Loans without collateral<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans\/#loans_with_guarantee\" >Loans with guarantee<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans\/#flash_loans\" >Flash Loans<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans\/#attacks\" >Attacks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-are-flash-loans-defi-loans\/#defi_is_experimental\" >DeFi is experimental<\/a><\/li><\/ul><\/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\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span><p>While in the traditional\u00a0<strong>financial world<\/strong>\u00a0transactions are governed by contracts\u00a0<strong>enforced by law<\/strong>, in the blockchain world \u201c<strong>the code is the law<\/strong>\u201c.<\/p>\n<p>&nbsp;<\/p>\n<p>This is a major paradigm shift from a\u00a0<strong>centralized model<\/strong>\u00a0(with trust in third parties) to a\u00a0<strong>decentralized<\/strong>\u00a0one (the code is self-executing). By using a blockchain with the flexibility of\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-a-smart-contract\/\">smart contracts<\/a>\u00a0that\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-ethereum-eth-and-how-does-it-work\/\">Ethereum<\/a>\u00a0has, we will be able to find interesting financial uses.<\/p>\n<p>&nbsp;<\/p>\n<p>One of those concepts that used to be impossible to conceive is that of \u201c<strong>flash loans<\/strong>\u201c. In this type of loan\u00a0<strong>there is no collateral<\/strong>\u00a0(funds that you leave as a guarantee), nor is it necessary, because it is repaid in the same transaction. How can this be possible, a loan that lasts one second?<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h3><span class=\"ez-toc-section\" id=\"typical_types_of_loans\"><\/span><strong>Typical types of loans<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>First of all, let\u2019s take a look at how loans work, starting by differentiating between<strong>\u00a02 types of loans<\/strong>.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h3><span class=\"ez-toc-section\" id=\"loans_without_collateral\"><\/span><strong>Loans without collateral<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>One type of loan is\u00a0<strong>unsecured or uncollateralized.<\/strong>\u00a0A person<strong>\u00a0borrows money<\/strong>\u00a0and the lender will accept, or not, depending on your\u00a0<strong>trust<\/strong>\u00a0in him and his\u00a0<strong>credit history<\/strong>. For example, if this person has repaid all his previous loans on time, he will have a higher\u00a0<strong>reputation<\/strong>\u00a0and the possibility of receiving more loans. As with any loan,\u00a0<strong>interest<\/strong>\u00a0is added to the amount to be repaid.<\/p>\n<p>&nbsp;<\/p>\n<p>But these loans are usually\u00a0<strong>limited<\/strong>\u00a0to small amounts and can be\u00a0<strong>risky<\/strong>.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div id=\"image_1409381733\" 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\/07\/Que-es-Flash-Loans-Prestamos-Defi1.jpg\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi1.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi1-300x205.jpg 300w\" alt=\"Qu\u00e9 es Flash Loans? Pr\u00e9stamos DeFi\" width=\"768\" height=\"526\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi1.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi1-300x205.jpg 300w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi1.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<div class=\"is-divider divider clearfix\"><\/div>\n<h3><span class=\"ez-toc-section\" id=\"loans_with_guarantee\"><\/span><strong>Loans with guarantee<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>In\u00a0<strong>secured lending<\/strong>, the borrower leaves a property or asset (or several assets) as collateral or security to\u00a0<strong>back his creditworthiness<\/strong>. In case he fails to repay the loan, the lender keeps the collateral. The collateral can be a house, gold, or even Bitcoin.<\/p>\n<div class=\"is-divider divider clearfix\"><\/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=\"flash_loans\"><\/span><strong>Flash Loans<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>Now we enter the world of\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-defi-o-decentralized-finance\/\">DeFi (Decentralized Finance)<\/a>. In\u00a0<strong>Ethereum<\/strong>\u00a0and\u00a0<strong>smart contract blockchains<\/strong>\u00a0you can make smart contract calls, and even link their executions, in\u00a0<strong>a single transaction<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Flash loans are quick loans that do not require collateral or a credit check to be granted.<\/strong><\/p>\n<p>You may wonder\u00a0<strong>how this is possible<\/strong>, and why would a lender give us cryptocurrencies with the risk that they will not be repaid?<\/p>\n<p><strong>The answer is simple: flash loans are repaid in the same transaction\u00a0<\/strong>(and this is a necessary condition).<\/p>\n<p>What does this mean? That a flash loan can be programmed as\u00a0<strong>a single transaction<\/strong>\u00a0that happens in 3 stages.<\/p>\n<p id=\"f254\" class=\"hn ho dx hp b ew hq hr hs ez ht hu hv hw hx hy hz ia ib ic id ie if ig ih ii db eu\" data-selectable-paragraph=\"\">1) You receive the loan.<\/p>\n<p id=\"f610\" class=\"hn ho dx hp b ew hq hr hs ez ht hu hv hw hx hy hz ia ib ic id ie if ig ih ii db eu\" data-selectable-paragraph=\"\">2) You do something with the loan.<\/p>\n<p id=\"4713\" class=\"hn ho dx hp b ew hq hr hs ez ht hu hv hw hx hy hz ia ib ic id ie if ig ih ii db eu\" data-selectable-paragraph=\"\">3) You repay the loan.<\/p>\n<p data-selectable-paragraph=\"\">All in the same transaction and in a fast way.<\/p>\n<p>If you don\u2019t pay back the loan in the agreed time, the network will reject the transaction, and the lender will get its funds back. In fact, as far as the blockchain is concerned, the funds will never leave the lender\u2019s control.<\/p>\n<p>Because of this,\u00a0<strong>they have very little risk<\/strong>\u00a0from the point of view of the lender and the borrower (the borrower). The pioneer platform in these loans is\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-aave-and-how-does-it-work\/\">Aave<\/a>.<\/p>\n<p>But how can I make quick profits that will allow me to pay back the money I borrowed in the flash loan? A common use is to exploit\u00a0<strong>arbitrage opportunities.<\/strong><\/p>\n<h4>\nExample of the use of a Flash Loan<\/h4>\n<p>Imagine that a token is trading on a decentralized exchange \u201cX\u201d at $1 and on another one called \u201cY\u201d at $0.98.\u00a0<strong>You can take advantage of this situation by asking for a flash loan<\/strong>\u00a0to finance a purchase of, say, $1 million worth of tokens on exchange Y to sell on X. All this can happen in\u00a0<strong>the same transaction and generate a large profit with little risk<\/strong>\u00a0(because the money is borrowed). In this case you would generate a profit of $20,400 thanks to the large amount of money you borrowed, and you would have enough to pay interest and\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-gas-in-ethereum\/\">gas costs<\/a>.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h4><strong>16,000 dollars in 13 seconds: a very profitable flash loan<\/strong><\/h4>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>In order for you to understand even better how a flash loan works, I will tell you a real case of a person who earned\u00a0<strong>16,182 USDC<\/strong>\u00a0(<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/stablecoin-what-is\/\">stablecoin<\/a>\u00a0that tracks the value of the dollar).<\/p>\n<p>It happened in August 2020 and the procedure performed was:<\/p>\n<ul>\n<li>\n<ul>\n<li><strong>He borrowed\u00a0<\/strong>USDC 2,048,000 using a flash loan.<\/li>\n<li><strong>He exchanged\u00a0<\/strong>these USDC for 2,028,367\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-dai-the-complete-guide\/\">DAI<\/a>\u00a0in Curve and Pool.<\/li>\n<li><strong>He exchanged\u00a0<\/strong>the DAI for USDC 2,064,182 in Curve\u2019s sUSD group.<\/li>\n<li><strong>He paid\u00a0<\/strong>the 2,048,000 of the flash loan and obtained the rest as profit.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div id=\"image_384720590\" class=\"img has-hover x md-x lg-x y md-y lg-y\">\n<div class=\"img-inner dark\"><img decoding=\"async\" class=\"attachment-large size-large lazyloaded\" src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi2.jpg\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi2.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi2-300x205.jpg 300w\" alt=\"Qu\u00e9 es Flash Loans? Pr\u00e9stamos DeFi\" width=\"768\" height=\"526\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi2.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi2-300x205.jpg 300w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/07\/Que-es-Flash-Loans-Prestamos-Defi2.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<div class=\"is-divider divider clearfix\"><\/div>\n<h3><span class=\"ez-toc-section\" id=\"attacks\"><\/span><strong>Attacks<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>The fact that the risk is so low in these loans opens up the possibility of<strong>\u00a0sophisticated attacks with little risk and very profitable.<\/strong>\u00a0Flash loans allow an attacker to\u00a0<strong>finance<\/strong>\u00a0attacks without risking his own money.<\/p>\n<p>&nbsp;<\/p>\n<p>In fact this type of attack became popular in 2020 following\u00a0<strong>the hack of bZx<\/strong>, a decentralized lending platform.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h3><span class=\"ez-toc-section\" id=\"defi_is_experimental\"><\/span><strong>DeFi is experimental<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>These kinds of events remind us that, like cryptocurrencies, DeFi is an\u00a0<strong>experimental technology<\/strong>. And while there are ways to combat flash loan attacks, such as using\u00a0<strong>decentralized<\/strong>\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-a-blockchain-oracle\/\">oracles<\/a>\u00a0in existing protocols, we don\u2019t know if it will be completely solvable in the long run.<\/p>\n<p>Even so, we can say that flash\u00a0<strong>loans and their attacks are here to stay<\/strong>, and in the future we will be able to witness\u00a0<strong>innovative ways of using<\/strong>\u00a0these loans, impossible in a traditional financial system.<\/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\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span>While in the traditional\u00a0financial world\u00a0transactions are governed by contracts\u00a0enforced by law, in the blockchain world \u201cthe code is the law\u201c. &nbsp; This is a major paradigm shift from a\u00a0centralized model\u00a0(with trust in third parties) to a\u00a0decentralized\u00a0one (the code is self-executing). By using a blockchain with the flexibility of\u00a0smart contracts\u00a0that\u00a0Ethereum\u00a0has, we will be able to find [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":7676,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-10527","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain-en"],"_links":{"self":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/10527","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=10527"}],"version-history":[{"count":2,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/10527\/revisions"}],"predecessor-version":[{"id":24648,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/10527\/revisions\/24648"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media\/7676"}],"wp:attachment":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media?parent=10527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/categories?post=10527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/tags?post=10527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}