<?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 Adam Z. Nagy on Medium]]></title>
        <description><![CDATA[Stories by Adam Z. Nagy on Medium]]></description>
        <link>https://medium.com/@aznagy?source=rss-7372dbd70efa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*3825zIegI6klHS5OnpWfaA.jpeg</url>
            <title>Stories by Adam Z. Nagy on Medium</title>
            <link>https://medium.com/@aznagy?source=rss-7372dbd70efa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 00:31:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aznagy/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[Ethereum Name Service (ENS) is now available for the Energy Web]]></title>
            <link>https://medium.com/energy-web-insights/ethereum-name-service-ens-is-now-available-for-the-energy-web-a8d884138790?source=rss-7372dbd70efa------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8d884138790</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[ew-article]]></category>
            <category><![CDATA[ew-news]]></category>
            <dc:creator><![CDATA[Adam Z. Nagy]]></dc:creator>
            <pubDate>Thu, 23 Apr 2020 15:21:53 GMT</pubDate>
            <atom:updated>2020-04-23T15:21:53.527Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vVhS7H0g-ZQdsCepBdI1zA.jpeg" /><figcaption>Allie Smith | <a href="https://unsplash.com/photos/I3nD16F56Ko">Unsplash</a></figcaption></figure><p>We believe that in order to achieve mainstream adoption of decentralized solutions, they should be as user-friendly and down-to-earth as possible. But if we’re honest, the blockchain sector still largely caters to a niche of tech savvy people who are comfortable juggling things like hexadecimal addresses and private keys. It’s a landscape where a seemingly simple typo in an address could cause all sorts of potential problems.</p><p>For starters, good luck explaining to your grandma-level end user (or conservative energy-industry corporate executive) that ‘0x17E639952c6F98039E75D11Be884792209F26170’ is now their account… And no, it’s not opened in a bank. It’s a... umm… hash thingy, whatever, and you have to save long, scary strings of characters somewhere safe otherwise ‘bad things’ will happen.</p><p>Oh, they want to send funds or interact with a dApp? And that process works with something called Metamask?</p><p>You get the idea.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*FO_R_ZmPhadBey7XbP980g.jpeg" /><figcaption>Ethereum account management problems | <a href="https://www.youtube.com/watch?v=-DT7bX-B1Mg">Source</a></figcaption></figure><p>UX is king, regardless of technology. If you want to build successful products you have to understand that. Nowhere does that become more apparent than the difference between alphanumeric addresses and people-friendly names. This is true for blockchain-based solutions, too.</p><p>It is really unconventional how we interact with a blockchain compared to what we are used to. This is why we are constantly on the lookout for projects that try to bridge this gap and welcome it with open arms: multisig wallets, mobile wallets, recoverable accounts, safes, gas relays, and now... the Ethereum Name Service (ENS).</p><h3>What is ENS for?</h3><p>ENS lets you name things. Things that can be stored in smart contracts — addresses, keys, hashes, texts, and links — so you can refer to them in the ‘friendly’ name of your choice instead of what they really are: inhumanly long character strings. 😃 In other words, ENS allows you to put ‘ugly’ stuff in nicer packaging, thus boosting user experience and on-boarding with blockchain-based solutions.</p><p>ENS is to decentralized <a href="https://web3.foundation/">web3</a> what the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">Domain Name System (DNS)</a> is to traditional web2. For example, to navigate to our website you can type the friendly <a href="https://www.energyweb.org/">energyweb.org</a> address into your web browser instead of its hard-to-remember, not-people-friendly IP address 104.26.12.227. Similarly, if an Ethereum-based blockchain supports ENS, you can type adam.ewc in your wallet to send me tokens instead of ‘0x74dd76E24B2CFB43C1b1a4498295d553D0843746’. Friendlier, isn’t it? This is just a simple example. Naming addresses is not the only use case.</p><h3>What does ENS look like?</h3><p>I would describe ENS as encompassing two things: 1) a system of smart contracts and 2) a protocol that describes how resources are managed, stored, and named. It is an <a href="https://github.com/ensdomains">awesome open-source project</a> that has been in development for a few years now and it is one of the most-popular projects on Ethereum.</p><p>We ported it to our two chains—our Volta testnet and our production Energy Web Chain. Moreover, we also forked the <a href="https://app.ens.domains/">original ENS manager app</a> to add support for them and make name management a breeze. On our chains you can buy names that end with <strong>.ewc,</strong> which is our chosen supported top level domain (TLD).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*Do0WRNDHjdicZb8xwPx2BQ.jpeg" /><figcaption>ENS in a nutshell</figcaption></figure><h3>How to use ENS?</h3><p>Using ENS is the same on all Ethereum-based networks. In essence you have to interact with the ENS registry contracts. The easiest approach is to use our aforementioned <a href="https://ens.energyweb.org/">Energy Web ENS manager app</a> with a very intuitive, nice UI. You need a <a href="https://metamask.io/">Metamask</a> account to do so, which you also use to select the chain to connect to.</p><ol><li><strong>Buy a name</strong>. You pay with the chain’s native tokens. Prices go from around $5 to $650 (except on the testnet, of course). Short three-letter names are more expensive. Under the hood, Chainlink oracles feed in token prices to the ENS system, which determine how many tokens you pay.</li><li><strong>Manage the name</strong>. You get plenty of hints and links on how to do it in the manager app. Once you take ownership of the name, you can map resources to it. The manager app allows you to put multiple coin addresses, text-based resources (metadata, URLs, email, Twitter handle, etc.), and content hashes like IPFS. Note that for each name there is a <strong>registrant</strong> and <strong>controller,</strong> which do not have to be the same. The registrant is the true owner (aka the admin superuser), but it can delegate the management responsibilities to another account. This is especially useful in corporate environments where the owner account can be kept somewhere secure and management of the name can be delegated to an expert dev team.</li><li><strong>Use the name. </strong>Once done, you can use your name in dApps. This is the tricky part because registering in the ENS system doesn’t mean that names automatically get resolved to addresses or resources everywhere. dApp developers have to support it and integrate with ENS. This part is their responsibility but there is no reason not to support it. ENS only helps.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Z9-jW8c_cU-5fy2yFMoRg.png" /><figcaption>The ENS manager app</figcaption></figure><h3><strong>Subdomains</strong></h3><p>If you buy a name, let’s say ‘domain.ewc’, you own all of its subdomains too and can configure each one of them as a separate name. Feel free to create as many as you’d like for free, e.g., ‘subdomain.domain.ewc’ or ‘donate.domain.ewc’. You can get creative.</p><p><em>Tip:</em> Let’s say you have a dApp project and acquire ‘myproject.ewc’ for it. When a user registers, you can automatically create ‘&lt;username&gt;.myproject.ewc’ for her, which can already be used as an account for your dApp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CN-gPp0r9w1BN8kc86U05A.png" /><figcaption>Subdomains page in the ENS manager</figcaption></figure><h3>How to support ENS in dApps?</h3><p>ENS is an enabler to create user-friendly dApps. The goal is simple: wherever there is a user input field for a data type that is supported by ENS (Ethereum address, email, etc.):</p><ol><li>Detect if the input is an ENS name or not, then…</li><li>If an ENS name was entered ,you perform an ENS lookup to resolve it to the appropriate resource.</li></ol><p>Technically, resolution of ENS names is a three-step process (described in the <a href="https://docs.ens.domains/dapp-developer-guide/ens-enabling-your-dapp">original ENS documentation here</a>). As an example, you can look at how our online wallet <a href="https://wallet.energyweb.org/">https://wallet.energyweb.org</a> supports ENS. Typed in an address? Cool! Typed in an ENS name instead? It tries to resolve it to an address. Also cool! Both work.</p><p>Why not do the same with email, or user name fields on login pages? This way a user’s ENS name can be like a “universal passport” for many things at once and all they have to do is to remember the name they chose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*BdXkFZ4Dyan5jChvXqRICw.jpeg" /><figcaption>Leeloo from 5th Element using ENS</figcaption></figure><p>If you want to integrate with Energy Web’s ENS system, or you want to get involved with some more-advanced use cases, you will find all the info and tools you need on <a href="https://energyweb.atlassian.net/wiki/spaces/EWF/pages/555745281/Using+ENS">our wiki page about ENS</a>.</p><h3>What are we doing with the funds generated from ENS?</h3><ol><li><strong>Maintaining ENS infrastructure.</strong> Hosting the ENS manager app has costs and Chainlink nodes need to eat.</li><li><strong>Reinvesting in projects</strong> like ENS (potentially via the EW community fund) to make our chains more useful and user friendly.</li></ol><h3>What’s next?</h3><p>Having ENS on our chains unlocks some interesting possibilities. Since you can use it to manage public keys and arbitrary texts, we are looking for ways to connect it with our <a href="https://medium.com/energy-web-insights/ewfs-did-library-is-open-source-1f355c95503e">Decentralized Digital Identities (DID) system</a>. Other than that, we will add support for it in all our dApps. We will also open PRs to various ENS client libraries so they find our ENS contract addresses out of the box.</p><h3>ENS Resouces</h3><ul><li>Official ENS docs: <a href="https://docs.ens.domains/">https://docs.ens.domains/</a></li><li>ENS GitHub: <a href="https://github.com/ensdomains">https://github.com/ensdomains</a></li><li>Official ENS medium: <a href="https://medium.com/the-ethereum-name-service">https://medium.com/the-ethereum-name-service</a></li><li>EnergyWeb ENS manager: <a href="https://ens.energyweb.org/">https://ens.energyweb.org</a></li><li>EnergyWeb ENS wiki: <a href="https://energyweb.atlassian.net/wiki/spaces/EWF/pages/555745281/Using+ENS">https://energyweb.atlassian.net/wiki/spaces/EWF/pages/555745281/Using+ENS</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8d884138790" width="1" height="1" alt=""><hr><p><a href="https://medium.com/energy-web-insights/ethereum-name-service-ens-is-now-available-for-the-energy-web-a8d884138790">Ethereum Name Service (ENS) is now available for the Energy Web</a> was originally published in <a href="https://medium.com/energy-web-insights">Energy Web</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Chainlink on Ethereum, Part 3.: Aggregation of results and synthesis]]></title>
            <link>https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-3-aggregation-of-results-and-synthesis-48f980f6572f?source=rss-7372dbd70efa------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f980f6572f</guid>
            <category><![CDATA[chain-link]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[ewf]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Adam Z. Nagy]]></dc:creator>
            <pubDate>Thu, 28 Nov 2019 10:11:31 GMT</pubDate>
            <atom:updated>2019-11-29T13:01:56.670Z</atom:updated>
            <content:encoded><![CDATA[<p>You should be familiar with Chainlink basics now. If not, click here <a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-1-setting-up-a-single-node-fc447ae4560a">Part 1.</a> and <a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-2-running-your-jobs-750b124e734e">Part 2.</a></p><p>Let’s see a more complicated setup. For this part, everything is already in place so you don’t really have to deploy anything yourself. The extended system for aggregating results of multiple Chainlink nodes is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z5uY8u61Z6bspJuz-KfPWw.png" /><figcaption>The setup. N is the yet-undetermined number of Oracle nodes</figcaption></figure><h3>The parts</h3><h4>Nodes and Oracle contracts</h4><p>There are N Chainlink nodes instead of one. It is important to note that Chainlink nodes do not communicate/coordinate with each other off-chain, they are totally independent.</p><p>There are N Oracle contracts that each belong to their corresponding off-chain nodes. These are also independent from each other.</p><p>I talk about choosing an optimal N later.</p><h4>The EWT/EUR Job</h4><p>Each Node runs the following job:</p><pre>{<br>    &quot;initiators&quot;:[<br>        {<br>            &quot;type&quot;:&quot;runlog&quot;,<br>            &quot;params&quot;:{<br>               &quot;address&quot;:&quot;0x3b903c60ef60c4b29655608576cc16c0ddcd6da0&quot;<br>            }<br>        }<br>    ],<br>    &quot;tasks&quot;:[<br>        {<br>            &quot;type&quot;:&quot;httpget&quot;,<br>            &quot;confirmations&quot;:0,<br>            &quot;params&quot;:{<br>                &quot;get&quot;:&quot;<a href="https://api.liquid.com/products/560">https://api.liquid.com/products/560</a>&quot;<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;jsonparse&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>                &quot;path&quot;:[<br>                    &quot;last_traded_price&quot;<br>                ]<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;multiply&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>                &quot;times&quot;:10000<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;ethuint256&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{}<br>        },<br>        {<br>            &quot;type&quot;:&quot;ethtx&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{}<br>        }<br>    ],<br>    &quot;startAt&quot;:null,<br>    &quot;endAt&quot;:null<br>}</pre><p>For this Job, no parametrization is done from the client contract to reduce on-chain message size. It is hardcoded to fetch the price from <a href="https://api.liquid.com/products/560">https://api.liquid.com/products/560</a>, multiply it with 10000 and return the value in a transaction.</p><h3>Contracts</h3><p>All of them are included in this shared <a href="https://gist.github.com/ngyam/21db5a581949c4ab7882add2bb0d5867"><strong>GitHub gist</strong></a>, just import it to <strong>Remix</strong> as before at Part 1.: <a href="https://gist.github.com/ngyam/21db5a581949c4ab7882add2bb0d5867">21db5a581949c4ab7882add2bb0d5867</a>.</p><h3>Aggregators</h3><p>The Aggregator contract is the heart of this whole operation. Chainlink provides a <a href="https://github.com/smartcontractkit/chainlink/blob/develop/evm/contracts/Aggregator.sol">reference implementaion (Aggregator.sol)</a> that can be modified and extended. The Aggregator contract also derives from ChainlinkClient.sol. How they work in general:</p><ol><li>The Aggregator <em>usually</em> maintains a list of Oracles and JobIDs. New ones can be added or removed similarly to any other permissioning contract.</li><li>Whenever a request is made to the Aggregator, it forwards that request to all the Oracles, separately.</li><li>The Aggregator pays for the Oracles. The Aggregator contract must own enough Chainlink tokens to work.</li><li>The Oracles run the invoked jobs independently and return the answer in the Aggregator’s fallback function</li><li>The Aggregator waits until a certain number of results are collected for a query, and then calculates a statistical value, e.g. mean or median, which is the final answer.</li></ol><p>The Aggregator provided by Chainlink is just an example. It is expected that you modify it to your needs (result data types and co).</p><p>For this poc I use <strong>ExecutorPublicPriceAggregator.sol</strong>, which I developed only for this price oracle use case:</p><ul><li>It handles uint256 numbers instead of int256s.</li><li>It can execute an arbitrary transaction as soon as enough results are collected. Enough results mean 3-out-of-5 Oracles replies here.</li><li>Instead of the Aggregator paying, the requester has to approve the Aggregator to spend a certain amount of tokens in its name. If the requester doesn’t do it, the requests fail.</li><li>It is meant to be a public price oracle infrastructure poc.</li></ul><p>Let’s try it out!</p><h3>Using the price Oracle</h3><p><strong>Fetch the necessary contracts</strong></p><p>In Remix just compile and add contracts on the following addresses. Copyable version here: <a href="https://gist.github.com/ngyam/6d1ffdc727eea2cfdc8636c53a12a677">https://gist.github.com/ngyam/6d1ffdc727eea2cfdc8636c53a12a677</a>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d7f99f5bba45d301a2a156dc226199b/href">https://medium.com/media/9d7f99f5bba45d301a2a156dc226199b/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*V4MyvV3d3Vq1dnEqa2ZJig.png" /></figure><h3>Approve some tokens for the PriceAggregator</h3><p>This was a little bit tricky. I wanted my PriceAggregator contract to be a public infrastructure, so how payments are made to the Oracle contracts? Who pays? The Aggregator is the ChainLink client contract, submitting requests with the <strong>“transferAndCall”</strong> function of the LinkToken. How can I make sure, that the user pays and e.g. I don’t have to continuously fill up the balance of the Aggregator in some tricky way? Or use some registry of users and their tabs? In the end I decided to simply use the <strong>“approve”</strong> feature of ERC-20 token contracts.</p><p>First, you have to check your Volta-Link token balance which you can do with the LinkToken contract’s <strong>“balanceOf”</strong> function. If you still need some more you can go back to <a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-1-setting-up-a-single-node-fc447ae4560a">Part 1 section 3</a> to see how to get some.</p><p>There is a convenience function <strong>“calculateRequestFee”</strong> in the Price Aggregator that returns how much you have to pay for 1 request, which is now basically the price of 5 individual Oracle requests.</p><p>Then go back to the LinkToken contract. With the <strong>“approve”</strong> function, approve some tokens for the Aggregator contract address, at least 1 request worth. Each time you make a request, the Aggregator tries to pay for the Oracle nodes in your name. If you didn’t approve enough to pay for a request, the call will fail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*-ScI5a3VKxB_CNBC8GkG4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*SD0mF30quN0Yf3coEJfcEg.png" /></figure><p>Now you should be ready to interact with the Aggregator.</p><h3>Request a rate update from the Oracle</h3><p>This is the part when we try things out. You can call 2 PriceAggregator functions:</p><ul><li><strong>requestRateUpdate</strong>: simply updates the <strong>“currentAnswer”</strong> storage variables and <strong>“updatedHeight”</strong> once enough results are in. Updated height is the blocknumber when the last change happened. The user can actually decide whether he wants to make a new request or the current answer is fresh enough.</li><li><strong>requestRateUpdateWithTransaction</strong>: with this you can fire a transaction in the end. I added this because as an external user (meaning an external smart contract) usually wants to some immediate action once the oracle results are in. Loading in a transaction works the exact same way as in the Gnosis Multisig wallets. If you are not familiar with Gnosis Multisg wallets, check out my interactive notebook tutorial <a href="https://github.com/ngyam/tutorial-multisigwallet-js/blob/master/MultisigWalletTutorialJs.ipynb">here (js)</a> or <a href="https://github.com/ngyam/tutorial-multisigwallet-py/blob/master/MultisigWalletTutorialPy.ipynb">here (py)</a>.</li></ul><p>By calling e.g. <strong>“requestRateUpdate”</strong> you have to see same things happening as for the first part of the tutorial. With the difference that results are coming aggregated.</p><h3><strong>How results are aggregated</strong></h3><p>Everything happens in the smart contract on-chain:</p><ol><li>We wait till the required amount of answers are in, e.g. 3</li><li>Sort answers, and choose the middle one from the list</li><li>If the answer-list size is even, we use the mean value of the 2 middle elements.</li></ol><p>You can implement of course your own strategy too depending on the use case. If you use Oracles for e.g. random numbers, this strategy would not make sense.</p><h3>How to choose the number of nodes N and required number of answers k</h3><h4>In theory</h4><p>Usually you want to have an odd number of nodes and at least 3, e.g. <a href="https://en.wikipedia.org/wiki/Triple_modular_redundancy">a TMR</a> config.Why? Because of majority voting and error detection. If 1 node says A and the other 2 says B, you can detect who lies. If there were e.g. 4 nodes and 2 would say A and 2 would say B, then who is right?</p><ul><li>3 nodes can tolerate 1 failure (2-out-of-3), 5 nodes can tolerate 2 (3oo5), 4oo7, 5oo9 and so on.</li><li>4 nodes tolerate 1 failure too (3oo4) but it is just more expensive then 2oo3.</li></ul><p>In addition, you want some protection against 2 types of Oracle failures:</p><ul><li>A node is down, inactive, so the Oracle never sends an answer.</li><li>A node lies, malicious, so it sends a bullshit answer or wants to mess with you on purpose.</li></ul><h4>In practice</h4><p>Let’s map theory to my price Oracle use case.</p><p>If a node is malicious, there are 2 scenarios:</p><ol><li>The Oracle reports some too low or high price value. I protect against it by choosing the minimum number of required answers to an odd number that’s larger than 1. Let’s settle with 3. This way the outrageously low or high number gets to the very beginning- or end of the sorted list and it doesn’t get chosen as the answer.</li><li>If the malicious answer is kinda on the same range as the other answers and gets chosen as median, it is not malicious at all. 😀</li></ol><p>So if I’d choose e.g a 3oo5 config, I would protect against:</p><ul><li>1 malicious and 1 inactive node, or</li><li>2 inactive nodes, or</li><li>1 malicious node only</li></ul><p>If there were 2 malicious nodes, potentially one of them could be chosen as median.</p><p>I could also go with a 3oo4 config which would protect against 1 inactive or malicious node.</p><h3><strong>Reflection, limitations and further improvements</strong></h3><p>This is just a simple poc to test Chainlink’s capabilities. Get inspired, take it one step further, but don’t take it too seriously as it is.</p><ul><li>I feel like the ERC-20 token system is a limitation and annoyance that forced me to use this <strong>“approve”</strong> based scheme to pay for the Aggregator. Could Chainlink oracles work without the LinkToken? Absolutely. With native tokens life would be simpler, but the whole ecosystem is built around this token so you have to buy it. For now let’s just accept that open source projects have to make a living somehow and that’s how the team solved it. If I ever get too bored I might fork Chainlink and make it work with native tokens only.</li><li>An issue of this poc design is that the last Oracle pays for everything: calculates the aggregation of results and fires the loaded user transaction. An improvement could be made where the executor node gets paid extra.</li><li>Scalability issue: increasing the number of nodes linearly increases the number of transactions. N requests, N answers.. Moreover, aggregating a bunch of results and firing the final user transaction in one go can easily bump into the gas limit.</li><li>Chainlink network doesn’t feel like a “network”. Nodes are standalone, do not coordinate and do not see each other at all. They are just offering simple modular redundancy, nothing else. It is completely up to the users how they want to rely on this.</li><li>All public facing nodes would have to somehow publish the Jobs they are offering and how they accept the requests. There is no service discovery. You have to tell a friend, or enlist on a service market e.g.: <a href="https://market.link/">https://market.link/</a>.</li><li>The other thing that I’m missing is a wholesome incentive scheme. Oracles are getting paid for work, but they are not punished if they do not fulfil their duties or are proven malicious. A staking/slashing system would be interesting to consider here. Modular redundancy helps, but you’d get stronger guarantees with something like this. There are already some ongoing efforts <a href="https://medium.com/linkpool/staking-with-chainlink-b58eb3de6f1b">that you can read about here</a>.</li></ul><h3>When would you use Chainlink?</h3><p>Smart contracts need to be poked from outside, so most DApps have off-chain components and workers. Why would you use Chainlink then? Why would you aggregate on-chain?</p><p>First of all you want to put things on-chain that are mean to be public and disputable. This means that Chainlink comes handy when:</p><ul><li>You want to fetch data from a public, third party API, so publicly verifiable information. Think of price pairs, weather, scores, etc.</li><li>You want to show an undeniable proof of honesty to your users: what data you fetched, when did you fetch it, and how you calculated the outcome. All this with an immutable, historical trace. You need to prove you honesty for the preservation of trust.</li><li>You want to spread risk. Airplanes have 3 of everything from different manufacturers. You can achieve the same with Chainlink’s modular redundancy and <a href="https://eth-usd-aggregator.chain.link/">aggregate results of different providers</a>.</li></ul><p>Second, the UX of Chainlink is amazing (or should I say DX for developer experience?). You can setup one node/Oracle in minutes. If your DApp consists mostly of smart contracts why would you bother developing off-chain components for simple things? You get one out of the box.</p><h3>The end</h3><p>I hope you enjoyed this journey with Chainlink on our chain. I keep my nodes running on AWS so the PriceAggregator is quasi public infrastructure on Volta, you can rely on it for your pocs. Not production grade though. If you have some cool addition or different Aggregators, feel free to create a PR to my <a href="https://github.com/ngyam/chainlink-client-contracts">GitHub repo</a>. I plan to share some other cool things I’m involved with in the future, so stay tuned!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*T6EuePAVqux457w1yDsyCA.jpeg" /></figure><h3>Navigation</h3><p><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-2-running-your-jobs-750b124e734e">← Part 2.: Running your Jobs</a><br><a href="https://medium.com/@aznagy/oracles-with-chainlink-on-ethereum-networks-tutorial-series-338b8a5f1726">← Back to Introduction</a></p><p><em>Need help with your blockchain based project? Shoot me a mail: adam.zsolt.nagy@gmail.com</em><br><em>Did you learn something useful? Made your job easier? Tips are welcome too: Ethereum: 0x74dd76E24B2CFB43C1b1a4498295d553D0843746</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f980f6572f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Chainlink on Ethereum, Part 2.: Running your Jobs]]></title>
            <link>https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-2-running-your-jobs-750b124e734e?source=rss-7372dbd70efa------2</link>
            <guid isPermaLink="false">https://medium.com/p/750b124e734e</guid>
            <category><![CDATA[chain-link]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ewf]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Adam Z. Nagy]]></dc:creator>
            <pubDate>Wed, 27 Nov 2019 10:33:45 GMT</pubDate>
            <atom:updated>2019-11-28T10:12:59.428Z</atom:updated>
            <content:encoded><![CDATA[<p>For Part 1. click <a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-1-setting-up-a-single-node-fc447ae4560a">here</a>. We are already at the 4th step.</p><h3>4. Creating Jobs on your Chainlink node</h3><p>The only step left is to populate your node with Jobs so they can actually serve requests coming from your smart contracts. Read about what Jobs, Adapters and Initiators are <a href="https://docs.chain.link/docs/job-specifications">here</a>. These are your building blocks.</p><p><strong>TL;DR version</strong>:</p><ul><li>Job: A sequence of actions processing a request.</li><li>Adapter: A step in processing a request.</li><li>Initiator: Defines how a Job run is triggered. The “first step”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*rsL_lt8ahTdHDYkN.jpg" /><figcaption>An ancient Initiator and Adapters, 100 BC, colorized</figcaption></figure><p>You have to specify Jobs in a JSON format, and you can add them in the Jobs section of your node’s GUI.</p><p>I want to make an oracle for the EWT/EUR price pair listed on Liquid, so I am using the following Job specification:</p><pre>{<br>    &quot;initiators&quot;:[<br>        {<br>            &quot;type&quot;:&quot;runlog&quot;,<br>            &quot;params&quot;:{<br>               &quot;address&quot;:&quot;0x1a63f77dD7Dc0c28220e10D6DBbd7d1e5104fb05&quot;<br>            }<br>        }<br>    ],<br>    &quot;tasks&quot;:[<br>        {<br>            &quot;type&quot;:&quot;httpget&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;jsonparse&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;multiply&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;ethuint256&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;ethtx&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        }<br>    ],<br>    &quot;startAt&quot;:null,<br>    &quot;endAt&quot;:null<br>}</pre><p>Let’s go through what these mean:</p><p>Initiator is a RunLog, which means the node will trigger a job run to an OracleRequest event emitted by the Oracle contract at 0x1a63f77dD7Dc0c28220e10D6DBbd7d1e5104fb05, which I deployed earlier.</p><p>Then our request will get processed by the Adapters, in the order they are defined sequentially, as a pipeline:</p><ol><li>We create HTTP GET request to a URL that will be given from the client Smart Contract</li><li>We parse the result to JSON and get the value defined in a path given from the client Contract as a request parameter</li><li>We multiply it by a certain amount which is also given from the client Contract as a request parameter</li><li>Transform it to uint256 type</li><li>Aaand fire the result as a transaction</li></ol><p>As you see this job description is quite generic, which means the adapters can get parametrized with the request initiated from the smart contract, e.g.: which URL should be fetched, what value to multiply the result with, what are the callback transaction params, etc.</p><p>There are so many other cool options that you can try. e.g.: CronJobs as Initiators that regularly feed data to your smart contracts or Compare Adaptors for true/false results.</p><p>Once you create the job, your job gets an ID. You can create many jobs running on one node, and list it in the Jobs section of the GUI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHmhG5ojadCYoLtiE2VPQg.png" /><figcaption>List of Jobs on a Chainlink node</figcaption></figure><h3>5. Use your Chainlinked contract</h3><p>Now with all contracts in place it is time to try things out. Let’s call the <strong>“requestEwtPrice”</strong> function. It takes the Oracle address and the Job ID as params.</p><pre>function requestEwtPrice(address _oracle, string _jobId)<br>    public<br>    onlyOwner<br>{<br>    Chainlink.Request memory req = buildChainlinkRequest(<br>        stringToBytes32(_jobId),<br>        this,<br>        this.fulfillEwtPrice.selector<br>    );<br>    req.add(&quot;get&quot;, &quot;<a href="https://api.liquid.com/products/560&quot;">https://api.liquid.com/products/560&quot;</a>);<br>    req.add(&quot;path&quot;, &quot;last_traded_price&quot;);<br>    req.addInt(&quot;times&quot;, 10000);<br>    sendChainlinkRequestTo(_oracle, req, ORACLE_PAYMENT);<br>}</pre><p>You can see in the source code what is the URL being called, what JSON field we are accessing, and what value are we multiplying the price with. You can just check the URL in the browser to see how it looks like: <a href="https://api.liquid.com/products/560">https://api.liquid.com/products/560.</a> We access the last traded EWT/EUR price pair through Liquid’s public API.</p><p>You can also see that “<strong>fulfillEwtPrice”</strong> is the function that gets fired once the results are in, which just sets the <strong>“currentEwtPrice”</strong> state variable in the client contract.</p><p>If all went well, you have to see the <strong>“currentEwtPrice”</strong> to be set to a non-zero value in Remix. If you check you node, you can see that a successful Job Run was triggered. You can access its details to see the transformations that were applied at each step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A20s4AbScaE7WariLWua9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6NMpPei2JyNiAwshhuyWIQ.png" /><figcaption>This is what you have to see on a successful Job run</figcaption></figure><p>That’s it with the basics! Now we can move to the cool stuff everyone is waiting for: how aggregation of results look like in smart contracts in Part 3.</p><h3>Materials</h3><p>You can find all the materials on my GitHub for the <a href="https://github.com/ngyam/chainlink-node-scripts">scripts</a> and <a href="https://github.com/ngyam/chainlink-client-contracts">Chainlink contracts</a>.</p><h3>Navigation</h3><p><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-1-setting-up-a-single-node-fc447ae4560a">← Part 1.: Setting up a single node</a><br><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-3-aggregation-of-results-and-synthesis-48f980f6572f">Part 3.: Aggregation of results and synthesis →</a></p><p><em>Need help with your blockchain based project? Shoot me a mail: adam.zsolt.nagy@gmail.com</em><br><em>Did you learn something useful? Made your job easier? Tips are welcome too: Ethereum: 0x74dd76E24B2CFB43C1b1a4498295d553D0843746</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=750b124e734e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Chainlink on Ethereum, Part 1.: Setting up a single node]]></title>
            <link>https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-1-setting-up-a-single-node-fc447ae4560a?source=rss-7372dbd70efa------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc447ae4560a</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[chain-link]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ewf]]></category>
            <dc:creator><![CDATA[Adam Z. Nagy]]></dc:creator>
            <pubDate>Wed, 27 Nov 2019 09:30:59 GMT</pubDate>
            <atom:updated>2019-11-27T10:36:59.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Before we get to the spicy stuff - aggregating results of multiple oracles - it is important to go through the basics and get the hang of the Chainlink framework. In this first lesson we will create the following setup on Volta:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*okUb37q_BTCLw73pQ7uJOw.png" /><figcaption>Single node Chainlink oracle setup</figcaption></figure><h3>1. Let’s get started with setting up the node!</h3><p>The <a href="https://docs.chain.link/docs/running-a-chainlink-node#section-using-docker">Chainlink documentation</a> provides ample tutorials to get started. We are going to go the <a href="https://www.docker.com/">Docker</a> way, so if you have it installed you are ready to go. I don’t want to completely duplicate the original guide because it is well written so I just focus on the settings I applied.</p><p><strong>1.</strong> Create a separate folder for the node where it is convenient, e.g. <em>YOUR_PATH/chainlink-volta-1/</em><strong>.</strong> In our example, this is where the node will keep all its data.</p><p><strong>2.</strong> The main difference you have to make is the LINK_CONTRACT_ADDRESS and the ETH_URL in the <strong>.env</strong> generation bash script. The link token contract is deployed at “0xe76d478383327b83eE0FE6b3F0ec675315340E18” on Volta. Feel free to change the RPC URL to your local-, or another remote Volta node if needed. You can find all configuration variables <a href="https://docs.chain.link/docs/configuration-variables">here</a>.</p><pre>#!/bin/bash</pre><pre>echo &quot;ROOT=/chainlink<br>LOG_LEVEL=debug<br>ETH_CHAIN_ID=73799<br>ETH_GAS_PRICE_DEFAULT=1000<br>ETH_GAS_BUMP_WEI=1000000000<br>ETH_GAS_BUMP_THRESHOLD=3<br>MIN_INCOMING_CONFIRMATIONS=3<br>MIN_OUTGOING_CONFIRMATIONS=3<br>LINK_CONTRACT_ADDRESS=0xe76d478383327b83eE0FE6b3F0ec675315340E18<br>CHAINLINK_TLS_PORT=0<br>SECURE_COOKIES=false<br>ALLOW_ORIGINS=*</pre><pre>ETH_URL=wss://volta-rpc.energyweb.org/ws&quot; &gt; .env</pre><p><strong>3.</strong> To start up the node, you can run the bash script below. <em>cdir</em> is just the directory where your bash script is located, and <em>host_port</em> is where you can reach the graphical interface of the chainlink node on localhost. A Chainlink node exposes a nice GUI for managing it.</p><pre>#!/bin/bash</pre><pre>host_port=6688<br>cdir=&quot;$( cd &quot;$(dirname &quot;$0&quot;)&quot; ; pwd -P )&quot;<br>docker run -p $host_port:6688 -v $cdir:/chainlink -it --env-file=$cdir/.env smartcontract/chainlink:latest local n</pre><p><strong>4.</strong> The first time you launch the node, the terminal leads you trough creating a password for a keyfile of a new Ethereum account. This account belongs to your node for creating transactions on the chain. You also need to give user/pass login credentials for the GUI.</p><p><strong>4.1.</strong> If you don’t want these credentials to be regenerated for your Chainlink node, you have to save them. E.g.:</p><ul><li>Create a <strong>.secret</strong> file and put the keyfile password into it</li><li>Create a <strong>.api</strong> file and put the user on the first line, and its password below on the second line</li><li>Now when you start the node again, you have to pass your credentials with the -<strong>p</strong> and <strong>-a</strong> flags</li></ul><pre>#!/bin/bash</pre><pre>host_port=6688<br>cdir=&quot;$( cd &quot;$(dirname &quot;$0&quot;)&quot; ; pwd -P )&quot;<br>docker run -p $host_port:6688 -v $cdir:/chainlink -it --env-file=$cdir/.env smartcontract/chainlink:latest local n -p /chainlink/.secret -a /chainlink/.api</pre><p><strong>5.</strong> Login to the GUI. If everything went well, you can navigate to <a href="http://localhost:6688/">http://localhost:6688</a> (or the port you set) for the login screen. Clicking the Configuration page, you can find your node’s address (ACCOUNT_ADDRESS) and all the settings that you applied.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*RMGhSA8-PyQwKvSGYxrg2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9frFHU4NrUdNaCJTKBuOzA.png" /></figure><p><strong>6.</strong> Put some native tokens on your node address, otherwise your node can’t interact with the chain. On Volta this is very easy using <a href="https://voltafaucet.energyweb.org/">the faucet</a>.</p><p>Congrats! Your Chainlink node is up and running. It is pretty much useless without Jobs and the on-chain components though.</p><h3><strong>2. Deploying the necessary Smart Contracts</strong></h3><p>For this part you better use some interactive tool. I chose <a href="https://remix.ethereum.org/">Remix</a> with <a href="https://metamask.io/">Metamask</a> to connect to our Volta remote RPC. To add Volta to Metamask, follow our <a href="https://energyweb.atlassian.net/wiki/spaces/EWF/pages/703201459/Volta%3A+Connecting+to+Remote+RPC">wiki page</a>.</p><p>You can load the smart contracts to <strong>Remix</strong> from <strong>GitHub Gist</strong> with ID: <a href="https://gist.github.com/ngyam/d899cf4ecbc352bba1d9ba6c9c9db4d8">d899cf4ecbc352bba1d9ba6c9c9db4d8</a>.</p><h4>Oracle.sol</h4><p>This is the first contract to deploy. Oracle contracts can be monitored by the nodes running off-chain to listen for requests.</p><ol><li>These contracts can only be compiled with a 0.4.x compiler. I used version 0.4.26.</li><li>When deploying, you have to pass the constructor the Link Token address on Volta, which is <a href="https://volta-explorer.energyweb.org/address/0xe76d478383327b83ee0fe6b3f0ec675315340e18/transactions"><strong>0xe76d478383327b83eE0FE6b3F0ec675315340E18</strong></a>.</li><li>Once deployed, you have to permission your Chainlink node’s address in this contract. This is done by calling the <strong>“setFulfillmentPermission”</strong> function. If you don’t do this, your node will not be able to pick up requests coming to this Oracle contract.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*XAIXFYZyBNk57K_y3D0hiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*5zdCa-24XZ08ud_RSvJ9CQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*qPH0QPp6gDRSHGaoudGh6w.png" /></figure><h4>ATestnetConsumer.sol</h4><p>This is the client contract that makes the requests and receives the results. To integrate with Chainlink, your contracts have to simply derive from ChainlinkClient.sol.</p><p>After compilation just simply deploy. This contract does not need constructor parameters for deployment.</p><h3>3. Get Volta-Chainlink tokens to fuel your Oracle requests</h3><p>The Chainlink ecosystem runs on ERC-20 Chainlink tokens, so your client ATestnetConsumer.sol must have some in order to make requests to the Oracle. There is no free lunch.</p><p>I developed a <strong>simple crowdsale contract </strong>for this purpose that can be found on address <a href="https://volta-explorer.energyweb.org/address/0x3f312acb7c48eb4e2a2e2b6c89fd7a2011f45915"><strong>0x3f312acB7c48Eb4e2A2E2B6C89FD7a2011F45915</strong></a><strong>.</strong></p><p>To reach it, compile LinkTokenSale.sol but choose a compiler that is 0.5+ version. Instead of deploying just use the “<strong>At Address”</strong> button with the address given above.</p><p>Next, you have to buy the Volta-Chainlink ERC-20 tokens with Volta native tokens by calling the “<strong>buyTokens”</strong> function. Buy the tokens for the address of ATestnetConsumer.sol. For this to work, you have to fill out the <strong>Value</strong> field as well which is right below the <strong>Gas limit</strong> settings. The Crowdsale contract exchanges tokens in a 1:50 ratio, so e.g. for 1 Volta Token you get 50 Volta-Chainlink tokens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*lyjwrMHhKAFA8Pvz1zmwhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*-lFoGW91YfmcsPg-cQajHQ.png" /><figcaption>Buying tokens from the sale contract</figcaption></figure><p>That’s it for Part 1.</p><p>In Part 2 we are going to set up a Job and try out our Oracle client.</p><h3>Navigation</h3><p><a href="https://medium.com/@aznagy/oracles-with-chainlink-on-ethereum-networks-tutorial-series-338b8a5f1726">← Introduction</a><br><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-2-running-your-jobs-750b124e734e">Part 2.: Running your Jobs→</a></p><p><em>Need help with your blockchain based project? Shoot me a mail: adam.zsolt.nagy@gmail.com</em><br><em>Did you learn something useful? Made your job easier? Tips are welcome too: Ethereum: 0x74dd76E24B2CFB43C1b1a4498295d553D0843746</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc447ae4560a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracles with Chainlink on Ethereum networks tutorial series]]></title>
            <link>https://medium.com/@aznagy/oracles-with-chainlink-on-ethereum-networks-tutorial-series-338b8a5f1726?source=rss-7372dbd70efa------2</link>
            <guid isPermaLink="false">https://medium.com/p/338b8a5f1726</guid>
            <category><![CDATA[ewf]]></category>
            <category><![CDATA[chain-link]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Adam Z. Nagy]]></dc:creator>
            <pubDate>Wed, 27 Nov 2019 09:28:43 GMT</pubDate>
            <atom:updated>2019-11-28T15:45:35.168Z</atom:updated>
            <content:encoded><![CDATA[<h3>Parts</h3><ul><li><strong>Introduction</strong></li><li><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-1-setting-up-a-single-node-fc447ae4560a">Part 1.: Setting up a single node</a></li><li><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-2-running-your-jobs-750b124e734e">Part 2.: Running your Jobs</a></li><li><a href="https://medium.com/@aznagy/setting-up-chainlink-on-ethereum-part-3-aggregation-of-results-and-synthesis-48f980f6572f">Part 3.: Aggregation of results and synthesis</a></li></ul><h3>Oracles</h3><p>It is often the case that your smart contracts need external data feed in order to do their proper job. Smart contracts cannot reach out to the external world to fetch data, cannot schedule transactions, so they rely on external entities/third parties to do this which we call Oracles. When you need to “blockchainize” real world information, Oracles are always there in one form or another. The flipside though: they introduce heavy trust assumptions in your otherwise trustless system. How can you trust an external data source? What if there is malicious intent, the source gets compromised or data never arrives? These are not trivial issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*sogLzSNcNBofNVmmIILc7A.jpeg" /></figure><h3>Chainlink’s value proposition</h3><p><a href="https://chain.link/">Chainlink</a> aims to bridge the on-chain &amp; off-chain world with decentralized Oracles, eliminating single-point-of-failures and unconditional trust in centralized Oracle services. They provide this in a hassle-free manner for contract creators and developers so they can focus on what actually matters: their use case. As you will see, setting up Chainlink nodes and getting integrated at smart contract level is surprisingly easy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aD3D1cw2yNvbvkKS3E82_A.png" /><figcaption>Chainlink integration has arrived to EWF’s chains</figcaption></figure><h3>The aim of this series</h3><p>I like to be hands-on so expect hands-on stuff and some bonus memes. We will:</p><ul><li>Learn how to set up a Chainlink node and use it from a smart contract on our public Ethereum testnet, Volta.</li><li>Learn how to aggregate the answers of multiple Oracles, and how to use the public <a href="https://app.liquid.com/exchange/EWTEUR">EWT/EUR</a> Price Pair Oracle infrastructure on Volta.</li><li>Learn some design principles around Chainlink oracles.</li><li>Philosophize about when does it makes sense to use Chainlink.</li></ul><p>Why Volta? B̶e̶c̶a̶u̶s̶e̶ ̶I̶ ̶m̶a̶d̶e̶ ̶i̶t̶.̶ We at <a href="https://energyweb.org/">EnergyWeb</a> created the world’s largest energy blockchain <a href="https://www.energyweb.org/work-with-us/our-affiliate-ecosystem/">ecosystem with more than 100 companies</a> and 2 enterprise-grade blockchain platforms: the Energy Web Chain and a related testnet called Volta. They are Ethereum chains with Parity’s AuRa Proof-of-Authority consensus engine, 25+ reputable energy corporates as validators, rock stability and 5s block times. Thus, even if you are not doing anything energy specific it is worth to use Volta as a live Ethereum testnet because from a dev perspective it is the same. You can get started <a href="https://energyweb.atlassian.net/wiki/spaces/EWF/pages/718078071/Chain+Energy+Web+Chain+Production+Network">here</a>.</p><p>Since more and more of our projects need some kind of Oracle service, the time has come to look into it and set the Chainlink infrastructure up on our chain as well. I decided to document my journey and share the outcome of my experimentation in form of a tutorial series as a pledge to the open source community. Naturally, everything is applicable to any other Ethereum network too.</p><p><em>Need help with your blockchain based project? Shoot me a mail: adam.zsolt.nagy@gmail.com</em><br><em>Did you learn something useful? Made your job easier? Tips are welcome too: Ethereum: 0x74dd76E24B2CFB43C1b1a4498295d553D0843746</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=338b8a5f1726" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>