<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pablo Yabo on Medium]]></title>
        <description><![CDATA[Stories by Pablo Yabo on Medium]]></description>
        <link>https://medium.com/@pipaman?source=rss-5577a3b030e2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_b9Eq_o_cx_KwAmj.png</url>
            <title>Stories by Pablo Yabo on Medium</title>
            <link>https://medium.com/@pipaman?source=rss-5577a3b030e2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:18:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pipaman/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to add categories and community links to your project in AlgoExplorer]]></title>
            <link>https://medium.com/randlabs/how-to-add-categories-and-community-links-to-your-project-in-algoexplorer-947bfd060b7f?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/947bfd060b7f</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[explorer]]></category>
            <category><![CDATA[algorand]]></category>
            <category><![CDATA[block-explorer]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Fri, 08 Jul 2022 16:08:09 GMT</pubDate>
            <atom:updated>2022-07-08T16:08:09.354Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*w7QAcclonwG0P6XELPclUQ.png" /><figcaption>AlgoExplorer Categories</figcaption></figure><p><a href="https://algoexplorer.io/">AlgoExplorer</a> is in the constant pursuit of aggregating as much project information as possible with the aim of encouraging the community to do their own informed research.</p><p>With this in mind, now project creators are able to showcase 3 new features of their project directly on AlgoExplorer for the community to know more. These are the project’s whitepaper, community links, and project category.</p><p>In the case of the whitepaper, the system allows creators to include a link to their whitepaper regardless of where it’s presented. Community links can be added in list form as well. The aim of adding community links on the asset overview page is to help users identify the correct accounts linked to each project.</p><p>The project category labels we’ve decided to include in AlgoExplorer match with Algorand’s <a href="https://ecosystem.algorand.com/">Ecosystem page</a>. Within Algorand’s directory, you can browse projects based on 41 different categories. Creators will be able to assign up to 3 of these categories for their projects on AlgoExplorer.</p><p><strong><em>Adding new features to unverified projects</em></strong></p><p>Once the creator logs in to AlgoExplorer and they <a href="https://medium.com/randlabs/how-do-i-verify-my-asset-or-application-with-algoexplorers-login-system-for-creators-2a3db8321333">verify their creator address,</a> they will be able to see the assets created under that address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O-qRLzlfYA_NL_Iw" /></figure><p>When the creator goes to verify the asset using the corresponding button, they will see the new pop up window for verification requirements including the previous items as well as options for whitepaper, community links, and category.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bAibQFrnbCR5Q0rh" /></figure><p>Upon approval of the verification process, the information will be visible to all users through AlgoExplorer.</p><p><strong><em>Adding new features to already verified projects</em></strong></p><p>For creators that have already gone through the verification process for their assets, when logging in to AlgoExplorer, they will see their verified assets have an Edit button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X7Cz_CojsNEeNHIr" /></figure><p>When this option is selected, the familiar verification pop-up screen will be displayed and here the creator can add the new parameters or change previous ones if they so desire. The modification request will be reviewed by the AlgoExplorer team and the creator will be notified of the status.</p><p>Having more information clearly available for our community members will help them make informed comparisons and decision-making will be greatly benefitted. This is how the asset profile will look to all users when visualizing an asset in AlgoExplorer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BRZAQjj69XfhwUa7.png" /></figure><p>Soon, the asset category field will be used as a baseline for further exploration possibilities within new pages for AlgoExplorer, so stay tuned for that!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=947bfd060b7f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/how-to-add-categories-and-community-links-to-your-project-in-algoexplorer-947bfd060b7f">How to add categories and community links to your project in AlgoExplorer</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlgoExplorer API Fully Supports Algod and Algorand Indexer endpoints]]></title>
            <link>https://medium.com/randlabs/algoexplorer-api-fully-supports-algod-and-algorand-indexer-endpoints-ca3bcdd9b1ae?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca3bcdd9b1ae</guid>
            <category><![CDATA[algorand-blockchain]]></category>
            <category><![CDATA[algorand]]></category>
            <category><![CDATA[explorer]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Thu, 23 Jun 2022 14:37:07 GMT</pubDate>
            <atom:updated>2022-06-23T14:37:07.957Z</atom:updated>
            <content:encoded><![CDATA[<p>The latest update to node.algoexplorerapi.io is live. With this new version, all of the historical blocks and full node features, like the previously blocked /v2/accounts endpoints, are completely available through our API. No more limit for querying blocks past the last 1000. You can read more about the changes directly on <a href="https://algoexplorer.io/api-dev/v2">AlgoExplorer</a>.</p><p>Testnet and Betanet versions are also fully functional!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_lts6ElqCZbcBXkk9lu0bA.png" /><figcaption>AlgoExplorer API</figcaption></figure><p>Take a look at some examples using AlgoSDK to execute two actions; reading the account balance and making a transaction. This is only a small sample of the actions you can take using our framework. More examples can be found here:</p><p><a href="https://github.com/algorand/js-algorand-sdk/tree/develop/examples">https://github.com/algorand/js-algorand-sdk/tree/develop/examples</a></p><p>Initiate a project and install Algosdk dependency:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lWCpqFBJayfQEJ1x.png" /></figure><p>Here are our API URLs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3xnhb-7lf6LMWqOc.png" /></figure><p>These are the environment variables in my .env file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U-dfQBOa0mgMvat8.png" /></figure><p>Your package.json should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4nx1iumUSayJKiJd.png" /></figure><p>In your index.js, use the mnemonicToSecretKey method to get the account’s public and private data. You’re going to need this later to sign a transaction. Then instantiate the client (Algodv2):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d0m4JpKaeM43CjhN.png" /></figure><p>With the <em>accountInformation</em> method you can access the address balance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9F6XhTPiKnhEKjCG.png" /></figure><p>Here is an example of a transaction:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vi5_iozcOHBOkzUv.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca3bcdd9b1ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/algoexplorer-api-fully-supports-algod-and-algorand-indexer-endpoints-ca3bcdd9b1ae">AlgoExplorer API Fully Supports Algod and Algorand Indexer endpoints</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How do I verify my asset or application with AlgoExplorer’s Login System for Creators?]]></title>
            <link>https://medium.com/randlabs/how-do-i-verify-my-asset-or-application-with-algoexplorers-login-system-for-creators-2a3db8321333?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a3db8321333</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[algorand]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Mon, 23 May 2022 19:24:53 GMT</pubDate>
            <atom:updated>2022-05-24T19:39:41.392Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KIbnlf3hWz11N3rDpuCmZw.png" /><figcaption>AlgoExplorer Verification System</figcaption></figure><p>AlgoExplorer’s aim is to serve as a one-stop-shop of information for all assets available on the Algorand blockchain. We provide multiple metrics that help community members make informed decisions and developers create new technologies.</p><p>As the main reference blockchain explorer for Algorand, we felt the responsibility towards the community to implement an <a href="https://algoexplorer.io/reputation-system">asset reputation system</a> as has been common practice among multiple other explorers for various blockchains.</p><p>Launching today in conjunction with our new reputation system, is a Login system for Creators which allows project owners to update their asset’s or application’s information directly on AlgoExplorer. This new system will allow them to also apply for verification directly on the platform. We are hoping to empower creators by offering this tool to carry out important asset or application management actions which previously had to be dealt with manually on a case per case basis.</p><p>Let’s examine the process for applying for verification.</p><p><strong><em>Logging in to AlgoExplorer</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gCN1_SFR3A5IPAZK.gif" /><figcaption>Logging in using the new magiclink</figcaption></figure><p>Once you access <a href="http://algoexplorer.io/">algoexplorer.io</a> you will see a new Log In button on the top right hand side of your screen.</p><p>You can choose to login using GitHub, your Google Account or with a magiclink in your email inbox. When you enter your email address, you will receive a magic link in your inbox prompting you to log in to AlgoExplorer.</p><p>Now that you’ve been redirected back to AlgoExplorer, the login button will have changed to a user icon. When hovering over this icon, you will see a menu with 5 options. Using this menu you are able to change your profile settings, see your asset dashboard, apply for verification for both assets and applications or logout. Keep in mind that the verification process for assets and applications is the same except for a slight difference in the form you need to fill to apply.</p><p><strong><em>Verifying the Creator Address</em></strong></p><p>We will select the dashboard option to head over to the assets dashboard home. Once there, your first requirement is to verify the creator address. To do this, on the right hand side towards the top, there is a blue button prompting you to verify the address.</p><p>Within the new menu that has opened, you will have to input your creator address and select continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FlLkZQDk2dNhibbh.png" /><figcaption>Choosing the Verification Method</figcaption></figure><p>At this point, you will see 3 options for verifying that you are the owner of the address that was inputted in the previous step. Below you can find an explanation of how each method works.</p><p><em>Wallet</em></p><p>If you are a MyAlgo user, this option gives you the fastest way to verify your creator address.</p><p>If <em>wallet </em>is selected, a new pop up screen will open to link up MyAlgo Connect. In this pop up, you will simply have to enter your MyAlgo password in order for AlgoExplorer to cross reference your signature and verify that you are the owner of the address.</p><p><em>Manual</em></p><p>Users of any other Algorand wallets may elect this option for verifying their creator address.</p><p>If <em>manual </em>is selected, then you will have to open a new window or tab and head over to your wallet of choice. The AlgoExplorer tab will show you a wallet address and a 6 digit code for you to send a 0 Algo transaction to. In the wallet, input the receiver address, select 0 Algo for the amount and make sure that your 6 digit code given by AlgoExplorer, is inputted in the transaction note.</p><p>Once the transaction is sent, click on search for transaction on the AlgoExplorer tab. After a few seconds, the system will find the transaction you sent and corroborate that you are the owner of the address.</p><p><em>QR Code</em></p><p>Mobile users might prefer this option for ease of access on their phones.</p><p>This option allows you to use a separate device to open the QR code corresponding to the wallet address. Then AlgoExplorer will activate your webcam. Bring your device’s screen in front of the camera so that the QR code is read. The system will then ensure you are the owner of the address and you are able to continue. Please double check that the fields of value and note field were properly filled out automatically before proceeding, they must not be left blank.</p><p>When you complete the address verification process with any of the 3 options, you will get a confirmation screen prompting you to go back to the dashboard.</p><p><strong><em>Submitting the asset/app verification proposal</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*T45tXUgSmBFwm01C.gif" /><figcaption>ASA Proposal Form</figcaption></figure><p>In the dashboard you will see an individual card for each of your assets or applications created under the verified address. Each asset or application card will have several metrics for it as well as a Verify option. For assets or applications that you have already submitted a verification request, you will also be able to see the status of the request.</p><p>To continue with the process of verifying an asset or application, select the “Verify” button in the asset’s or application’s card. You will see a new form that asks you to fill out certain information related to the application or asset. At this point, the form you see will differ in some aspects depending on if it is an asset or application that you are trying to verify.</p><p>Once the form is filled out, you will head back to the dashboard and the card for the asset or application you requested verification for will show a “pending” status. For now, your job is done, the AlgoExplorer team will evaluate the request and assign a reputation level within the new system.</p><p>If the process is completed smoothly, you will receive an email indicating that your request has been fulfilled together with the level assigned to your asset or application. Depending on the reputation level you are given, your asset or application will reap certain benefits such as showing up higher on search results as well as stats listings. Additionally, AlgoExplorer users will be able to identify the legitimacy of an asset based on their badge, helping to avoid scams.</p><p>If there was some sort of issue with the verification process, you will also receive an email saying that your request has been rejected. If this latter case is true, then heading back to the dashboard you are able to appeal the decision using the corresponding button in the asset or application’s card.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a3db8321333" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/how-do-i-verify-my-asset-or-application-with-algoexplorers-login-system-for-creators-2a3db8321333">How do I verify my asset or application with AlgoExplorer’s Login System for Creators?</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TEAL ALGO Oracle in Algorand Layer-1]]></title>
            <link>https://medium.com/randlabs/teal-algo-oracle-in-algorand-layer-1-30cceba1f125?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/30cceba1f125</guid>
            <category><![CDATA[teal]]></category>
            <category><![CDATA[algorand]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[oracle]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Tue, 25 Aug 2020 15:04:47 GMT</pubDate>
            <atom:updated>2020-08-26T14:11:13.846Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*vmD7XU0Y2yPoZrfLvtFRzQ.png" /></figure><p>Price is a fundamental component of economic transactions. It is the multiplier required to calculate the amount of value exchanged between participants. In a blockchain, the ability to reference a price on-chain enables a seamless and trustless transaction environment, especially for automated transactions and smart contracts. Oracles are the entities in charge of broadcasting off-chain data such as market price to the blockchain, and serve as a source of truth that allows on-chain dApps to measure the value of assets referenced within a transaction.</p><p><a href="https://randlabs.io/">Rand Labs</a> has recently revealed a novel architecture for an <em>Algorand Oracle</em> that facilitates the swap of two assets fully on-chain, you can read more about the testnet implementation <a href="https://developer.algorand.org/articles/algorand-exchange-price-oracle/">here</a>.</p><p>We have committed additional resources to the project and have successfully evolved the Oracle from our initial prototype into a <em>TEAL</em>-compatible ALGO/USD on-chain <em>Oracle</em> using <a href="https://coinbase.com/">Coinbase.com</a> as the data source. The revamped <em>Oracle</em> is now in production and running on Algorand’s MainNet.</p><p>The TEAL ALGO Oracle will inspire and enable a new generation of financial products in the crypto ecosystem. For the first time in a high performance public-permissionless blockchain, the Oracle runs on layer 1 of the protocol. This means that any Algorand user or application will be able to reference the market price of an asset inside of their transaction (including <em>atomic transfers</em>) with negligible fees and receive a confirmation in under five seconds, only possible due to its unique Pure Proof-of-Stake consensus based on VRF primitives, introduced initially by Silvio Micali, Michael Rabin and Salil Vadha. This infrastructure will democratize access to DeFi products and services which are cost prohibitive for sub-$1k transactions on other blockchain platforms. Developers will have the choice over what data provider they use for their oracle, and the authenticity of the published data can be verified using signed messages of the provider that will come in the next iteration of this technology.</p><h3><strong>How does it work?</strong></h3><p>For the implementation, a <em>price submitter</em> is needed where the price is attached to the <em>Note</em> field of the transaction with the Oracle’s signature. Any <em>TEAL</em> code using this <em>Oracle</em> data must pay a fee that is used to cover the on-chain <em>price submitter’s </em>transaction fees. Since the <em>TEAL ALGO Oracle</em> contract can be referenced by any dApp, the service can potentially run continuously if enough applications integrate it into their stack. In addition, dApps (such as an on-chain Decentralized Exchange) can increase their Byzantine Fault Tolerance by using multiple price sources, since the <em>price submitter</em> could provide up to three price sources signed by different entities in a single transaction.</p><h3>Price Submitter</h3><p>Each round, the <em>price submitter</em> generates a transaction containing a <em>Message Pack</em> in the <em>Note </em>field that includes the price, timestamp and signed <em>TEAL </em>code that is used to verify the signed price within an <em>atomic transfer.</em></p><p>E.g.:</p><pre>{<br>  “decimals”: 4,</pre><pre>  “last_trade_at”: “2020–08–18T19:06:34.944785Z”,</pre><pre>  “price”: 5853,</pre><pre>  “signature”: {</pre><pre>    “l”: {</pre><pre>      “type”: “Buffer”,</pre><pre>      “data”: [ 1, …, 16 ]</pre><pre>    },</pre><pre>    “sig”: {</pre><pre>      “type”: “Buffer”,</pre><pre>      “data”: [ 157, …, 15 ]</pre><pre>    }</pre><pre>  },</pre><pre>  “timestamp”: “2020–08–18T19:24:44.078Z”</pre><pre>}</pre><p>To use the <em>Oracle,</em> users must create a group transaction with one transaction paying the <em>Oracle</em> fee, only the transaction free in this version, while the other transactions can reference the signed price in any way related to user needs. For a complete explanation, refer to this <a href="https://developer.algorand.org/articles/algorand-exchange-price-oracle/">article</a> and also this <a href="https://testnet.algoexplorer.io/transactions/group/Txm1kD7K2twbuKfknDL%2F7ydCtL%2BGrKSPEf5srzht3xg%3D">on-chain example in testnet</a>.</p><p>You can view the <em>TEAL ALGO Oracle</em> working tirelessly here: <a href="https://algoexplorer.io/address/PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2U">PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2U</a></p><p>We <a href="https://github.com/randlabs/algo-price-oracle">open sourced</a> the code to empower all developers and apps with the ability to implement custom <em>TEAL Oracles</em> that broadcast any type of data to Algorand’s Layer 1. A wide range of off-chain data can be brought on-chain by a variation of this Algorand <em>TEAL Oracle</em>, including stock prices, or fiat currency pair exchange rates, smart contract data from other chains, weather and sensor data, just to name a few.</p><p>The <em>TEAL ALGO Oracle</em> has a transaction fee of .001 ALGOs/block to record the ALGO/USD price from Coinbase in each Algorand block.</p><h3><strong>Borderless Capital Contribution</strong></h3><p><a href="https://borderlesscapital.io/">Borderless Capital</a> has sponsored this research since its inception, and has further committed to bootstrap the initiative by funding the <em>TEAL ALGO Oracle</em> contract with enough ALGOs for it to run for one year. Now, any developer or dApp can use the <em>TEAL ALGO Oracle</em> at no cost. After that period, developers and apps can fuel the Oracle by sending it 0.001 ALGOs for each block they would like the Oracle to operate for, and the Oracle will produce a new on-chain price which can be referenced by any <em>TEAL</em> contracts (both stateless or stateful).</p><p>“<em>We see the opportunity to sponsor the TEAL ALGO Oracle as a continued demonstration of our commitment to push the limits of Blockchain technology. This initiative may be one of the most significant additions to Algorand’s infrastructure to date. It not only provides one of the core building blocks for Algorand’s Finance 3.0 and DeFi ecosystem, it also inspires other developers to utilize this technology to develop their own innovations</em>” ~ David Garcia, founding managing partner of Borderless Capital.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30cceba1f125" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/teal-algo-oracle-in-algorand-layer-1-30cceba1f125">TEAL ALGO Oracle in Algorand Layer-1</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algorand Exchange Price Oracle]]></title>
            <link>https://medium.com/randlabs/algorand-exchange-price-oracle-2a3591c9d2dd?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a3591c9d2dd</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[blockchain-oracle]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[algorand]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Thu, 16 Jul 2020 13:52:00 GMT</pubDate>
            <atom:updated>2020-07-24T12:57:30.489Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G6j249x_Zoq1uaKunL_DwQ.jpeg" /><figcaption>Algorand Smart Contract Oracle</figcaption></figure><p>At <a href="https://randlabs.io/">Rand Labs</a>, we have been researching ways to insert pricing information on-chain from an <em>Oracle</em> to use it within <em>TEAL</em> code and to use it to create group transactions on <a href="https://myalgo.com/">My Algo Algorand Wallet</a>. In this article, we show the implementation of a simple exchange using an on-chain <em>Oracle</em> as the price source.</p><p>The code used for this article is freely available in the following repository: <a href="https://github.com/randlabs/algorand-exchange-price-oracle-article">algorand-exchange-price-oracle</a>. It uses the <a href="https://algoexplorer.io/api-dev">AlgoExplorer Algorand API</a> so it does not require any key or local node to run it, so just clone, install, and run <a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/asset-exchange.js"><em>asset-exchange.js</em></a> with <em>NodeJS</em>.</p><h3>Oracle</h3><p>The <em>Oracle,</em> a real-world trusted entity, must create a pre-signed transaction with the data included in that transaction, in this case, the price information, and make it available to everyone. Those that need to use the price oracle in their system can simply take the pre-signed <em>Oracle </em>transaction through the Oracle’s website or API and broadcast it from another account that needs to use the price information in a smart contract.</p><p>For the implementation, a <em>price submitter</em> is needed where the price is attached to the <em>Note</em> field of the transaction signed by the <em>Oracle</em>. Any <em>TEAL</em> code using this Oracle data must pay a fee that is used to run the on-chain <em>submitter</em>. Curiously, if there were enough DeFi Dapps using this service it can be self-sustaining. In addition to this, an on-chain decentralized exchange could use more than one Oracle price source and the <em>price submitter</em> can provide up to 3 price sources signed by different entities in the same transaction.</p><h3>Price Submitter</h3><p>For the <em>Price Submitter, </em>a <em>LogicSig TEAL</em> code is used to allow anyone to create a transaction <em>from</em> the Oracle account if the requirements of the signed <em>TEAL</em> object are satisfied. This only happens if the transaction containing <em>Oracle</em> data (1) pays the fee, (2) fills the <em>Note</em> field with the correct price, and (3) use the data before its expiration.</p><p>By looking closely at the <em>TEAL </em>code, one can see that the <em>Note</em> and <em>LastValid</em> fields are verified by using invalid values (more on this in the <em>Javascript</em> <em>code </em>section below).</p><h3>TEAL code</h3><p><a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/oracle-delegated.teal.tmpl">oracle-delegated.teal.tmpl</a></p><p><a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/oracle-delegated.teal">oracle-delegated.teal</a></p><pre>// Signs statements to be used as inputs to the TEAL script.</pre><pre>// This is an ephemeral escrow.</pre><pre>// TMPL_ORACLE_FEE_COLLECTOR: public key of the oracle fee collector that receives the fees</pre><pre>// TMPL_ORACLE_FEE:    fee to pay to the oracle</pre><pre>txn TypeEnum</pre><pre>int 1</pre><pre>==</pre><pre>txn Fee</pre><pre>global MinTxnFee</pre><pre>==</pre><pre>&amp;&amp;</pre><pre>// Oracle fee</pre><pre>txn Amount</pre><pre>int TMPL_ORACLE_FEE</pre><pre>&gt;=</pre><pre>&amp;&amp;</pre><pre>txn Receiver</pre><pre>addr TMPL_ORACLE_FEE_COLLECTOR</pre><pre>==</pre><pre>&amp;&amp;</pre><pre>txn CloseRemainderTo</pre><pre>global ZeroAddress</pre><pre>==</pre><pre>&amp;&amp;</pre><pre>txn Note</pre><pre>btoi</pre><pre>// this number is replaced by the inject function</pre><pre>int 5</pre><pre>==</pre><pre>&amp;&amp;</pre><pre>txn LastValid</pre><pre>// this number is replaced by the inject function</pre><pre>int 6</pre><pre>&lt;=</pre><pre>&amp;&amp;</pre><h3>JavaScript code</h3><p>The following code submits the price of the <a href="https://testnet.algoexplorer.io/asset/10295717"><em>ASA</em> <em>LECOP</em></a> every round with the signed <em>TEAL</em> code including setting the price and the expiration round. The <em>TEAL </em>code is signed and submitted in the <em>Message Pack</em> object attached as the <em>Note</em> field of the transaction. As an example, check the following transaction <a href="https://testnet.algoexplorer.io/tx/SJKWRO5DATGUTQ3MXJHQRSB3TFXFMHVNT5FV7JTVC3GIY57TPAJQ">SJKWRO5DATGUTQ3MXJHQRSB3TFXFMHVNT5FV7JTVC3GIY57TPAJQ</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PT3Kr6myhP1JoD1v" /><figcaption>Oracle Signed Transaction in AlgoExplorer</figcaption></figure><p>Instead of just submitting the price directly to the <em>Note</em> field, it is done in this way in order to provide it as a <em>LogicSig</em> object that can work combined in a transaction group. This object is the authorization of the <em>Oracle</em> to use the price following the rules described above.</p><p>This <em>Javascript</em> code has a trick used to replace the invalid values in the <em>TEAL</em> code with the real values. It is preferable to use <em>TEAL arguments but</em>, unfortunately, there is no way to sign them. For this reason, an injection technique is used based on this <a href="https://github.com/algorand/js-algorand-sdk/tree/develop/src/logicTemplates">code</a>. The idea is simple but requires a slightly low-level implementation. First, the offset of the values that need to be replaced from the <em>TEAL</em> <em>bytecode </em>needs to be known in order to replace them. Compiling the <em>TEAL</em> code will generate a <em>Base64 </em>program that, after converting it to <em>hexadecimal,</em> generates the <em>bytecode</em> shown below. It can be seen that the 5 and 6 (the invalid values used in the <em>TEAL</em>) at the beginning of the bytecode, the place were the constants are located, are found on offset 7 and 8 (the first byte is offset 0):</p><p>0120040190a10f<strong>0506</strong>2601202bedccce77cc38a20277b645a5ba19e50e234523ff81eb6b7964286038cfaaa3311022123101320012103108230f1031072812103109320312103105172412103104250e10</p><p>In the <em>Javascript</em> code the offsets, the types, and the new values need to be specified.</p><p><a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/asset-exchange.js">Function priceSubmitter</a></p><pre>let oracleProgramReferenceProgramBytesReplace = Buffer.from(&quot;ASAEAZChDwUGJgEgK+3MznfMOKICd7ZFpboZ5Q4jRSP/getreWQoYDjPqqMxECISMQEyABIQMQgjDxAxBygSEDEJMgMSEDEFFyQSEDEEJQ4Q&quot;, &#39;base64&#39;);</pre><pre>let referenceOffsets = [ /*Price*/ 7, /*LastValid*/ 8];<br>let injectionVector =  [price, params.lastRound + priceExpiration];<br>let injectionTypes = [templates.valTypes.INT, templates.valTypes.INT];</pre><pre>var buff = templates.inject (oracleProgramReferenceProgramBytesReplace, referenceOffsets, injectionVector, injectionTypes);</pre><pre>let oracleProgram = new Uint8Array (buff);   <br>let lsigOracle = algosdk.makeLogicSig (oracleProgram);<br>lsigOracle.sign (oracleAccount.sk);</pre><pre>let priceObj = {<br>  signature: lsigOracle.get_obj_for_encoding(),<br>  price: price,<br>  decimals: 4<br>}</pre><pre>let oraclePriceSubmitterTx = algosdk.makePaymentTxnWithSuggestedParams (submitterAccount.addr,<br> submitterAccount.addr, 0, undefined,<br> algosdk.encodeObj(priceObj), suggestedParams);</pre><pre>let oraclePriceSubmitterTxSigned = oraclePriceSubmitterTx.signTxn (submitterAccount.sk);</pre><pre>let oraclePriceTx = await algodClient.sendRawTransaction (oraclePriceSubmitterTxSigned);</pre><h3>Exchange Atomic Swap</h3><p>Finally, the most fascinating part is the way the <em>Oracle</em> price is combined in the group transaction.</p><p>The fee is paid on the first transaction of the group to allow the <em>Oracle </em>account to send the fee to the submitter (<em>TMPL_ORACLE_FEE_COLLECTOR)</em>. If the <em>Oracle </em>does not have enough balance, the transaction group is not inserted in the blockchain. For this reason, the <em>Oracle</em> account must always have a minimum balance and the user of the Oracle must make sure to send enough funds to the <em>Oracle </em>account to cover the fees and the transaction costs.</p><p>In order to atomically swap the <a href="https://testnet.algoexplorer.io/asset/10295717"><em>LECOP</em></a> coins with the Algos using the <em>Oracle </em>price, there is another <em>TEAL</em> program used in <em>Transaction 2</em>. This program verifies that the amount of Algos in one of the transactions is equivalent, based on the submitted price, to the amount of <a href="https://testnet.algoexplorer.io/asset/10295717"><em>LECOP</em></a> received in the other. The swap consists of 4 transactions:</p><p><strong>Transaction 0:</strong> from the user to <em>TMPL_ORACLE</em> to pay <em>Oracle</em> fee.</p><p><strong>Transaction 1:</strong> from <em>TMPL_ORACLE</em> to <em>TMPL_ORACLE_FEE_COLLECTOR</em> sending the fee. If the <em>Oracle </em>does not have enough funds, the transaction is not completed, that is why <em>Transaction 0</em> must be done prior to <em>Transaction 1</em>. The <em>Note</em> field contains the price while the <em>TEAL</em> code in <a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/oracle-delegated.teal">oracle-delegated.teal</a> verifies that it is correct and has not expired.</p><p><strong>Transaction 2:</strong> from <em>TMPL_EXCHANGE</em> to the user where the amount of assets <em>TMPL_ASA_ID</em> corresponds to the value of the Algos sent in Transaction 3 based on the price submitted by the <em>Oracle</em>. This transaction uses <a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/asset-exchange.teal">asset-exchange.teal</a> signed exchange account. Using the delegated <em>TEAL</em> anyone can submit transactions from the exchange account if the signed <em>TEAL</em> code is validated by the transaction group.</p><p><strong>Transaction 3:</strong> from user to <em>TMPL_EXCHANGE</em> sending the <em>Algos</em> to pay for the assets <em>TMPL_ASA_ID</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5MlDvWe_1beQ3SdDcuE6Bg.png" /><figcaption>Exchange Group Transaction</figcaption></figure><p>An example can be seen in transaction Group ID <a href="https://testnet.algoexplorer.io/transactions/group/%2BznTV4zfTKwF1z915MkPxQ8AmzxDNVpo1wDJb8LEsrc%3D">+znTV4zfTKwF1z915MkPxQ8AmzxDNVpo1wDJb8LEsrc=</a>.</p><h3>TEAL Code</h3><p><a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/asset-exchange.teal.tmpl">asset-exchange.teal.tmpl</a></p><p><a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/asset-exchange.teal">asset-exchange.teal</a></p><pre>// Asset Exchange Teal<br>// Allows exchanging algos for assets based on a price submitted in another transaction part of the group<br>// TMPL_EXCHANGE:  public key of the Exchange<br>// TMPL_ORACLE:   public key of the Oracle<br>// TMPL_ASA_ID:   asset id to exchange<br>// TMPL_PRICE_DECIMALS: number to divide the price to get the real price which is 10^DECIMALS (e.g.: for 4 decimals use 10000)</pre><pre>global GroupSize<br>int 4<br>==</pre><pre>txn GroupIndex<br>int 2<br>==<br>&amp;&amp;</pre><pre>txn TypeEnum<br>int 4<br>==<br>&amp;&amp;</pre><pre>gtxn 3 TypeEnum<br>int 1<br>==<br>&amp;&amp;</pre><pre>txn Fee<br>global MinTxnFee<br>==<br>&amp;&amp;</pre><pre>gtxn 3 Receiver<br>addr TMPL_EXCHANGE<br>==<br>&amp;&amp;</pre><pre>txn CloseRemainderTo<br>global ZeroAddress<br>==<br>&amp;&amp;</pre><pre>// verify that the price was submitted by the Oracle<br>gtxn 1 Sender <br>addr TMPL_ORACLE<br>==<br>&amp;&amp;</pre><pre>// Note: price<br>gtxn 1 Note<br>len<br>int 8<br>==<br>&amp;&amp;</pre><pre>txn XferAsset<br>int TMPL_ASA_ID<br>==<br>&amp;&amp;</pre><pre>gtxn 3 Amount <br>int TMPL_PRICE_DECIMALS<br>*<br>gtxn 1 Note<br>btoi<br>/<br>txn AssetAmount <br>&gt;=<br>&amp;&amp;</pre><h3>Javascript code</h3><p><a href="https://github.com/randlabs/algorand-exchange-price-oracle-article/blob/master/asset-exchange.js">Function submitOracleTransactions</a></p><pre>let lsigExchange = algosdk.makeLogicSig(exchangeProgram);<br>lsigExchange.sign(exchangeAccount.sk);</pre><pre>let oracleRetrieveTx;</pre><pre>// get the last price submitted<br>algodClient.transactionByAddress(submitterAccount.addr, undefined, undefined, 1);<br>oracleRetrieveTx = apiRes.transactions[0];</pre><pre>let priceMessagePackDecoded =<br>  algosdk.decodeObj(oracleRetrieveTx.note);</pre><pre>let decodedLsig = priceMessagePackDecoded.signature;<br>lsigOracle = algosdk.makeLogicSig(decodedLsig.l, decodedLsig.arg);<br>lsigOracle.sig = decodedLsig.sig;<br>lsigOracle.msig = decodedLsig.msig;</pre><pre>// Transaction 0<br>// pay Oracle fee <br>let oracleFeeTx = algosdk.makePaymentTxnWithSuggestedParams(consumerAccount.addr,<br> oracleAccount.addr, oracleFee + 1000, undefined,<br> new Uint8Array(0), suggestedParams);</pre><pre>let note = getInt64Bytes(priceMessagePackDecoded.price);</pre><pre>// Transaction 1<br>// insert price from the oracle account and send the fee to the submitter<br>let oracleTx = algosdk.makePaymentTxnWithSuggestedParams(oracleAccount.addr, <br> submitterAccount.addr, oracleFee, undefined, <br> note, suggestedParams);</pre><pre>// Transaction 2<br>// send assets from Exchange to User <br>let exchangeTx = algosdk.makeAssetTransferTxnWithSuggestedParams(exchangeAccount.addr, consumerAccount.addr, undefined, undefined, assetAmount, new Uint8Array(Buffer.from(&quot;Price: &quot; + priceMessagePackDecoded.price, &quot;utf8&quot;)), assetId, suggestedParams);</pre><pre>// Transaction 3 <br>// send algos needed to buy assetAmount assets based on price<br>let algosTx = algosdk.makePaymentTxnWithSuggestedParams(consumerAccount.addr, <br> exchangeAccount.addr, Math.ceil(assetAmount*priceMessagePackDecoded.price/priceDecimals), undefined, <br> new Uint8Array(Buffer.from(&quot;Price: &quot; + priceMessagePackDecoded.price, &quot;utf8&quot;)), suggestedParams);</pre><pre>// Store all transactions<br>let txns = [oracleFeeTx, oracleTx, exchangeTx, algosTx];</pre><pre>// Group all transactions<br>let txgroup = algosdk.assignGroupID(txns);</pre><pre>// Sign each transaction in the group with correct key or LogicSig<br>let signed = []<br>let oracleFeeTxSigned = oracleFeeTx.signTxn(consumerAccount.sk);<br>let oracleTxSigned = algosdk.signLogicSigTransactionObject(oracleTx, lsigOracle);<br>let exchangeTxSigned = algosdk.signLogicSigTransactionObject(exchangeTx, lsigExchange);<br>let algosTxSigned = algosTx.signTxn(consumerAccount.sk);</pre><pre>signed.push(oracleFeeTxSigned);<br>signed.push(oracleTxSigned.blob);<br>signed.push(exchangeTxSigned.blob);<br>signed.push(algosTxSigned);</pre><pre>let tx = (await algodClient.sendRawTransactions(signed));</pre><h3>Conclusion</h3><p><em>Algorand Smart Contract Layer1 (ASC1)</em> is very powerful and it is useful to achieve very complex tasks. This approach based on micro-services ensures a very simple and easy to understand code while preserving an incredible overall performance of the network.</p><p>The way <em>ASC1</em> works is novel and different from other blockchains because the developer needs to divide complex operations in different transactions instead of thinking in a sequential code like in <em>Solidity</em>. It takes some time to get used to this logic but the result is simpler code, easier to audit, and with a drastically reduced attack surface.</p><p>Algorand is still in its infancy stage, patience and hard work will be needed to build the initial building blocks and the development tools to help engineers produce and troubleshoot code. At <a href="https://randlabs.io/">Rand Labs</a>, we know that it is imperative to support these efforts and to generate enough of these resources to show the power of Algorand’s technology to the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a3591c9d2dd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/algorand-exchange-price-oracle-2a3591c9d2dd">Algorand Exchange Price Oracle</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlgoExplorer 2.0: the new Algorand Block Explorer is here!]]></title>
            <link>https://medium.com/randlabs/algoexplorer-2-0-the-new-algorand-block-explorer-is-here-5ef2c01c8aca?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ef2c01c8aca</guid>
            <category><![CDATA[algorand]]></category>
            <category><![CDATA[algoexplorer]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[explorer]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Wed, 10 Jun 2020 13:54:02 GMT</pubDate>
            <atom:updated>2020-06-15T19:53:58.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RktC0KKn4BGUkQr6.png" /><figcaption>AlgoExplorer: The New Algorand Explorer</figcaption></figure><p>At <a href="https://randlabs.io/">Rand Labs</a>, we have been exclusively committed to accelerating the adoption of Silvio Micali’s invention and bringing Algorand technology to the hands of everyone. We launched the first version of the AlgoExplorer the very first day the Testnet network was released to the public back in April of 2019, months before Mainnet had even started. From the very beginning, we wanted to bring to Algorand the most advanced and superb blockchain explorer of the industry and thus we are proud to announce the newest version of the <a href="https://algoexplorer.io/">Algorand Explorer, AlgoExplorer 2.0</a>.</p><h3>A New Design!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/0*Uu6BXdFPoCZHjcON.png" /><figcaption>AlgoExplorer Home</figcaption></figure><p>This new <a href="https://algoexplorer.io/">Algorand explorer</a> brings a completely revamped design and brand. The new design delivers a clean and modern look to AlgoExplorer. Every single page on the new Algorand Explorer has been analyzed at length to deliver the most relevant information every user needs to see. From the Home page to the different types of transactions, accounts, and every detail has been taken into account to deliver the best user experience to the Algorand community.</p><h3>AlgoExplorer Developer API Release!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tttu_iSx8JYlZvXf.png" /><figcaption>AlgoExplorer: Algorand Developer API</figcaption></figure><p>With this new version of the AlgoExplorer also comes the release of the <a href="https://algoexplorer.io/api-dev">Developer API</a> that is open and free to use by everyone in the Algorand community. The <a href="https://algoexplorer.io/api-dev">AlgoExplorer Developer API</a> is compatible with the Algorand Node API so users can seamlessly migrate their apps and projects to the AlgoExplorer API to make sure they have the same reliability as the AlgoExplorer itself and give them direct access to all the features the Algorand Node provides and much more. Developers and entrepreneurs now have a simple way to build on the Algorand blockchain without the hassles of setting up their own infrastructure. You do not need to set up an account or set a special header on the requests. <strong>It is open and free!</strong></p><p>Example of additional features you can get on AlgoExplorer API:</p><ul><li>Get extended transaction details returns more information than the Node API. For example, transaction <a href="https://api.testnet.algoexplorer.io/v1/transaction/2SKTS2SAQ2QTDV3PR45WV4NO6TQHT7S2BR73W6T3OJJHT7LVXKPQ">2SKTS2SAQ2QTDV3PR45WV4NO6TQHT7S2BR73W6T3OJJHT7LVXKPQ</a> contains TEAL bytecode, disassembled code, and arguments.</li><li>AlgoExplorer API has more alternatives to get an account transaction list such as getting them in inverse order. In addition to this, it has another index that can be used to page transactions, with it you can get account transactions by the order they were created (e.g.: you can get first 20 transactions or transaction number 20 to 60).</li></ul><h3>Dark Mode is here!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/0*xCoVXs6UIZwxpRH4.png" /></figure><p>The AlgoExplorer 2.0 was created thinking in all types of users, from beginners to developers. We are supporting any type of device including desktops, mobile, and tablets. This new Algorand Explorer now comes in Dark Mode too for those who like to use the AlgoExplorer at night or in the dark. To switch to the Dark Mode version, just click the moon icon next to the AlgoExplorer logo in the bottom left corner and you will see this new experience.</p><h3>Algorand Rewards Calculator!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*zTVQyTtZn7K5pXIT.png" /></figure><p>AlgoExplorer 2.0 comes with new tools, such as the <a href="https://algoexplorer.io/rewards-calculator">Algorand Participation Rewards Calculator</a>. This Rewards Calculator is a tool that allows users to know how many staking/participating rewards they will receive by staking and holding their Algos in a wallet. It provides a way to see how many rewards an account will generate every week, month, and year based on the amount specified. The <a href="https://algoexplorer.io/rewards-calculator">Algorand Rewards Calculator</a> uses the most up to date information released by the Algorand Foundation related to the rate of rewards allocated at any given time. Now the Algorand community will have a simple tool to calculate approximately how many rewards they can expect from their Algo holdings.</p><h3>Stay Tuned!</h3><p>We worked hard to bring such an advanced Algorand Explorer and we hope you enjoy it with all its new features. We will continue working tirelessly to make sure we keep advancing on our goal to bring Algorand adoption to billions of users by delivering the highest quality products. But we do not want to ruin all the surprises, so please go ahead and try the new <a href="https://algoexplorer.io/">AlgoExplorer</a> now!</p><p><a href="https://twitter.com/algo_explorer">AlgoExplorer Twitter</a></p><p><a href="https://randlabs.io/">Rand Labs</a></p><p>Feedback: hello at algoexplorer.io</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*wBqqjiaV3vj4OQNKgMYAYA.png" /><figcaption>AlgoExplorer Mobile</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ef2c01c8aca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/algoexplorer-2-0-the-new-algorand-block-explorer-is-here-5ef2c01c8aca">AlgoExplorer 2.0: the new Algorand Block Explorer is here!</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AlgoExplorer: Algorand Explorer for TEAL Won Future of Blockchain Award]]></title>
            <link>https://medium.com/randlabs/algoexplorer-algorand-explorer-for-teal-won-future-of-blockchain-award-c3c39638cceb?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3c39638cceb</guid>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[blockchain-explorer]]></category>
            <category><![CDATA[algorand]]></category>
            <category><![CDATA[explorer]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Wed, 29 Apr 2020 19:20:48 GMT</pubDate>
            <atom:updated>2020-06-18T22:12:02.160Z</atom:updated>
            <content:encoded><![CDATA[<p>We are proud to announce that the <a href="https://algoexplorer.com/">AlgoExplorer</a> has been selected as the winner in the <a href="https://medium.com/future-of-blockchain-competition/future-of-blockchain-2-summary-and-prizes-e87f3c6f392f">Future of Blockchain Competition</a> for an Algorand explorer challenge for TEAL, the ASC1 language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQtfljviN71d7V2DK1-fEg.png" /><figcaption>Algorand Explorer: TEAL Transaction</figcaption></figure><p>We worked tirelessly to build a fully functioning <a href="https://algoexplorer.io/">Algorand explorer</a> for TEAL programs. Now, the <a href="http://algorandexplorer.com/">AlgoExplorer</a> is able to show the TEAL program associated with a transaction, the arguments of the program, all referenced addresses in the program, and index these transactions to all involved accounts.</p><p>Furthermore, we decompile the TEAL’s code into a human-readable format. We also show the arguments and the compiled TEAL code’s byte code, in base64. The TEAL Algorand explorer works in Mainnet, Testnet, and Betanet.</p><p>You can watch our demo presentation of our Algorand TEAL explorer here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLY1a7XYA4JY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLY1a7XYA4JY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLY1a7XYA4JY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/af7833ae666698eaf9dbb57d0fcb3893/href">https://medium.com/media/af7833ae666698eaf9dbb57d0fcb3893/href</a></iframe><p>To see the TEAL Algorand explorer working, follow these examples:</p><p><strong>Transactions with a TEAL program</strong></p><p><a href="https://testnet.algoexplorer.io/tx/SXUNKOYDQZOOIWEYW7FQUTLH5IUU62NH4T4UF6KEYZZHHXGCRPXQ">Algorand Explorer TEAL Transaction Example #1</a></p><p><a href="https://testnet.algoexplorer.io/tx/FE5CT4VNSYJTDVIUAAVJYVO7OCVW2PQOEIJ5E54N4UYHY4PJE2GQ">Algorand Explorer TEAL Transaction Example #2</a></p><p><strong>Accounts with a TEAL transaction involved</strong></p><p><a href="https://testnet.algoexplorer.io/address/MKRTMBATIWUFMGAILZFQUWKVON2DCBUUC26FLY34KY3HLE4HCPYSCZA42M">Algorand Explorer TEAL Address Example #1</a></p><p><a href="https://testnet.algoexplorer.io/address/46QNIYQEMLKNOBTQC56UEBBHFNH37EWLHGT2KGL3ZGB4SW77W6V7GBKPDY">Algorand Explorer TEAL Address Example #2</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cz2ZYfR0f1Pcff_0rpuzjg.png" /><figcaption>Algorand Explorer: Account TEAL</figcaption></figure><p>Go ahead and start trying our new TEAL feature on the <a href="http://algorandexplorer.io/">AlgoExplorer</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3c39638cceb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/randlabs/algoexplorer-algorand-explorer-for-teal-won-future-of-blockchain-award-c3c39638cceb">AlgoExplorer: Algorand Explorer for TEAL Won Future of Blockchain Award</a> was originally published in <a href="https://medium.com/randlabs">Rand Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algorand Relay Node Conditional Accelerated Vesting]]></title>
            <link>https://pipaman.medium.com/algorand-relay-node-conditional-accelerated-vesting-f9d1b3f19f14?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9d1b3f19f14</guid>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Thu, 05 Mar 2020 19:56:24 GMT</pubDate>
            <atom:updated>2020-03-06T21:34:09.972Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>The <a href="https://algorandfoundation.cdn.prismic.io/algorandfoundation/eb2a8c69-2262-42f8-99a4-09df485207b5_EIP-11252019AF_+Conditional+Accelerated+Vesting+Nov+30.pdf">EIP-11252019AF</a> was approved at the end of 2019 by the majority of the Relay Node runners, early backers and supporters of the network. The EIP proposes to modify the initial distribution which was generating more inflation than the market could absorb.</p><p>Several individuals from the community and users of <a href="https://wallet.myalgo.com/">My Algo Algorand Wallet</a> and <a href="http://algoexplorer.io/">Algoexplorer</a> reached out for more clarification on the details of the new distribution. Tal Rabin from the <a href="https://algorand.foundation/">Algorand Foundation</a> took the time to explain to me the process in detail and I am reflecting it in this article.</p><p>This new distribution changes the original linear distribution to generate incentives to reduce the selling pressure and extends the distribution to a maximum of 5 years from the blockchain start.</p><h3>Guaranteed Base</h3><p>Node runners will receive a minimum of algos that does not depend on the market conditions. This table shows the guaranteed base established by the EIP based on an initial allocation of 1 million, for 2019 I show the 14% already distributed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*spb2dVSgULGLE4dXST84Xg.png" /><figcaption>Guaranteed Base for 1 million allocation</figcaption></figure><h3>How Does the Accelerated Vesting Work?</h3><p>Apart from the guaranteed annual vesting of algos that Relay Node Runners receive every year, additional vesting is given (taken out from future vesting) whenever the <em>30-day moving average</em> price of algo passes its previous all-time high from a base of $0.30:</p><pre><em>Bonus</em> = (<em>30DayMA </em>- <em>Max30DayMA</em>) * <em>ElapsedDays </em>* 0.0015 * <em>totalRewards</em></pre><pre><strong><em>30DayMA</em></strong>: moving average over the previous 30 days<br><strong><em>Max30DayMA</em></strong>: maximum value of <em>30DayMA </em>since 1-Jan-2020<br><strong><em>ElapsedDays</em></strong>: days elapsed from 1-Jan-2020<br><strong><em>Price Reference</em></strong>: open price from <a href="https://messari.io/asset/algorand/historical">Messari</a><br><strong><em>totalRewards: </em></strong>original allocation</pre><p>If the <em>30DayMA</em> is smaller than the <em>Max30DayMA</em> then the <em>Bonus</em> is 0.</p><p><em>Bonuses</em> are distributed only when the <em>30DayMA </em>reaches a new ‘all-time-high’ from 1-Jan-2020, which means that if a <em>bonus </em>is distributed based on <em>30DayMA</em> price of a <em>P1</em>, only after the <em>30DayMA</em> grows over <em>P1</em> a new <em>bonus</em> is triggered. If there is a price spike at the beginning, it generates a small amount of <em>bonus </em>because it would be computed by multiplying a small amount of <em>ElapsedDays</em> and will not generate any extra bonus until the price surpasses the previous <em>Max30DayMA</em>.</p><p>Here I show an example of a possible price evolution with the rewards and accelerated bonus using 1 million Algos for <em>totalRewards</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QnqyFPOYxLPvlTwM-L1haw.png" /><figcaption>Example distribution for Early Backers in Algorand</figcaption></figure><h3>Scenarios</h3><p>In this illustration, the same details of the scenarios stated in the <em>EIP-11252019AF</em> are used except for changing the theoretical initial price of $0.25 with $0.217, which was the real price on 1-Jan-2020. The price evolution in these hypothetical illustrations shown below is linear. All these graphs are based on 1 million of <em>totalRewards.</em></p><p>The vertical axis shows amounts distributed in algos on the left and the algo price on the right.</p><p><strong>Scenario 1: Price of the Algo at the end of Year 4 is $0.65 ($0.55 at the end of Year 3)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxiHAmVghVE_11g85XqOng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yk28p68lF53zNcEuinBODg.png" /></figure><p><strong>Scenario 2: Price of the Algo at the end of Year 4 is $1.00 ($0.80 at the end of Year 3)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RLJvM3CW1Fl3cyT8a1SCbg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cEHxdlLLkpPqRXv2y5ngrA.png" /></figure><p><strong>Scenario 3: Price of the Algo at the end of Year 3 is $1.20</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3sfhbclyq84vxuyb6-xXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtMwPvzGRdpSro4_bGM6fQ.png" /></figure><h3>What Happened So Far</h3><p>With the same allocation, I zoom in February 2020 to see what happened on an original allocation of 1 million. The Guaranteed Base is <strong>82.19 algos</strong> this year and the accelerated vesting bonus reached <strong>719.345 algos</strong> on Feb 25.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kR2ZlzteTmRgsadlW8y3Xg.png" /><figcaption>February 2020 Distribution for 1 million allocation</figcaption></figure><h3>Conclusion</h3><p><em>Relay Node Runners’ </em>distribution had been a complex problem during the first months of Algorand’s blockchain. Algorand Foundation came up with a novel formula that enables the injection of Algo supply to the network over time that allows for an organic and sustainable price appreciation of the Algo. This shows the benefits of having a flexible monetary supply backed by a policy directed towards creating a healthy and useful currency of the internet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9d1b3f19f14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algorand Smart Contract Layer1 (ASC1) and Oracles]]></title>
            <link>https://pipaman.medium.com/algorand-smart-contract-layer1-asc1-and-oracles-f739d18465dd?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f739d18465dd</guid>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[algorand]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Thu, 23 Jan 2020 18:08:38 GMT</pubDate>
            <atom:updated>2020-06-23T22:05:13.328Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*e1gQZngPFbYhzUC4PNyIAg@2x.png" /></figure><h3>Overview</h3><p>At the end of 2019, Algorand released in record time the <em>Algorand Smart Contract Layer1 (</em><strong><em>ASC1</em></strong><em>)</em>, a new paradigm shift for <em>smart contracts</em>. Rand Labs has been researching this technology to incorporate it in <a href="https://algoexplorer.io/">Algo Explorer</a> and add ways to interact with it using <a href="https://myalgo.com/">My Algo Algorand Wallet</a>.</p><p>The first part of this article goes through our understanding of <em>ASC1</em>. The second part addresses <em>oracle</em> data in <em>ASC1</em> showing a way to insert signed data from the outside world with a small example.</p><h3>General Logic</h3><p>The <em>ASC1</em> is a simple logical predicate that verifies or not. <em>ASC1s</em> can have <em>jumps</em> but cannot <em>cycle</em> nor make <em>function calls</em>. It can only access the transaction group data it belongs to and some global parameters. The <em>transaction</em> size is limited to 1k making it the size limit of the Algorand <em>smart contracts</em>. Algorand uses a stack-based notation where users put the parameters on the stack before executing the <em>opcode. </em>Users can make arithmetic operations, verify <em>transactions</em>, <em>group transaction </em>fields, make <em>hash </em>operations, verify <em>Ed25519 </em>signatures, and other related operations.</p><p>For a detailed list of what <em>Algorand’s Transaction Execution Approval Language (TEAL)</em> can do and its limitations refer to this <a href="https://developer.algorand.org/docs/teal"><em>TEAL </em>manual</a>.</p><h3>ASC Creation</h3><p>After a user writes an <em>ASC1</em> and compiles it, the address where the smart contract <em>lives</em> is created, but neither the code nor the address are stored in the blockchain until a transaction interacts with the <em>ASC1</em>. For the rest of the users, the contract is just an address indistinguishable from any other account address. Any change to the <em>ASC1</em> code will modify the compilation of it and thus result in a different generated address. The only way to obtain the same address generated by an <em>ASC1</em> is by compiling the same <em>TEAL </em>code.</p><p>We are witnessing a completely new concept compared to the rest of the public blockchains. While other networks store the <em>smart contract</em> in the blockchain before interacting with it, on Algorand users can create an <em>escrow</em> <em>ASC1 </em>and give it only to the beneficiary. In this case, the beneficiary will need to publish the <em>smart contract </em>to the blockchain with the correct parameters if he/she wants to cash in the funds in the escrow. Only after a successful transaction is broadcasted, the <em>smart contract </em>becomes public for the rest.</p><h3>ASC1 Transactions</h3><p>Considering that the <em>ASC1</em> is just an account with funds and some logic attached, users looking to get funds from it must generate a transaction specifying the origin address of the transaction, <em>from</em>, as the <em>ASC1</em> address (the address generated from the compiled <em>TEAL</em> code). The transaction fields and the group it belongs to among the <em>ASC1 </em>arguments must make the <em>ASC1</em> predicates evaluate <em>true</em> for the transaction to be valid and included in the blockchain.</p><p>The transaction body contains the <em>ASC1</em> code alongside the required arguments needed to verify the predicates.</p><h3>Lease String</h3><p>This transaction parameter is used to mutually exclude transactions. For instance, <em>ASC1</em> can leverage the <em>lease</em> parameter to enable recurring payments. In this case, the <em>ASC1</em> requires transactions to include a specific <em>lease</em> (like a lock code) to be valid. Once a transaction with the correct <em>lease</em> is approved by the <em>ASC1</em>, future transactions with the same <em>lease</em> code will not validate for the rest of the approved transaction validity period. This type of use case would enable an account to spend a certain amount of funds for a specific recurring period (i.e. every 600,000 blocks). Once spent using a transaction with the correct lease, no more transactions will be valid for the remainder of the period. You would have to wait for the next valid block period to start before sending a new valid transaction to spend the amount again. Refer to <a href="https://github.com/algorand/go-algorand/blob/master/tools/teal/templates/periodic-payment-escrow.teal.tmpl"><em>periodic-payment-escrow.teal.tmpl</em></a> that implements this logic.</p><h3>Oracles</h3><p>We have been looking into ways of inserting outside information into the blockchain using <em>ASC1</em>. There is an opcode called <em>ed25519verify</em> that can make the trick.</p><p>The opcode <em>ed25519verify</em> receives 3 parameters: data, signature and public key. As it is right now, this opcode requires the inclusion of the <em>TEAL</em> program in data that is signed.</p><p>Taking advantage of this opcode, an <em>oracle</em> can sign a result of the outside world (jointly with the <em>TEAL</em> code) while the <em>ASC1</em> can verify that the signature comes from the <em>oracle</em>.</p><p>We strongly recommend the Algorand team should add a new opcode to insert <em>oracle</em> data without signing the <em>TEAL </em>code to allow third-party <em>oracles</em> to provide information for different <em>ASC1s </em>at the same time.</p><h3>Example: Oracle Using ed25519verify</h3><p>The following illustrates how to write an <em>ASC1 </em>with <em>oracle</em> input. This example is limited to interpret valid <em>oracle</em> outcomes while not addressing the consequences of the <em>oracle</em> not generating the correct signature or users not claiming the funds. If any of these situations happen in this specific example, the funds would get stuck forever. It is possible to address these situations by adding a round limit to claim the funds. After that round, any participating account can create a transaction splitting the funds. Refer to <a href="https://github.com/algorand/go-algorand/blob/master/tools/teal/templates/split.teal.tmpl"><em>split.teal</em></a><em> </em>for an example using group transactions to split the funds.</p><h4>Code</h4><pre>// Parameters:<br>//  - TMPL_ADDRA: Address beting for Team A. <br>//  - TMPL_ADDRB: Address beting for Team B. <br>//  - TMPL_ADDR_ORACLE: Oracle Address. <br>//  - TMPL_FEE: maximum fee used by the limit order transaction.<br>txn TypeEnum<br>int 1 // Payment (either Algos-out in trade or Algos redeemed at timeout)<br>==</pre><pre>global GroupSize<br>int 1<br>==<br>&amp;&amp;</pre><pre>// if arg 0 == 0 then send to TMPL_ADDRA<br>arg 0<br>byte base64 MA==<br>==</pre><pre>txn CloseRemainderTo<br>addr TMPL_ADDRA<br>==<br>&amp;&amp;</pre><pre>txn Receiver<br>addr TMPL_ADDRA<br>==<br>&amp;&amp;</pre><pre>// if arg 0 == 1 then send to TMPL_ADDRB<br>arg 0<br>byte base64 MQ==<br>==</pre><pre>txn CloseRemainderTo<br>addr TMPL_ADDRB<br>==<br>&amp;&amp;</pre><pre>txn Receiver<br>addr TMPL_ADDRB<br>==<br>&amp;&amp;<br>||<br>// global verifications<br>&amp;&amp;</pre><pre>txn Fee<br>int TMPL_FEE<br>&lt;=<br>&amp;&amp;</pre><pre>// verify oracle signature<br>arg 0<br>arg 1<br>addr TMPL_ADDR_ORACLE<br>ed25519verify<br>&amp;&amp;</pre><h4>Logic</h4><p>In summary, the <em>ASC1 </em>can be expressed in this way:</p><pre>tx type == Pay &amp;&amp; GroupSize == 1 &amp;&amp;<br>((data == 0 &amp;&amp; to == TMPL_ADDRA &amp;&amp; close == TMPL_ADDRA) ||<br>(data == 1 &amp;&amp; to == TMPL_ADDRB &amp;&amp; close == TMPL_ADDRB)) &amp;&amp;<br>ed25519verify(data, signature, oracle TMPL_ADDR_ORACLE) &amp;&amp;<br>ok fee</pre><p>The first and the last lines are general verifications. The interesting part of the <em>ASC1</em> is that the algos go to <em>TMPL_ADDRA</em> if data is 0 or to <em>TMPL_ADDRB</em> if it is 1 and the data signature is verified with <em>ed25519verify </em>opcode.</p><h4>Oracle Keys</h4><p>A key file testkey.key is generated with algokey tool for the <em>oracle</em>:</p><pre>$ ./algokey generate -f testkey.key | grep “Public key”</pre><pre>Public key: <a href="https://testnet.algoexplorer.io/address/SVDICE2QVOMQPYCYRJGRBOZPLYGF5DQOK3FFHL26FUOBQLWBKDH3EAQS3U">SVDICE2QVOMQPYCYRJGRBOZPLYGF5DQOK3FFHL26FUOBQLWBKDH3EAQS3U</a></pre><h4>Compilation</h4><p>The following parameters are used for the template:</p><pre>TMPL_ADDRA:<br><a href="https://testnet.algoexplorer.io/address/BKJX2U52PKL27XS42VO4SJW5BBFBYDCN7NYAW6BUEKF7EBYX5XV5CKAPT4">BKJX2U52PKL27XS42VO4SJW5BBFBYDCN7NYAW6BUEKF7EBYX5XV5CKAPT4</a><br>TMPL_ADDRB:<br><a href="https://testnet.algoexplorer.io/address/36WZVNA6YA77V2MGGLJBT2YQG3RQVX6UWJ3P6E7FWNAV4IGMK3ZVVNBLVQ">36WZVNA6YA77V2MGGLJBT2YQG3RQVX6UWJ3P6E7FWNAV4IGMK3ZVVNBLVQ</a><br>TMPL_ADDR_ORACLE:<br><a href="https://testnet.algoexplorer.io/address/SVDICE2QVOMQPYCYRJGRBOZPLYGF5DQOK3FFHL26FUOBQLWBKDH3EAQS3U">SVDICE2QVOMQPYCYRJGRBOZPLYGF5DQOK3FFHL26FUOBQLWBKDH3EAQS3U</a><br>TMPL_FEE:<br>10000</pre><p>You can download the specialized version <a href="https://github.com/randlabs/algorand-teal-templates/blob/master/oracle.teal">oracle.teal</a> or the template <a href="https://github.com/randlabs/algorand-teal-templates/blob/master/oracle.teal.tmpl">oracle.teal.tmpl</a></p><p>Compiling the <em>ASC1</em> gets the address:</p><pre>$ ./goal clerk compile oracle.teal<br>oracle.teal:<br><a href="https://testnet.algoexplorer.io/address/JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4">JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4</a></pre><p>You can check that there is nothing special about the address on <a href="https://testnet.algoexplorer.io/address/JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4">Algo Explorer</a>. It is just like any other account address.</p><h4>Signing to Verify with ed25519verify</h4><p>The <em>dsign </em>tool inside the <a href="https://github.com/algorand/go-algorand">go-algorand node source code</a> is used to sign the message. We were not able to sign the message directly with the tool as it is, but the code was very useful to find a way to do it. We suggested a change in the code on this <a href="https://github.com/algorand/go-algorand/pull/729">pull request</a>. You can use the modified code there to sign messages. If you need some help just ping us at <a href="http://hello@algoexplorer.io/">hello@algoexplorer.io</a>. Here, we use our modified version of <em>dsign</em> tool.</p><p>Update March-2020:</p><p>Now it is possible to use <em>goal </em>tool to get the same results.</p><h4>Case 1: ADDRA Wins</h4><p>First, the <a href="https://testnet.algoexplorer.io/tx/PCUS2436VSXGIUWD3W6MKFIB5UZOGRB72S7RSZQK7NLR5VJJCAAA">ASC1 address is funded</a>. Then, the signature of the data is created:</p><p>Data: msg file contains exactly 1 byte with a “0”</p><p>Code: <a href="https://github.com/randlabs/algorand-teal-templates/blob/master/oracle.teal"><em>oracle.teal</em></a></p><pre>$ ~/go/bin/dsign testkey.key ~/node/oracle.teal msg LjbN+UgzmYG6vWKQuOkJKk69DBrJFY7IM0yblgeiZl5OOtZPlAf/ujTVl4FTAA5oa0/1npNtNDHvhxmY4pb/BA==</pre><p>Update March-2020:</p><pre>$ ./goal clerk tealsign --keyfile oracle.key --contract-addr JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4 --data-b64 MA==</pre><p>Then, send a close transaction from the <em>ASC1</em> account to <em>ADDRA</em> to transfer all funds. The following signature and message “0” (base64 is <em>MA==</em>) is used:</p><pre>$ ./goal clerk send -a 0 --from-program oracle.teal -t BKJX2U52PKL27XS42VO4SJW5BBFBYDCN7NYAW6BUEKF7EBYX5XV5CKAPT4 -c BKJX2U52PKL27XS42VO4SJW5BBFBYDCN7NYAW6BUEKF7EBYX5XV5CKAPT4 --fee 1000 -d testnet --argb64 MA== --argb64 LjbN+UgzmYG6vWKQuOkJKk69DBrJFY7IM0yblgeiZl5OOtZPlAf/ujTVl4FTAA5oa0/1npNtNDHvhxmY4pb/BA==</pre><pre>Sent 0 MicroAlgos from account JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4 to address BKJX2U52PKL27XS42VO4SJW5BBFBYDCN7NYAW6BUEKF7EBYX5XV5CKAPT4, <br>transaction ID: XWZLK6YBQ4H6BZUSONDOE5A66B4MASVBGVTL6B4HNWMBYQ7GHTBA. Fee set to 1000<br>Transaction XWZLK6YBQ4H6BZUSONDOE5A66B4MASVBGVTL6B4HNWMBYQ7GHTBA committed in round 4451591</pre><h4>Case 2: ADDRB Wins</h4><p>The ASC1 is <a href="https://testnet.algoexplorer.io/tx/O77366QLH7B6GUEBCQZQ7NIV63OXB3UHKFWHN6SZH7GRHZAT3IQA">funded again</a> and a signature of the data is created with ADDRB winning:</p><p>Data: msg file contains exactly 1 byte with a “1”</p><p>Code: <a href="https://github.com/randlabs/algorand-teal-templates/blob/master/oracle.teal"><em>oracle.teal</em></a></p><pre>$ ~/go/bin/dsign testkey.key ~/node/oracle.teal msg <br>DJ0FtmIaLCksr5WhPczcHIwn9ye4CGHFPn64z38ChorZ6r0Dvj6z1n2bV9gIMUe+UrN5lzNDYK7u3Cxh1SiQBg==</pre><p>Update March-2020:</p><pre>$ ./goal clerk tealsign --keyfile oracle.key --contract-addr JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4 --data-b64 MQ==</pre><p>Then, send a close transaction from the <em>ASC1</em> account to <em>ADDRB</em> to transfer all funds. The following signature and message “1” (base64 is <em>MQ==</em>) is used:</p><pre>$ ./goal clerk send -a 0 --from-program oracle.teal -t 36WZVNA6YA77V2MGGLJBT2YQG3RQVX6UWJ3P6E7FWNAV4IGMK3ZVVNBLVQ -c 36WZVNA6YA77V2MGGLJBT2YQG3RQVX6UWJ3P6E7FWNAV4IGMK3ZVVNBLVQ --fee 1000 -d testnet --argb64 MQ== --argb64 DJ0FtmIaLCksr5WhPczcHIwn9ye4CGHFPn64z38ChorZ6r0Dvj6z1n2bV9gIMUe+UrN5lzNDYK7u3Cxh1SiQBg==</pre><pre>Sent 0 MicroAlgos from account JDYOTGQ6D2CLH4EBOJLUNV5TYJS3DZSJHNQV6ESEEHFF76I6OUI53JR7H4 to address 36WZVNA6YA77V2MGGLJBT2YQG3RQVX6UWJ3P6E7FWNAV4IGMK3ZVVNBLVQ, transaction ID: 2SKTS2SAQ2QTDV3PR45WV4NO6TQHT7S2BR73W6T3OJJHT7LVXKPQ. Fee set to 1000<br>Transaction 2SKTS2SAQ2QTDV3PR45WV4NO6TQHT7S2BR73W6T3OJJHT7LVXKPQ still pending as of round 4451877<br>Transaction 2SKTS2SAQ2QTDV3PR45WV4NO6TQHT7S2BR73W6T3OJJHT7LVXKPQ committed in round 4451879</pre><h3>Leading with Technological Innovation</h3><p>Here we see the first stages of Algorand’s vision of smart contracts. The new paradigm in smart contracts is extremely revolutionary. The ability to conceal everything about any <em>ASC1 </em>until it is used brings great possibilities. For instance, escrows will now be deployed with complete privacy and thus security as no one will know anything about it till the escrow is executed. Furthermore, this new design makes the use of smart contracts easier compared to the complexity of <em>Turing complete smart contracts</em> of other blockchains. With <em>ASC1s </em>uses cases such as recurring transactions, allowance, collateralized credit, escrows, bets, and much more, are all much simpler to create and magnitudes of times more secure.</p><p>We are excited to see what type of uses cases the Algorand community starts building leveraging this new revolutionary technology. As always, Algorand keeps leading the technological innovation in the DeFi space and setting the standard of this movement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f739d18465dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algoexplorer Supports Algorand ASA]]></title>
            <link>https://pipaman.medium.com/algoexplorer-supports-algorand-asa-cca3272f13f7?source=rss-5577a3b030e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cca3272f13f7</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[algorand-foundation]]></category>
            <category><![CDATA[algorand]]></category>
            <dc:creator><![CDATA[Pablo Yabo]]></dc:creator>
            <pubDate>Mon, 16 Dec 2019 22:38:19 GMT</pubDate>
            <atom:updated>2019-12-16T22:38:19.278Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>Now that Algorand 2.0 has been launched, we are glad to announce Algoexplorer’s support of the new revolutionary Algorand Standard Asset (ASA). From now on, the Algoexplorer UI and API will support ASA transactions and the related functionalities.</p><h3>What’s different on Algorand ASA?</h3><p>Compared to the rest of asset issuance technologies in the space, Algorand 2.0 has a novel approach to support asset representation. Unlike Ethereum where developers need to deploy a new Smart Contract for each token, Algorand added token support at the protocol level or layer 1. From this approach, developers create a token with a single set up transaction and the security is handled by Algorand blockchain. As a result, assets issued on the Algorand Blockchain benefit from the same level of security and ease of use as the Algo, Algorands native currency.</p><p>Instead of having to interact with the smart contract for every token transfer, like in Turing complete blockchains, ASA drastically simplifies token transactions by just requiring the destination address in the same way that an Algo transaction is made.</p><h3>Overview of the new UI</h3><p>The Algoexplorer now displays a new column showing the transaction type.</p><p>Supported Transaction types:</p><ul><li>Transfer ⇒ Ordinary Algo transfer</li><li>ASA Transfer ⇒ Transfers an asset</li><li>ASA Config ⇒ Creates or destroys an asset or changes its configurations</li><li>ASA Freeze ⇒ Allows or inhibits asset transactions to/from the specified account</li><li>Keyreg ⇒ Changes an account’s participation status</li><li>Genesis Alloc ⇒ Pseudo transaction type for account balance allocated on genesis block</li></ul><p>More details on Algorand Standard Assets <a href="https://medium.com/algorand/algorand-standard-assets-efda8afcfc0a">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qird626ETllLsdwXkI7eew.png" /><figcaption>Algoexplorer ASA Support</figcaption></figure><h3>What’s next</h3><p>In the short-term, Algoexplorer will show all ASA balanced on the account page, now users have ASA’s balances on the transactions only. Additionally, <a href="http://www.myalgo.com/">My Algo Algorand Wallet</a> is implementing asset transfers soon.</p><p>Algoexplorer will release an Asset Directory where issuers can add information about their services and assets. This will serve the purpose of having Algoexplorer’s UI and enable issuers and dApps to brand their assets and enrich their transactions to improve the user experience within the Algoexplorer.</p><p>We are extremely excited about the asset activity that will arise in the borderless economy thanks to this novel technology.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cca3272f13f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>