{"id":8894,"date":"2023-05-08T12:58:18","date_gmt":"2023-05-08T12:58:18","guid":{"rendered":"https:\/\/www.bitnovo.com\/blog\/?p=8894"},"modified":"2022-05-12T23:37:16","modified_gmt":"2022-05-12T23:37:16","slug":"what-is-token-allowance","status":"publish","type":"post","link":"https:\/\/www.bitnovo.com\/blog\/en\/what-is-token-allowance","title":{"rendered":"What is Token Allowance?"},"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-token-allowance\/#why_were_the_allowance_functions_created\" >Why were the allowance functions created?<\/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-token-allowance\/#erc-20_tokens_and_the_arrival_of_token_allowance\" >ERC-20 tokens and the arrival of Token Allowance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-token-allowance\/#example_of_token_allowance\" >Example of Token Allowance<\/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>If you are wondering what the Allowance Token is, we could summarize it as an interesting feature of the Ethereum ERC-20 and ERC-777 tokens, through which we can grant specific permissions to access and use funds to DApps and DEX, so they can operate autonomously and safely.<\/p>\n<div>This is a fairly common feature in the token field, and its purpose is to allow smart contracts to automatically interact with money placed in a specific direction.<\/div>\n<div><\/div>\n<div>Permissions or access rights allow third parties to be entitled to perform a certain number of token transactions associated with our address. It is worth noting that none of these need to deliver the private key of our address.<\/div>\n<div><\/div>\n<div>But why do we give access to our money to an intelligent contract instead of controlling it by our own means? Well, here we will clarify the usefulness of this function and, most importantly, how this function can greatly facilitate our interaction with intelligent contracts.<\/div>\n<h2><span class=\"ez-toc-section\" id=\"why_were_the_allowance_functions_created\"><\/span>Why were the allowance functions created?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>If you know what a token is, you probably know that within the Ethereum network you can create tokens of different types and with different utilities. Because of this, the developers preferred to create a set of rules or specifications to set a standard in token creation: the ERC-20 standard token.<\/div>\n<div><\/div>\n<div>Among those specifications is the Allowance function, which as mentioned above, allows any user who has a token to grant permissions to DEX, Dapps or DeFi to use the tokens that are located in a certain address.<\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div>Thus, we can authorize any of these to handle our funds with our prior consent. For example, a Dapps can send our tokens without having to be on hold all the time for us to do so.<\/div>\n<div><\/div>\n<div>This feature is usually given to smart contracts as they are governed by predetermined rules and allow us to go to sleep at night knowing that no one will be able to cheat us or steal our funds.<\/div>\n<div><\/div>\n<div>On the other hand, the allowance function allows us to define the fair and necessary amount we want to use for the smart contract. Without a doubt, this is another security measure that allows us to control the way in which intelligent contracts perform their different operations when interacting with intelligent contracts.<\/div>\n<div><\/div>\n<div>Most importantly, it allows us to do this in a decentralized manner without the need for a trusted third party to intervene in the process.<\/div>\n<div id=\"image_1209494740\" 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\/2020\/09\/Que-es-token-allowance_2-1024x701.jpg\" sizes=\"(max-width: 1020px) 100vw, 1020px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-1024x701.jpg 1024w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-300x205.jpg 300w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-768x526.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-1536x1052.jpg 1536w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2.jpg 1601w\" alt=\"\u00bfQue es token allowance? Bitnovo\" width=\"1020\" height=\"698\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-1024x701.jpg 1024w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-300x205.jpg 300w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-768x526.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-1536x1052.jpg 1536w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2.jpg 1601w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2020\/09\/Que-es-token-allowance_2-1024x701.jpg\" data-sizes=\"(max-width: 1020px) 100vw, 1020px\" \/><\/div>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"erc-20_tokens_and_the_arrival_of_token_allowance\"><\/span><b>ERC-20 tokens and the arrival of Token Allowance<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>It can be said that the arrival of the allowance in the world of cryptomonies is with the arrival of the ERC-20 of Ethereum. The standard has a series of predetermined functions in its structure that facilitate the work of developers to create intelligent contracts and Dapps, thus allowing decentralized interactions between users and the Ethereum network and its associated tokens.<\/p>\n<p>To achieve this objective, the ERC-20 has a specific function called \u201callowance\u201d, which is generally defined as follows:<\/p>\n<p><b>function allowance(address tokenOwner, address spender)<\/b><\/p>\n<p>The function basically requires a series of usage permissions. These permissions allow the smart contract to be transferred from our address to the address defined by the smart contract with a certain amount of tokens (called distribution). This transfer is limited to the amount specified and accepted by the Dapp user. In fact, this is a security measure, which can control the possible expenses of the smart contract in each interaction and during the whole process.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"example_of_token_allowance\"><\/span><strong>Example of Token Allowance<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>Let\u2019s pretend that a user wants to use the Aave Smart Contract to make an investment. This interaction is handled by the Aave smart contracts who will ask the investor for an \u201callowance\u201d so that he can use tokens in his possession.<\/div>\n<div><\/div>\n<div>When the user decides to accept this allowance, Aave will get the tokens and make the corresponding investment. This process will always require the express permission of the user. In the event that a Dapp requests unsolicited access to a balance, use caution because it could be malicious access.<\/div>\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>If you are wondering what the Allowance Token is, we could summarize it as an interesting feature of the Ethereum ERC-20 and ERC-777 tokens, through which we can grant specific permissions to access and use funds to DApps and DEX, so they can operate autonomously and safely. This is a fairly common feature in the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6336,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-8894","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\/8894","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=8894"}],"version-history":[{"count":0,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/8894\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media\/6336"}],"wp:attachment":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media?parent=8894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/categories?post=8894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/tags?post=8894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}