<?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 Keith Dumont on Medium]]></title>
        <description><![CDATA[Stories by Keith Dumont on Medium]]></description>
        <link>https://medium.com/@ksdumont?source=rss-cb843623f65d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_0tujfmnI5phodzWI61SqA.jpeg</url>
            <title>Stories by Keith Dumont on Medium</title>
            <link>https://medium.com/@ksdumont?source=rss-cb843623f65d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:57:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ksdumont/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[The Best Blockchain Oracle: How to Choose?]]></title>
            <link>https://medium.com/@ksdumont/the-best-blockchain-oracle-how-to-choose-86006a5cfa50?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/86006a5cfa50</guid>
            <category><![CDATA[decentralized-finance]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[blockchain-oracle]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Tue, 20 Feb 2024 16:29:43 GMT</pubDate>
            <atom:updated>2024-02-21T22:47:31.707Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I aim to explore the different oracle solutions available in the crypto space, evaluating how decentralized applications (dApps) can choose the best solution to fit their needs. Each oracle solution has its advantages, but my goal is to provide a comparison, highlighting the most important factors developers should consider in their selection process. I will also explain why I believe Supra’s oracle offers superior benefits over its competitors.</p><p>When the topic of blockchain oracles arises, Chainlink often comes to mind due to its longevity in the field, first mover advantage, and significant market presence. However, many emerging oracle services offer greater advantages in reliability, security, decentralization, and speed that you may not be aware of.</p><p>Let’s get into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*IIs47XlNucUBY4o_Smy4ug.png" /></figure><h3>What are Blockchain Oracles?</h3><p>Before we move onwards, let’s establish a clear understanding of what an oracle is in the blockchain context. At its core, a blockchain oracle acts as a bridge between the digital and physical worlds, allowing smart contracts to interact with external data. This interaction is crucial because, by design, smart contracts on the blockchain cannot access or verify data from outside their network.</p><p>Oracles serve this vital role, fetching data from off-chain sources to on-chain applications, thus enabling smart contracts to execute based on real-world events and data. This functionality underpins many of the advanced features and use cases of dApps, from DeFi protocols that need real-time price feeds to power spot and perpetual DEXs, lending protocols, and payments protocols. Oracles function as a decentralized API enabling more complex applications to take place on the blockchain.</p><h3>Data Reliability</h3><p>As you probably already know, data reliability is crucial when considering an oracle for your dApp. Data reliability could mean the difference between your users getting liquidated or losing money on a certain trade. Given that your dApp is responsible for securing and transmitting value, the accuracy and timeliness of the data it relies on become of utmost importance.</p><p>Supra has established direct connections with numerous exchanges to fetch real-time data. This eliminates any intermediaries typically involved in the data aggregation process, reducing the risk of manipulation and errors. It’s important to remember that there are high incentives to manipulate data in this space. By sourcing data directly, Supra ensures that the price feeds are not only accurate but also reflect the most current market conditions without delay. Supra currently sources its data from 74 unique providers.</p><p>Traditional oracles, including Chainlink and Pyth, often rely on third-party data providers in addition to exchange data. These providers, including market makers and other financial institutions, can have vested interests that might influence the data provided. While these services aggregate data from various sources, the indirect nature of data collection introduces a layer of opacity, potentially affecting the data’s reliability and transparency.</p><p>Supra’s direct connections to data sources minimize the risk of third-party manipulations, ensuring that the data fed into the blockchain is accurate and untampered. This direct sourcing method provides a clear, auditable trail from the data origin to its on-chain representation. Supra recognizes the importance of data freshness, especially in the fast-paced crypto market. It updates its on-chain storage with the latest prices upon every client request, ensuring that dApps always operate on the most current information.</p><p>While Chainlink and Pyth offer mechanisms to update data feeds, the flexibility and efficiency of Supra’s real-time updates and staleness checks significantly enhance the reliability of the data consumed by dApps. This ensures that even in scenarios of high market volatility or unexpected events, dApps integrated with Supra can maintain operational integrity.</p><p>Supra is currently operating on over 50 main nets offering more than 400 crypto asset pairs and FX data. Sports and equity data will be coming soon.</p><h3>Speed &amp; Security</h3><p>The speed at which an oracle can provide data is a crucial consideration for any DeFi application. Supra’s Decentralized Oracle Agreement (DORA) requires only a simple majority (51%) for consensus, instead of the traditional 67%, significantly reducing the response time for data requests. This leaner requirement allows Supra to efficiently manage adversarial nodes while maintaining the integrity and speed of data delivery.</p><p>For instance, to tolerate 100 malicious validators, our clan size needs to be 201 validators, in contrast to other protocols which require 301 validators. In essence, we can achieve the security guarantees of DORA while interacting with 31% fewer nodes than required by protocols like Chainlink’s, which necessitates a larger consensus threshold, inherently slowing down the data verification and delivery process. This results in faster finality and lower latency for Supra.</p><p>Supra implements a strategy of randomly rotating nodes into sub-committees of the network, known as Clans. Unlike Chainlink, where nodes are static and non-rotating, Supra’s nodes are frequently reconfigured into new arrangements. The unpredictability of our clan-node composition makes collusion and attacks such as delays, censorship, and publishing incorrect data virtually impossible.</p><p>Furthermore, Supra leverages off-chain computation for data aggregation, avoiding the latency typically introduced by on-chain processing. This approach enables quicker aggregation and dissemination of data feeds, directly benefiting dApps with faster, more reliable data. In addition to this, Supra is extremely gas efficient as you can receive as many as 200 price pairs with one request.</p><p>Both Chainlink and Supra utilize off-chain compute methods, also known as verifiable compute, for running Data Feeds. This is significantly more efficient than relying on smart contracts for data aggregation as seen with Pyth.</p><p>Pyth, a fork of Solana, must wait for 32 blocks to achieve full finality before delivering data to destination chains. This is because Solana’s Proof of History (PoH) prioritizes liveness over safety and is prone to forking, thus technically requiring about 32 blocks to reach probabilistic finality. Supra’s approach, unencumbered by such constraints, offers a more agile and responsive alternative, delivering data with unparalleled freshness.</p><p>Lastly, an analysis of Pyth reveals that its nodes are actually verifying Wormhole’s 13/19 multisig. Therefore, Pyth’s data security is comparable to Chainlink’s, reliant on just 13 out of 19 agents to avoid collusion. By using Wormhole, Pyth effectively reduces its Layer-1 security to that of a 13/19 multisig.</p><h3>Decentralization</h3><p>Supra’s approach to decentralization is comprehensive, extending from its node architecture to its governance model. Supra’s Oracle is designed to remove points of centralization. The randomization of nodes, and the fact that the destination chain’s smart contract verifies Supra’s network threshold signature, allows Supra to achieve low latency while maintaining a high Nakamoto Coefficient.</p><p>Randomization is a strategy whose security benefits have yet to be fully exploited in the industry. Supra randomly samples nodes from our large network to form tribes and clans. This boosts security, especially against an adversary who targets specific validators to disrupt certain services. It would be significantly easier to corrupt a single Chainlink DON, which does not replace or randomly rotate nodes, than it would be to corrupt a Supra Clan (sub-committee), which is periodically and randomly formed out of the Tribe (the Supra Network).</p><p>Supra is currently onboarding node operators and plans to continue to progressively decentralize our node operator set prior to the Token Generation Event (TGE), expected to take place in Q1 2024. Supra has a diverse set of node operators spread across various geographical regions.</p><p>With over 3,800 backers from their public sale conducted last October and more than 400,000 KYC’d participants and token holders from their gamified learn-to-earn program — expected to surpass 500,000 by TGE — Supra is set to have the best token distribution of any oracle &amp; Layer 1 (L1) launch. Supra has invested heavily in their community and it is evident in the distribution of the $SUPRA token.</p><p>In conclusion,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*S-SB2mMLo6nxtN0O9tAWHA.png" /></figure><p>Thank you!</p><p>Connect with me on <a href="https://twitter.com/KeithDumont3">X</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86006a5cfa50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin Post-Halving 2024: Supply Dynamics, Network Security, and Bitcoin ETF]]></title>
            <link>https://medium.com/@ksdumont/bitcoin-post-halving-2024-a-deep-dive-into-supply-dynamics-network-security-and-bitcoin-etf-fb81bfac6d1?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb81bfac6d1</guid>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[cryptocurrency-investment]]></category>
            <category><![CDATA[bitcoin-news]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Mon, 18 Sep 2023 16:26:52 GMT</pubDate>
            <atom:updated>2023-09-19T16:07:46.690Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Bitcoin Digital Gold" src="https://cdn-images-1.medium.com/max/1024/1*cELQ2V9f1CIvAoeUJSCPZA.jpeg" /><figcaption>Bitcoin — Digital Gold</figcaption></figure><h3>1. Introduction:</h3><p>Bitcoin, often referred to as “digital gold,” has revolutionized the world of finance since its inception in 2009. Created by the mysterious entity, Satoshi Nakamoto, Bitcoin introduced the concept of a decentralized digital currency that operates without the need for traditional financial intermediaries, such as banks or governments. This peer-to-peer electronic cash system not only challenged traditional financial systems but also introduced the groundbreaking technology of blockchain, which has since found applications far beyond just cryptocurrency.</p><p>Historically, Bitcoin has experienced several significant events known as “halvings.” These halvings, occurring approximately every four years, reduce the number of new bitcoins created and earned by miners by half. They play a pivotal role in Bitcoin’s economic model, ensuring its scarcity and deflationary nature. Each halving has historically been associated with significant price movements, often leading to new all-time highs in the months following the event.</p><p>The upcoming 2024 halving has garnered significant attention from the crypto community and financial analysts alike. A recent prediction from BitQuant, a popular social media commentator, suggests that Bitcoin will not only surpass its previous all-time high before the halving but will also potentially reach a staggering $250,000 per coin after the next halving cycle begins. Such bullish predictions are further supported by analyses from firms like Blockware Solutions, which suggest that the 2024 halving could propel Bitcoin’s price to an astounding $400,000. They attribute this potential surge to a combination of reduced sell-off pressures from miners and an increased demand, especially with dwindling Bitcoin supplies on exchanges.</p><p>As we approach this significant event, it’s essential to understand the myriad factors at play. The 2024 halving comes at a time when institutional interest in Bitcoin is at an all-time high, and the landscape of cryptocurrency regulation is rapidly evolving. These factors, combined with the inherent supply reduction of the halving, could have profound implications for Bitcoin’s price, adoption, and its role in the broader financial ecosystem.</p><figure><img alt="Bitcoin Halving Chart" src="https://cdn-images-1.medium.com/max/1024/1*xDrbzlGL3ZtfCR_0gypPtQ.png" /><figcaption>In the image above, the vertical blue lines indicate the previous three halvings (2012, 2016, and 2020). Note how the price has jumped significantly after each halving.</figcaption></figure><h3>2. The Uniqueness of Bitcoin’s Supply Curve:</h3><p>Bitcoin’s supply curve is unlike any other asset in the world. It is characterized by a hard-capped limit of 21,000,000 coins that will ever exist. This scarcity is a fundamental aspect of its value proposition, ensuring that, unlike fiat currencies, Bitcoin cannot be debased through arbitrary issuance.</p><p>A visual representation of Bitcoin’s supply can be broken down into three main components:</p><p>🟠 Circulating Supply: This represents the cumulative amount of Bitcoin that has been mined and is currently in circulation. As of now, over 19 million bitcoins have been mined, accounting for more than 90% of the total supply.</p><p>🔴 Remaining Supply: This indicates the number of coins left to be mined. With the last Bitcoin expected to be mined around the year 2140, it underscores the decreasing rate of new Bitcoin entering the market.</p><p>🔵 Percentage of 21M Bitcoin Supply Mined: This provides a visual representation of how much of the total supply has been mined to date.</p><figure><img alt="Bitcoin Supply Dynamics" src="https://cdn-images-1.medium.com/max/1024/1*EIatK--xzBwqoqo1nRPmGw.png" /></figure><p>The deterministic nature of Bitcoin’s supply curve is maintained by a brilliant mechanism known as the Difficulty Adjustment. This algorithm adjusts the complexity of the mining process to ensure that, regardless of the amount of mining power applied, the average time taken to mine a block remains approximately 10 minutes. This consistent block interval is crucial for maintaining the security and stability of the network.</p><p><strong>Within the realm of commodities, when the price of an asset like gold rises, there’s an economic incentive for miners to mine more of it, leading to an increase in the supply. This increased supply can then exert a downward pressure on the price, creating a self-regulating mechanism. Bitcoin, however, operates on a different paradigm. Its supply is pre-determined and cannot be influenced by external market dynamics. No matter how high the price of Bitcoin goes, the rate at which new bitcoins are introduced into the system remains unchanged, except for the periodic halvings. This inelastic supply, combined with increasing demand, can lead to significant price surges, as the market cannot be flooded with new bitcoins even in a bullish phase. This unique characteristic sets Bitcoin apart from traditional commodities and underpins its value proposition as a store of value. In my opinion, it’s the greatest asset in human history.</strong></p><h3>3. Bitcoin Issuance and Inflation Rate:</h3><p>Bitcoin’s issuance model is both transparent and predictable. At its inception, every block added to the blockchain rewarded miners with 50 bitcoins. This reward, however, is not constant. Every 210,000 blocks, or approximately every four years, this reward is halved in an event aptly named the “halving.” This mechanism ensures that the total supply of Bitcoin will never exceed 21 million.</p><p>The halving events have profound implications on Bitcoin’s inflation rate. Initially, with a reward of 50 bitcoins per block, the inflation rate was relatively high. But with each halving, the number of new bitcoins entering circulation reduces, leading to a decrease in the inflation rate.</p><p>For instance:</p><p>In the 2012 halving, the block reward dropped from 50 bitcoins to 25.</p><p>In 2016, it further reduced to 12.5 bitcoins.</p><p>The most recent halving in May 2020 saw the reward drop from 12.5 to 6.25 bitcoins per block.</p><p>The upcoming 2024 halving will reduce the reward from 6.25 bitcoins to just 3.125 bitcoins per block.</p><p><strong>Below you can see the block rewards until the year 2140.</strong></p><figure><img alt="Bitcoin Halving Block Rewards" src="https://cdn-images-1.medium.com/max/685/1*R-u8JCeueL5u6eOehgM4vg.png" /><figcaption>Bitcoin’s Transparent and Auditable Monetary Policy</figcaption></figure><p>The Inflation Rate is calculated by dividing the daily issuance of newly minted coins by the circulating supply. This gives an annual rate of supply expansion. As the block subsidy reduces with each halving, the inflation rate also sees a corresponding decline. This diminishing inflation rate, combined with the capped supply, reinforces Bitcoin’s deflationary nature.</p><p><strong>In the image below, you can see Bitcoin’s inflation rate during each period.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0ByAEg8NVvFx1dmiFc_xw.png" /><figcaption>Bitcoin’s inflation rate</figcaption></figure><p>Each halving lowers Bitcoin’s inflation rate. The orange line is Bitcoin’s inflation rate during a given period, while the blue line is the total number of bitcoins issued.</p><p>The impact of the halving on Bitcoin’s price is often a topic of debate among analysts. Historically, the reduced supply of new bitcoins, combined with steady or increasing demand, has led to bullish market cycles post-halving. The anticipation of this reduced supply acts as a catalyst, driving speculative interest and investment in the months leading up to the halving.</p><h3>4. Supply Dynamics: Old Coins vs. Young Coins:</h3><p>Bitcoin’s ledger, the blockchain, provides a transparent record of all transactions, allowing for a detailed analysis of the age of coins in circulation. This analysis gives insights into the behavior of Bitcoin holders and their potential impact on the market.</p><p>Supply Last Active is a metric that categorizes bitcoins based on the last time they were moved in a transaction. This categorization provides a snapshot of investor sentiment and behavior:</p><p>Supply Last Active 1+ Yrs Ago (🔴): These are coins that haven’t moved in the last year. A rise in this metric indicates a growing number of long-term holders or “HODLers.” These investors believe in Bitcoin’s long-term value proposition and are less likely to sell in the short term.</p><p>Supply Last Active 2+ Yrs Ago (🟠), 3+ Yrs Ago (🟢), and 5+ Yrs Ago (🔵): These metrics further segment the long-term holders. An increase in these metrics can indicate a strengthening conviction among investors, while a decrease might suggest that long-held coins are being sold or moved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYsgNvAwbiuIMqbQe88BwQ.png" /></figure><p>On the flip side, coins that have transacted recently are termed as ‘young coins’.</p><p>Supply Last Active &lt; 6-months: These are coins that have moved in the last six months. An increase in this metric can indicate heightened trading activity, possibly due to new entrants in the market or existing investors trading their holdings.</p><p><strong>Two primary events typically lead to a surge in young coin volumes:</strong></p><p>Bull Markets: During bullish phases, long-term investors might decide to realize profits, leading to older coins becoming young again.</p><p>Capitulation Events: In times of market panic, coins of all ages might be sold, leading to a spike in young coin volumes.</p><p>Understanding the dynamics between old and young coins can provide insights into market sentiment. A rising percentage of old coins suggests a growing hodler base, which can be a bullish indicator. Conversely, a significant increase in young coins might indicate potential selling pressure.</p><h3>5. Lost Coins: A Deep Dive:</h3><p>Bitcoin’s decentralized nature and cryptographic security come with a unique challenge: coins can be lost forever if users lose access to their private keys. Over the years, a significant number of bitcoins have been deemed ‘lost’ due to various reasons.</p><p><strong>Probably Lost Supply:</strong> This refers to the so-called “zombie coins.” These are coins that have remained inactive since the launch of the first BTC exchange in July 2010. While there’s a possibility that these coins might still be spent, the longer they remain inactive, the higher the likelihood that they are lost. This category also includes the “Patoshi” coins, which have never been moved and are believed to be owned by Bitcoin’s mysterious creator, Satoshi Nakamoto.</p><p><strong>Provably Lost Supply:</strong> These are bitcoins that are verifiably lost and can never be spent. They fall into one of the following categories:</p><p><strong>Unclaimed Miner Rewards:</strong> Miners are allowed to claim less than the specified block subsidy reward, leading to these unclaimed rewards being lost.</p><p><strong>BTC sent to Burn Addresses:</strong> These are addresses whose private keys are provably unowned, making the bitcoins sent to them irretrievable.</p><p><strong>BTC sent to ‘OP_RETURN’:</strong> This is a script opcode used primarily for storing data on the blockchain. Coins sent to this opcode are provably unspendable as they don’t get added to the UTXO set.</p><figure><img alt="Bitcoin Lost Supply Chart" src="https://cdn-images-1.medium.com/max/1024/1*wK9_yOrY5mexy6OCL_DMVQ.png" /></figure><p>Estimates suggest that between 3 to 4 million bitcoins are potentially lost forever. This means that out of the 21 million maximum supply, only around 17–18 million bitcoins are effectively in circulation. This realization underscores Bitcoin’s scarcity, making it even more valuable. The concept of lost coins is crucial in understanding Bitcoin’s effective circulating supply. While the theoretical maximum supply of Bitcoin is 21 million, the actual number of bitcoins available for use is significantly lower due to these lost coins. This inherent scarcity, combined with increasing demand, is a fundamental driver of Bitcoin’s value proposition.</p><h3>6. Supply in Profit/Loss:</h3><p>Every Bitcoin transaction is recorded on the blockchain, allowing for a detailed analysis of when each coin was last moved. By comparing this with the price at the time of the last movement, one can determine whether a coin is currently in profit or loss.</p><p><strong>Pricestamping of UTXOs:</strong> This process involves assigning a price to a UTXO (Unspent Transaction Output) based on the time it was created. This price is assumed to be the acquisition cost of the coin.</p><p>By comparing the pricestamp of each UTXO with the current price, one can categorize the supply into:</p><p><strong>Supply in Profit:</strong> Coins that were last moved when the price was lower than the current price.</p><p><strong>Supply in Loss:</strong> Coins that were last moved when the price was higher than the current price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mKvXQ1Mnl3xy20Q-eDvGXQ.png" /></figure><p>Large shifts in the Supply in Profit/Loss, especially with relatively small price changes, can indicate significant volumes of coins were transacted around that price region. This is typical after extended market consolidation periods where many coins change hands. Understanding these dynamics can provide insights into market sentiment and potential future price movements.</p><h3>7. Network Security and Decentralization:</h3><p>Bitcoin’s security is paramount to its value and trustworthiness. The network’s security is maintained by miners who use computational power to validate and add transactions to the blockchain. This computational power, measured in hashes per second, ensures that the network remains resistant to attacks and tampering.</p><p><strong>Bitcoin Hashrate:</strong> As of September 16, 2023, the Bitcoin network boasts a staggering hashrate of 502.11 EH/s (ExaHash per second), which equates to 502,108,461,546,938,400,000 hashes every second. This immense computational power is a testament to the decentralized nature and robustness of the Bitcoin network. For context, the combined computational power of tech giants like Meta, Amazon, Google, Microsoft, and Apple pales in comparison to the Bitcoin network, making it virtually unhackable.</p><p>The Bitcoin hashrate represents the number of hashes being generated by Bitcoin miners trying to solve the current Bitcoin block or any given block. As the Bitcoin network hashrate increases, it signifies more miners are participating, further strengthening the network’s security and decentralization.</p><p><strong>Hashrate Units:</strong> The Bitcoin hashrate is so vast that it’s measured in units ranging from H/s (one hash per second) to YH/s (one septillion hashes per second). The current hashrate of 502.11 EH/s falls into the ExaHash category, which represents one quintillion hashes per second.</p><figure><img alt="Bitcoin Hashrate Chart" src="https://cdn-images-1.medium.com/max/1024/1*g8GzDtK8poLlL3dvu3Ef7Q.png" /></figure><p>It’s essential to understand that the Bitcoin hashrate doesn’t determine how quickly blocks are solved. This timing, known as the block time, is governed by the Bitcoin mining difficulty, which adjusts to keep block solutions at a consistent timeframe.</p><p>Significance: The unparalleled hashrate of the Bitcoin network, combined with its decentralized nature, ensures that no single entity can control or tamper with the network. Potential threats, such as 51% attacks, are rendered almost impossible due to the sheer computational power required. As more miners join the network, its security and decentralization are further reinforced, making Bitcoin one of the most secure digital assets in existence.</p><h3>8. The Potential Impact of Major Firms Entering the Bitcoin Market:</h3><p><strong>Brief Overview of the Significance of Bitcoin Spot ETFs:</strong></p><p>Exchange-Traded Funds (ETFs) have long been a staple in traditional financial markets, allowing investors to buy a basket of assets without having to purchase each one individually. A Bitcoin spot ETF, specifically, would track the price of Bitcoin directly and would involve the actual purchase of the cryptocurrency. This means that as more investors buy into the ETF, more Bitcoin would be purchased on the open market, potentially driving up demand and, subsequently, the price.</p><p><strong>Potential Influx of Capital Due to Bitcoin ETFs:</strong></p><p>The entry of major financial firms into the Bitcoin market via spot ETFs can lead to a significant influx of capital. These firms, with their vast resources and client bases, can introduce a new segment of institutional and retail investors to Bitcoin. This not only provides a more straightforward and regulated way for investors to gain exposure to Bitcoin but also enhances the legitimacy and acceptance of the cryptocurrency in traditional financial circles.</p><p><strong>Table and Analysis by </strong><a href="https://twitter.com/invest_answers"><strong>Invest Answers</strong></a><strong> Detailing the Impact of Major Firms on Bitcoin’s Price:</strong></p><figure><img alt="Bitcoin ETF Impact on Price" src="https://cdn-images-1.medium.com/max/1024/1*s-XzuOUTXlXC6BixbKO7jw.jpeg" /></figure><p>The entry of major firms and the establishment of Bitcoin spot ETFs could act as a catalyst, driving unprecedented demand and capital inflow into the Bitcoin market. The above table showcases the potential impact of these major firms entering the Bitcoin market. If all the listed firms were to allocate a portion of their AUM to Bitcoin, the cumulative effect could be monumental. The potential future price of Bitcoin, as indicated, could see significant growth, offering substantial returns on investment while solidifying its position as a premier investment asset.</p><h3>9. Conclusion:</h3><p>Bitcoin’s journey since its inception in 2009 has been nothing short of remarkable. From being an obscure digital currency to becoming the world’s most recognized and valuable cryptocurrency, its trajectory has been meteoric. The upcoming 2024 halving event is poised to mark another pivotal chapter in Bitcoin’s illustrious history. With its unique supply dynamics, surging demand, and unparalleled security, Bitcoin stands out as a revolutionary asset in the financial realm. Its potential post-halving implications, combined with the anticipated influx of capital from major firms and the imminent approval of Bitcoin spot ETFs, further solidify its position as a store of value and a hedge against traditional financial systems. For those who recognize the signs, the opportunity to front-run the spot ETF approval is now, presenting one of the greatest investment opportunities of our time.</p><p>Connect with me on <a href="https://twitter.com/KeithDumont3">X</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb81bfac6d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Fungible Token on Sui: A Step-by-Step Guide]]></title>
            <link>https://medium.com/@ksdumont/creating-a-fungible-token-on-sui-a-step-by-step-guide-d5484b4a77ee?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5484b4a77ee</guid>
            <category><![CDATA[sui]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[fungible-tokens]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[movelang]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Fri, 16 Jun 2023 17:21:22 GMT</pubDate>
            <atom:updated>2023-06-16T17:21:22.677Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rw9b2zZgpcrqoplj" /><figcaption>Photo by <a href="https://unsplash.com/ko/@shubzweb3?utm_source=medium&amp;utm_medium=referral">Shubham&#39;s Web3</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Introduction:</h4><p>Creating a fungible token on the Sui platform allows developers to build their own custom digital currencies with specific properties and functionalities. In this tutorial, we will walk through the process of creating a fungible token called SUPRA, with a ticker symbol of $SUP, and a total supply of 1,000,000 tokens. We will leverage the power of Sui’s coin module and the <a href="https://examples.sui.io/basics/one-time-witness.html">One Time Witness</a> pattern to achieve this. Let’s get started!</p><h4>Prerequisites:</h4><p>Before we begin, ensure that you have the Sui platform installed and set up on your machine. You can find the installation instructions in the official Sui documentation <a href="https://docs.sui.io/build/install">here</a>.</p><h4>Step 1: Setting up the Project</h4><p>Create a new project folder for our SUPRA token. Open your terminal and navigate to the desired location for your project. Run the following command:</p><pre>sui move new fungible_tokens</pre><p>This will create a new project folder named “fungible_tokens” with the necessary files and folder structure.</p><h4>Step 2: Defining the Token Module</h4><p>Inside the “fungible_tokens” project folder, navigate to the “src” directory and create a new file called “supra.move”. This file will contain the module definition for our SUPRA token. Open the “supra.move” file in a text editor and add the following code:</p><pre>module fungible_tokens::supra {<br>    use std::option;<br>    use sui::coin;<br>    use sui::transfer;<br>    use sui::tx_context::{Self, TxContext};<br><br>    // Name matches the module name, but in UPPERCASE<br>    struct SUPRA has drop {}<br><br>    // Module initializer is called once on module publish.<br>    // A treasury cap is sent to the publisher, who then controls minting and burning.<br>    fun init(witness: SUPRA, ctx: &amp;mut TxContext) {<br>        let (treasury, metadata) = coin::create_currency(witness, 9, b&quot;SUP&quot;, b&quot;SUPRA&quot;, b&quot;&quot;, option::none(), ctx);<br>        transfer::public_freeze_object(metadata);<br>        transfer::public_transfer(treasury, tx_context::sender(ctx))<br>    }<br><br>    // Manager can mint new SUPRA tokens<br>    public entry fun mint(<br>        treasury: &amp;mut coin::TreasuryCap&lt;SUPRA&gt;, amount: u64, recipient: address, ctx: &amp;mut TxContext<br>    ) {<br>        coin::mint_and_transfer(treasury, amount, recipient, ctx)<br>    }<br><br>    // Manager can burn SUPRA tokens<br>    public entry fun burn(treasury: &amp;mut coin::TreasuryCap&lt;SUPRA&gt;, coin: coin::Coin&lt;SUPRA&gt;) {<br>        coin::burn(treasury, coin);<br>    }<br>}</pre><p>In this code snippet, we define the module fungible_tokens::supra and declare the SUPRA coin type using the SUPRA struct. The init function is the module initializer, which is called once during module publish. Inside the init function, we use the coin::create_currency function to create the SUPRA currency. We pass the SUPRA witness as the first argument, followed by the desired decimal places (9 in this case), the ticker symbol (b”SUP”), the token name (b&quot;SUPRA&quot;), an empty icon URL (b&quot;&quot;), and an optional metadata (which we set to option::none()). After creating the currency, we freeze the metadata object and transfer the treasury to the transaction sender.</p><p>Additionally, we define the mint and burn functions as public entry points. The mint function allows the manager to mint new SUPRA tokens by calling coin::mint_and_transfer, passing the treasury, the desired amount, the recipient&#39;s address, and the transaction context. The burn function allows the manager to burn existing SUPRA tokens by calling coin::burn, passing the treasury and the coin to be burned.</p><h4>Step 3: Deploying the SUPRA Token Module</h4><p>To deploy the SUPRA token module to the Sui blockchain, navigate to the root of the “fungible_tokens” project folder using the terminal. Run the following command:</p><pre>sui client publish --gas-budget 300000000</pre><p>This command will compile the Move code and deploy the SUPRA token module to the Sui blockchain. The output will display the package object ID and the TreasuryCap object ID, which we will need for future interactions.</p><h4>Step 4: Minting SUPRA Tokens</h4><p>To mint SUPRA tokens, we can use the Sui command-line interface (CLI) and invoke the mint function. Run the following command:</p><pre>sui client call --package &lt;PACKAGE_ID&gt; --module supra --function mint --args &lt;TREASURYCAP_ID&gt; 1000000 &lt;RECIPIENT_ADDRESS&gt; --gas-budget 300000000</pre><p>Replace &lt;PACKAGE_ID&gt; and &lt;TREASURYCAP_ID&gt; with the actual values obtained from the publish output. Specify the amount of tokens to mint (1,000,000 in this case) and provide the recipient address where the minted tokens will be sent.</p><h4>Step 5: Burning SUPRA Tokens</h4><p>To burn SUPRA tokens, we use the Sui CLI and invoke the burn function. Run the following command:</p><pre>sui client call --package &lt;PACKAGE_ID&gt; --module supra --function burn --args &lt;TREASURYCAP_ID&gt; &lt;Coin Object ID&gt; --gas-budget 3000</pre><p>Replace &lt;Coin Object ID&gt; with the actual object ID of the COIN&lt;SUPRA&gt; token that you want to burn.</p><h4>Step 6: Conclusion</h4><p>Congratulations! You have successfully created a fungible token called SUPRA on the Sui platform. You have learned how to leverage the coin module and the One Time Witness pattern to mint and burn tokens. This opens up a wide range of possibilities for creating custom digital currencies and implementing various token-based functionalities on the Sui blockchain.</p><p>Feel free to explore further and implement additional functions commonly used in fungible tokens, such as token transfers, balance inquiries, and token allowances. The knowledge and skills you have gained through this tutorial will serve as a solid foundation for building more complex blockchain applications on the Sui platform. If you run into any issues or have any questions, reach out to me on <a href="https://twitter.com/KeithDumont3">Twitter</a>.</p><p>Happy coding!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yRGIliXsOUdzJyjB" /><figcaption>Photo by <a href="https://unsplash.com/es/@ninjason?utm_source=medium&amp;utm_medium=referral">Jason Leung</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5484b4a77ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crafting Your First NFT: A Beginner’s Guide to smart contracts on the Sui Blockchain in Move]]></title>
            <link>https://medium.com/@ksdumont/crafting-your-first-nft-a-beginners-guide-to-smart-contracts-on-the-sui-blockchain-in-move-c0d9138e7eb8?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0d9138e7eb8</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[movelang]]></category>
            <category><![CDATA[sui]]></category>
            <category><![CDATA[move]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Sat, 13 May 2023 20:15:14 GMT</pubDate>
            <atom:updated>2023-05-29T15:58:40.521Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6wTz2fKVUhkObXLW" /><figcaption>Photo by <a href="https://unsplash.com/@turnlip19?utm_source=medium&amp;utm_medium=referral">Jong Marshes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this tutorial, we will be publishing a simple Move smart contract onto the Sui Blockchain and interacting with it via the CLI to create and mint an NFT, as well as transfer it to another address. Let’s get started!</p><h4>Step 1: Environment setup</h4><p>Sui requires Rust and Cargo (Rust’s package manager) on all supported operating systems. Use the following command to install Rust and Cargo on macOS or Linux:</p><pre>curl --proto &#39;=https&#39; --tlsv1.2 -sSf https://sh.rustup.rs | sh</pre><p>Install Sui Binaries:</p><pre>cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui</pre><p>This may take a while. If you run into any issues here, please refer to the Sui docs <a href="https://docs.sui.io/build/install">here</a>.</p><p>To confirm that Sui installed correctly, type sui and press Enter. You should see a message about the Sui version installed and help for using Sui commands.</p><h4>Step 2: Configure the SUI Client</h4><p>To connect the Sui client to a network, run the following command:</p><pre>sui client</pre><p>If you receive the sui-client help output in the console, you already have a client.yaml file. The first time you start Sui client without having a client.yaml file, the console will display the following message:</p><pre>Config file [&quot;&lt;PATH-TO-FILE&gt;/client.yaml&quot;] doesn&#39;t exist, do you want to connect to a Sui Full node server [y/N]?</pre><p>Press <strong>y</strong> and then press <strong>Enter</strong>. The process then requests the RPC server URL:</p><pre>Sui Full node server URL (Defaults to Sui Devnet if not specified) :</pre><p>Press <strong>Enter</strong> to connect to Sui Devnet.</p><p>The console should then display a prompt to generate a new address:</p><pre>Select key scheme to generate keypair (0 for ed25519, 1 for secp256k1, 2 for secp256r1):</pre><p>Press <strong>0 </strong>and then press <strong>Enter</strong>.</p><p>This will output the address and a mnemonic phrase which you should backup and keep safe. This is essentially your private key. Sui returns a message similar to the following.</p><pre>Generated new keypair for address with scheme &quot;ed25519&quot; [0xb9c83a8b40d3263c9ba40d551514fbac1f8c12e98a4005a0dac072d3549c2442]<br>Secret Recovery Phrase : [cap wheat many line human lazy few solid bored proud speed grocery raise erode there idea inform culture cousin shed sniff author spare carpet]</pre><p>You can check your active address via sui client active-address and switch to a new address via sui client switch --address [ADDRESS]</p><h4>Step 3: Request SUI Tokens through cURL</h4><p>Use the following cURL command to request tokens directly from the faucet server:</p><pre>curl --location --request POST &#39;https://faucet.devnet.sui.io/gas&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--data-raw &#39;{<br>    &quot;FixedAmountRequest&quot;: {<br>        &quot;recipient&quot;: &quot;&lt;YOUR SUI ADDRESS&gt;&quot;<br>    }<br>}&#39;</pre><p>Make sure to paste your active address where it says &lt;YOUR SUI ADDRESS&gt;</p><p>You can check your balance via sui client gas, the output should look something like this:</p><pre>                             Object ID                              |  Gas Value<br>----------------------------------------------------------------------------------<br> 0x942828410188f554c6436ee26eb50b2155864969135a91cc07f93f1f9255f1e8 | 10000000000</pre><h4>Step 4: Writing our first smart contract in Move</h4><p>Create a new move package: sui move new sui_nft. This creates a new folder with a <strong>Move.toml </strong>configuration file and an empty <strong>sources/ </strong>folder. Navigate to the <strong>sui_nft </strong>directory and open it up in a code editor (such as VSCode). Inside the sources directory, create a new file called <strong>nft.move</strong></p><p>Inside this file, create a new module, which should look like this:</p><pre>module sui_nft::nft {}</pre><p>Next, we will import the necessary modules at the top of this file:</p><pre>module sui_nft::nft {<br>  use sui::url::{Self, Url};<br>  use std::string;<br>  use sui::object::{Self, UID};<br>  use sui::transfer;<br>  use sui::tx_context::{Self, TxContext};<br>}</pre><p>Next, we will define our NFT struct. This contains the unique ID of the NFT, its name, description, and URL. You can also add any custom attributes or properties here.</p><pre>  struct NFT has key, store {<br>    id: UID, <br>    name: string::String, <br>    description: string::String,<br>    url: Url,<br>    // Add any custom attributes here<br>  }</pre><p>Now let’s create the <strong>mint</strong> function. This will create and mint a new NFT. We start by defining the function using the <strong>public entry fun</strong> keywords, followed by the function name, input parameters, and a mutable reference to the transaction context. Inside the function, we create a new NFT using the input parameters and the NFT struct. We then get the sender’s address using the transaction context and transfer the NFT to them using the <strong>transfer::public_transfer</strong> function.</p><pre>  public entry fun mint(name: vector&lt;u8&gt;, description: vector&lt;u8&gt;, url: vector&lt;u8&gt;, ctx: &amp;mut TxContext) {<br>    // create the new NFT<br>    let nft = NFT {<br>      id: object::new(ctx),<br>      name: string::utf8(name),<br>      description: string::utf8(description),<br>      url: url::new_unsafe_from_bytes(url),<br>    };<br>    // mint and send the NFT to the caller<br>    let sender = tx_context::sender(ctx);<br>    // transfer the NFT to the caller<br>    transfer::public_transfer(nft, sender);<br>  }</pre><p>Finally, we will create the <strong>transfer</strong> function, which will allow us to transfer our NFT to another address. This function takes in an NFT and a recipient address as input parameters. Inside the function, we call the “transfer::transfer” function to transfer the NFT to the recipient.</p><pre>  // transfer an NFT to another address<br>  public entry fun transfer(nft: NFT, recipient: address) {<br>        transfer::transfer(nft, recipient);<br>    }</pre><p>Here is the complete code:</p><pre>module sui_nft::nft {<br><br>  use sui::url::{Self, Url};<br>  use std::string;<br>  use sui::object::{Self, UID};<br>  use sui::transfer;<br>  use sui::tx_context::{Self, TxContext};<br> <br>  // A simple NFT that can be minted by anyone<br>  struct NFT has key, store {<br>    // unique id of the NFT<br>    id: UID, <br>    // name of the NFT<br>    name: string::String, <br>    // description of the NFT<br>    description: string::String,<br>    // url of the NFT image<br>    url: Url,<br>    // Add any custom attributes here<br>  }<br><br>   // create and mint a new NFT<br>  public entry fun mint(name: vector&lt;u8&gt;, description: vector&lt;u8&gt;, url: vector&lt;u8&gt;, ctx: &amp;mut TxContext) {<br>    // create the new NFT<br>    let nft = NFT {<br>      id: object::new(ctx),<br>      name: string::utf8(name),<br>      description: string::utf8(description),<br>      url: url::new_unsafe_from_bytes(url),<br>    };<br>    // mint and send the NFT to the caller<br>    let sender = tx_context::sender(ctx);<br>    // transfer the NFT to the caller<br>    transfer::public_transfer(nft, sender);<br>  }<br>  // transfer an NFT to another address<br>  public entry fun transfer(nft: NFT, recipient: address) {<br>        transfer::transfer(nft, recipient);<br>    }<br>}</pre><h4>Step 5: Compile and deploy our NFT smart contract</h4><p>We can compile our code using the Move compiler and deploy it to the Sui blockchain. Once it’s deployed, we can call the <strong>mint</strong> function to create and mint a new NFT. We can then call the <strong>transfer</strong> function to transfer the NFT to another address.</p><p>In the current directory, run: sui move build</p><p>Assuming there are no errors, let’s publish our package to the Sui devnet. Make sure you are in the <strong>sui_nft </strong>directory and run:</p><pre>sui client publish --gas-budget 50000000000</pre><p>If the transaction was a success, you should notice a similar output to the following:</p><pre>Status : Success<br>Created Objects:<br>  - ID: 0x1d326c98b97e1ac2d8ff1d2a906226c298727fb7097450334acabbb5364209dc , Owner: Immutable<br>  - ID: 0x5fd9bb05e1f290415ee6ce835040740765ceb01e1271f4e512b6ba800c540231 , Owner: Account Address ( 0xccc82b27177bbae485aab66d4bd601e529963c94cfffc02ef4cbf38a1df3c9a0 )<br>Mutated Objects:<br>  - ID: 0x942828410188f554c6436ee26eb50b2155864969135a91cc07f93f1f9255f1e8 , Owner: Account Address ( 0xccc82b27177bbae485aab66d4bd601e529963c94cfffc02ef4cbf38a1df3c9a0 )</pre><p>There are 2 created objects and 1 mutated object. The first created object is the contract itself. You can tell since the Owner is immutable in this case. You can paste the <strong>ID</strong> in the <a href="https://suiexplorer.com/">Sui Explorer</a> and you should be able to see the <strong>mint</strong> and <strong>transfer</strong> functions.</p><p>The mutated object is the Gas object which is where your Sui tokens are stored. It was mutated as we needed some gas to publish this package.</p><h4>Step 6: Interacting with our smart contract</h4><p>You can interact with the smart contract directly in the Sui Explorer, but I think it’s more fun to do it from the command line.</p><p>Let’s call the mint function:</p><pre>sui client call --package 0x1d326c98b97e1ac2d8ff1d2a906226c298727fb7097450334acabbb5364209dc --module nft --fu<br>nction mint --args &quot;supraNFT&quot; &quot;This is my first NFT on the SUI Blockchain&quot; &quot;https://ibb.co/9YqmL77&quot; --gas-budget 5000000</pre><p>Note: make sure to paste your package id.</p><p>If all goes well, you should see a response similar to this:</p><pre>Status : Success<br>Created Objects:<br>  - ID: 0xbfb427c21432845b0abd5cdf3725477c2273db05d667df8d59ea91a2207b8bd1 , Owner: Account Address ( 0xccc82b27177bbae485aab66d4bd601e529963c94cfffc02ef4cbf38a1df3c9a0 )<br>Mutated Objects:<br>  - ID: 0x942828410188f554c6436ee26eb50b2155864969135a91cc07f93f1f9255f1e8 , Owner: Account Address ( 0xccc82b27177bbae485aab66d4bd601e529963c94cfffc02ef4cbf38a1df3c9a0 )</pre><p>Copy the ID under ‘Created Objects’ and paste it into the Sui explorer and you should see your NFT.</p><p>Congratulations, you just minted your first NFT on Sui!</p><p>Let’s test out the transfer function, you will need another address to transfer to, so create one if you don’t have one already. You can do that by running sui client new-address in the command line. Save the new address you have just created and run:</p><pre>sui client call --package 0x1d326c98b97e1ac2d8ff1d2a906226c298727fb7097450334acabbb5364209dc --module nft --fu<br>nction transfer --args &quot;0xbfb427c21432845b0abd5cdf3725477c2273db05d667df8d59ea91a2207b8bd1&quot; &quot;0xdc815bacae75bd5f519851c18ec13c48ecd1235d566f73b51655baf3b6b340be&quot; --gas-budget 50000000</pre><p>Make sure to paste your package <strong>id</strong>, your NFT object <strong>id</strong>, and the recipient address that you just created. You should see something like this:</p><pre>Status : Success<br>Mutated Objects:<br>  - ID: 0x942828410188f554c6436ee26eb50b2155864969135a91cc07f93f1f9255f1e8 , Owner: Account Address ( 0xccc82b27177bbae485aab66d4bd601e529963c94cfffc02ef4cbf38a1df3c9a0 )<br>  - ID: 0xbfb427c21432845b0abd5cdf3725477c2273db05d667df8d59ea91a2207b8bd1 , Owner: Account Address ( 0xdc815bacae75bd5f519851c18ec13c48ecd1235d566f73b51655baf3b6b340be )</pre><p>The second mutated object should be the <strong>id</strong> of your NFT and the owner should now be the new address. You can paste the <strong>id</strong> or the address in the Sui explorer to confirm.</p><p>Feel free to reach out to me on <a href="https://twitter.com/KeithDumont3">twitter</a> if you have any questions or comments and please let me know if anything needs to be updated.</p><p>Happy coding!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D6eC0V3UuAK8_kji" /><figcaption>Photo by <a href="https://unsplash.com/@photoholgic?utm_source=medium&amp;utm_medium=referral">Photoholgic</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0d9138e7eb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SupraOracles’ VRF: The Simplest Way to Add Randomness in Your Smart Contracts]]></title>
            <link>https://medium.com/@ksdumont/supraoracles-vrf-the-simplest-way-to-add-randomness-in-your-smart-contracts-870a960d858?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/870a960d858</guid>
            <category><![CDATA[blockchain-oracle]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[solidity-tutorial]]></category>
            <category><![CDATA[vrf]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 22:40:53 GMT</pubDate>
            <atom:updated>2023-01-27T04:58:11.343Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vQfE_0EoKJ6fwPB8" /><figcaption>Photo by <a href="https://unsplash.com/@rihok?utm_source=medium&amp;utm_medium=referral">Riho Kroll</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Welcome to the world of smart contracts and decentralized applications, where trustless and unbiased randomness is a crucial component for many use cases. In this article, we will delve into the concept of Verifiable Random Functions (VRF) and why it is essential for various decentralized applications. We will also take a closer look at <a href="https://medium.com/u/784dec640f12">SupraOracles</a> and why they are the go-to choice for implementing VRFs in smart contracts. After trying all the available options in the market, I can confidently say that supra oracles is the easiest and most reliable way to implement a VRF in your smart contract. In this article, we will explain the concept of VRF, the use cases of oracles, and how to use SupraOracle’s VRF in your smart contract with an example. So, let’s get started!</p><h3>What are Verifiable Random Function Oracles?</h3><p>Verifiable Random Function (VRF) Oracles provide a way to generate random numbers that can be verified to be truly random. In contrast to a traditional random number generator, which only produces a random value, a VRF also produces a proof of the value’s randomness that can be verified by anyone. This is important in decentralized applications where randomness is essential for things like lotteries, gaming, and other use cases where fairness is important. Oracles act as a bridge between the blockchain network and the outside world by providing external data to the smart contract. These oracles can be integrated into smart contracts to provide a tamper-proof way to generate random numbers. The use of VRF Oracles provides a level of trust and transparency that is not possible with other methods of random number generation in a decentralized environment. For a deeper dive into why we need decentralized oracles, feel free to check out <a href="https://newsletter.banklesshq.com/p/why-we-need-decentralized-oracles">this</a> article.</p><p>This guide will walk you through the process of accessing the Supra VRF service from a smart contract, including the steps required to create the Supra Router Contract Interface, configure the Supra Router Contract address, request and receive random numbers, and validate the received numbers. By the end of this guide, you will have a solid understanding of how to use the Supra VRF service to generate random numbers in your smart contract and how to incorporate them into your application.</p><p>Before starting this tutorial, ensure that you have set up your development environment. I recommend using the <a href="https://remix-project.org/">Remix</a> Online IDE, it requires no setup and has a flexible, intuitive user interface.</p><p>Alright folks, grab your Solidity hat and let’s build a trustless, decentralized lottery using Supra Oracles’ VRF — Ready, set, code!</p><p><strong>Step 1: Import the SupraOracle contract</strong></p><pre>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.0;<br><br>interface ISupraRouter {<br>    function generateRequest(string memory _functionSig, uint8 _rngCount, uint256 _numConfirmations, uint256 _clientSeed) external returns (uint256);<br>}</pre><p>In this step, we import the SupraOracle contract’s interface, ISupraRouter. This interface contains the generateRequest() function which we will use to generate a random number.</p><p><strong>Step 2: Create the Lottery contract</strong></p><pre>contract Lottery {<br>    address supraAddress = 0x865F7C251724e89e6dADDba811a16D79e8101E86;<br>    ISupraRouter internal supraRouter;<br>    address public winner;<br>    address[] public participants;<br>    uint256 public generatedNonce;<br><br>    constructor() {<br>        supraRouter = ISupraRouter(supraAddress);<br>    }</pre><p>In this step, we create the Lottery contract and define the variables that will be used in the contract. The supraAddress variable is the address of the deployed SupraOracle contract, make sure to use the appropriate network address. Please refer <a href="https://supraoracles.com/docs/vrf1/network-addresses">here</a> for the SupraRouter Contract addresses of each network.supraRouter is an instance of the ISupraRouter interface that we imported earlier. winner is the address of the participant who will be randomly selected as the winner, participants is an array of addresses of all the participants, and generatedNonce is a unique number generated by the generateRequest() function.</p><p>In the constructor, we initialize the supraRouter variable by passing in the supraAddress variable.</p><p><strong>Step 3: Implement the </strong><strong>participate() function</strong></p><pre>    function participate() public payable{<br>        require(msg.value == .001 ether, &quot;Value must be equal to .001 ether&quot;);<br>        for (uint256 i = 0; i &lt; participants.length; i++) {<br>            if (participants[i] == msg.sender) {<br>                require(false, &quot;You have already participated.&quot;);<br>            }<br>        }<br>        participants.push(msg.sender);<br>    }</pre><p>In this step, we implement the participate() function which allows participants to join the lottery by sending a transaction to the contract. The require() statement checks that the value of the transaction is equal to 0.001 ether. The for loop checks if the participant has already joined the lottery and throws an error if they have. If the participant is eligible to join the lottery, their address is added to the participants array.</p><p><strong>Step 4: Implement the </strong><strong>generateRandomNumber() function</strong></p><pre>    function generateRandomNumber() public {<br>        require(participants.length &gt; 0, &quot;There are no participants to pick a winner from.&quot;);<br>        generatedNonce = supraRouter.generateRequest(&quot;pickWinner(uint256,uint256[])&quot;, 1, 1, 123);<br>    }</pre><p>This function is called when we want to generate a random number to pick the winner of the lottery. The first thing this function does is to check if there are any participants in the lottery by checking the length of the participants array. If there are no participants, it will return an error message saying &quot;There are no participants to pick a winner from.”</p><p>If there are participants, the function then calls the generateRequest() function from the ISupraRouter interface. This function takes in four arguments:</p><ol><li>_functionSig - a string that represents the signature of the callback function that will be called when the random number is generated. In our case, it is &quot;pickWinner(uint256,uint256[])&quot;</li><li>_rngCount - an integer representing the number of random numbers we want to generate. In our case, we want to generate 1 random number.</li><li>_numConfirmations - an integer representing the number of confirmations we want before the callback function is called. In our case, we want 1 confirmation.</li><li>_clientSeed - a uint256 representing the client seed that is used to generate the random number. In our case, we are using the value 123 as the client seed.</li></ol><p>The generateRequest() function returns a uint256 nonce, which is stored in the generatedNonce variable. The nonce is used to ensure the authenticity of the random number generated by the oracle.</p><p><strong>Step 5: Implement the </strong><strong>pickWinner() function</strong></p><pre>    function pickWinner(uint256 nonce, uint256[] memory rngList) external {<br>        require(msg.sender == supraAddress, &quot;only supra router can call this function&quot;);<br>        require(nonce == generatedNonce,&quot;Invalid nonce&quot;);<br>        uint256 randomIndex = rngList[0] % participants.length;<br>        winner = participants[randomIndex];<br>        payable (participants[randomIndex]).transfer(address(this).balance);<br>        participants = new address[](0);<br>    }</pre><p>Once the random number is generated, the pickWinner() function is called. It takes in two arguments:</p><ol><li>nonce - a uint256 that represents the nonce generated by the generateRequest() function</li><li>rngList - an array of uint256 that contains the random numbers generated by the oracle</li></ol><p>The first thing this function does is check that the address that is calling the function (stored in the special variable msg.sender) is the same as the contract’s designated supraAddress. This will ensure that only the Supra Router is able to call this function and prevent any unauthorized access. It then checks if the nonce passed in as an argument matches the generatedNonce variable. If the nonces do not match, it returns an error message saying &quot;Invalid nonce&quot;.</p><p>The function then calculates a random index by taking the first element of the rngList array, which is the generated random number, and using the modulus operator to get the remainder when divided by the number of participants. This gives us a random index that corresponds to a participant in the participants array.</p><p>The address at this random index is then stored in the winner variable, and the balance of the contract is transferred to this address using the transfer() function. Finally, the participants array is reset to an empty array with participants = new address[](0);</p><p>Using the SupraOracle VRF in your smart contracts is a simple and efficient way to generate random numbers that are verifiable and tamper-proof. The process of integrating the SupraOracle VRF into your smart contract is simple and straightforward, as demonstrated in this tutorial. By following the steps outlined in this tutorial, you can easily implement the SupraOracle VRF and add an extra layer of security and trust to your smart contract applications. The SupraOracle VRF is a great option for developers looking for an easy and reliable solution for their smart contract needs.</p><p>It’s worth noting that, it’s important to test your smart contract thoroughly before deploying it to the mainnet, as small syntax errors can have major consequences.</p><p>Below you can see the code in full:</p><pre>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.0;<br><br>interface ISupraRouter {<br>    function generateRequest(string memory _functionSig, uint8 _rngCount, uint256 _numConfirmations, uint256 _clientSeed) external returns (uint256);<br>}<br><br>contract Lottery {<br>    address supraAddress = 0x865F7C251724e89e6dADDba811a16D79e8101E86;<br>    ISupraRouter internal supraRouter;<br>    address public winner;<br>    address[] public participants;<br>    uint256 public generatedNonce;<br><br>    constructor() {<br>        supraRouter = ISupraRouter(supraAddress);<br>    }<br><br>    function participate() public payable{<br>        require(msg.value == .001 ether, &quot;Value must be equal to .001 ether&quot;);<br>        for (uint256 i = 0; i &lt; participants.length; i++) {<br>            if (participants[i] == msg.sender) {<br>                require(false, &quot;You have already participated.&quot;);<br>            }<br>        }<br>        participants.push(msg.sender);<br>    }<br><br>    function generateRandomNumber() public {<br>        require(participants.length &gt; 0, &quot;There are no participants to pick a winner from.&quot;);<br>        generatedNonce = supraRouter.generateRequest(&quot;pickWinner(uint256,uint256[])&quot;, 1, 1, 123);<br>    }<br><br>    function pickWinner(uint256 nonce, uint256[] memory rngList) external {<br>        require(msg.sender == supraAddress, &quot;only supra router can call this function&quot;);<br>        require(nonce == generatedNonce,&quot;Invalid nonce&quot;);<br>        uint256 randomIndex = rngList[0] % participants.length;<br>        winner = participants[randomIndex];<br>        payable (participants[randomIndex]).transfer(address(this).balance);<br>        participants = new address[](0);<br>    }<br><br>    function getAllParticipants() public view returns (address[] memory) {<br>        return participants;<br>    }<br><br>    function getParticipantCount() public view returns (uint256) {<br>        return participants.length;<br>    }<br>}</pre><p>Thank you for following along. Feel free to reach out to me on <a href="https://twitter.com/KeithDumont3">Twitter</a>, if you have any questions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=870a960d858" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain Basics: A Pythonic Guide for the Curious Mind]]></title>
            <link>https://medium.com/@ksdumont/blockchain-basics-a-pythonic-guide-for-the-curious-mind-71488d54bc19?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/71488d54bc19</guid>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Mon, 19 Dec 2022 01:25:53 GMT</pubDate>
            <atom:updated>2022-12-19T01:25:53.782Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building Your Own Blockchain from Scratch with Python</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*F9scSRH3H--g8hfwjXAdqg.jpeg" /></figure><p>Welcome to the exciting world of blockchains! Whether you’re a seasoned developer or just starting out, blockchains can be a fun and rewarding topic to explore. And what better way to dive into this world than by building your own blockchain using Python? In this article, we’ll take a step-by-step approach to building a basic blockchain from scratch. You’ll learn how blockchains work, how to create and mine blocks, and how to add transactions to the chain.</p><p>One common myth about blockchains is that they are overly complex and hard to understand. However, at their core, blockchains are simply distributed and decentralized databases with no single point of failure. While there are certainly more advanced concepts and technologies that build upon the basic blockchain structure, it’s important to remember that blockchains are essentially just a way to store and verify data in a secure and transparent manner.</p><p>So grab your favorite Python IDE and let’s get coding!</p><p><a href="https://github.com/ksdumont/blockchain">Here’s</a> a link to the repository if you prefer to view/download the code directly.</p><p>First, make sure you have the required libraries imported at the top of your file. The code uses the hashlib library to hash block data, the json library to serialize data, and the time library to get the current timestamp.</p><pre>import hashlib<br>import json<br>from time import time<br><br><br>class Block:<br>    def __init__(self, index, transactions, timestamp, previous_hash):<br>        self.index = index<br>        self.transactions = transactions<br>        self.timestamp = timestamp<br>        self.previous_hash = previous_hash<br>        self.nonce = 0<br>        self.hash = self.compute_hash()<br><br>    def compute_hash(self):<br>        &quot;&quot;&quot;<br>        A function that returns the hash of the block contents.<br>        &quot;&quot;&quot;<br>        block_string = json.dumps(self.__dict__, sort_keys=True)<br>        return hashlib.sha256(block_string.encode()).hexdigest()<br><br>    def mine_block(self, difficulty):<br>        &quot;&quot;&quot;<br>        A function that mines a new block.<br>        &quot;&quot;&quot;<br>        while self.compute_hash()[:difficulty] != &#39;0&#39; * difficulty:<br>            self.nonce += 1<br>        return self</pre><p>The Block class is responsible for representing a block in the blockchain. It has four attributes: index, transactions, timestamp, and previous_hash. The index is the position of the block in the chain, the transactions is a list of transactions included in the block, the timestamp is the time at which the block was created, and the previous_hash is the hash of the previous block in the chain. The <a href="https://101blockchains.com/nonce-in-blockchain/">nonce</a> attribute is an additional field that is used in the mining process to help find a valid hash for the block. The hash attribute is the hash of the block data.</p><p>The <em>__init__</em> method is the constructor for the Block class. It initializes the attributes of the block with the provided values and then calls the <em>compute_hash</em> method to compute the hash of the block.</p><p>The <em>compute_hash</em> method returns the hash of the block data by first serializing the block’s data using the json library and then hashing it using the <a href="https://www.simplilearn.com/tutorials/cyber-security-tutorial/sha-256-algorithm">sha256</a> algorithm from the hashlib library.</p><p>The <em>mine_block</em> method is responsible for mining a new block by finding a valid hash for it. It does this by repeatedly incrementing the nonce attribute and computing the hash of the block until it finds a hash that starts with a certain number of zeros. The number of zeros is determined by the difficulty argument, which controls the difficulty and speed of the mining process.</p><p>The Blockchain class is responsible for representing the entire blockchain. It has three attributes: difficulty, unconfirmed_transactions, and chain.</p><pre>class Blockchain:<br>    def __init__(self):<br>        self.difficulty = 2  # Adjust the difficulty to control mining speed.<br>        self.unconfirmed_transactions = []<br>        self.chain = [self.create_genesis_block()]<br><br>    def create_genesis_block(self):<br>        &quot;&quot;&quot;<br>        A function to generate genesis block.<br>        &quot;&quot;&quot;<br>        return Block(0, [], time(), &quot;0&quot;)<br><br>    def add_block(self, block, proof):<br>        &quot;&quot;&quot;<br>        A function to add a new block to the chain.<br>        &quot;&quot;&quot;<br>        previous_hash = self.chain[-1].hash<br>        if previous_hash != block.previous_hash:<br>            return False<br><br>        if not self.is_valid_proof(block, proof):<br>            return False<br><br>        self.chain.append(block)<br>        return True<br><br>    def is_valid_proof(self, block, block_hash):<br>        &quot;&quot;&quot;<br>        Check if block_hash is valid hash of block and satisfies<br>        the difficulty criteria.<br>        &quot;&quot;&quot;<br>        return (block_hash.startswith(&#39;0&#39; * self.difficulty) and<br>                block_hash == block.compute_hash())<br><br>    def proof_of_work(self, block):<br>        &quot;&quot;&quot;<br>        Function that tries different values of nonce to get a hash<br>        that satisfies our difficulty criteria.<br>        &quot;&quot;&quot;<br>        block.nonce = 0<br>        computed_hash = block.compute_hash()<br>        while not computed_hash.startswith(&#39;0&#39; * self.difficulty):<br>            block.nonce += 1<br>            computed_hash = block.compute_hash()<br><br>        return computed_hash<br><br>    def add_new_transaction(self, transaction):<br>        self.unconfirmed_transactions.append(transaction)<br><br>    def mine(self, difficulty):<br>        &quot;&quot;&quot;<br>        This function serves as an interface to add the pending<br>        transactions to the blockchain by adding them to the block<br>        and figuring out Proof Of Work.<br>        &quot;&quot;&quot;<br>        if not self.unconfirmed_transactions:<br>            return False<br><br>        last_block = self.chain[-1]<br>        new_block = Block(index=last_block.index + 1,<br>                          transactions=self.unconfirmed_transactions,<br>                          timestamp=time(),<br>                          previous_hash=last_block.hash)<br><br>        new_block.mine_block(difficulty)<br>        proof = self.proof_of_work(new_block)<br>        self.add_block(new_block, proof)<br>        self.unconfirmed_transactions = []<br>        return new_block.hash</pre><p>The Blockchain class has a constructor method called <em>__init__</em> which is called when you create a new Blockchain object. It initializes several instance variables:</p><p><em>difficulty</em>: This variable controls the mining speed by specifying the number of leading zeros that the hash of a new block must have. For example, if the difficulty is set to 2, it means that the hash of a new block must start with at least two zeros in order to be considered a valid proof of work. By adjusting the difficulty, you can control how fast new blocks can be added to the blockchain. A higher difficulty means that it will take longer to find a valid proof of work, so new blocks will be added more slowly. A lower difficulty means that it will be easier to find a valid proof of work, so new blocks will be added more quickly.</p><p><em>unconfirmed_transactions</em>: This is a list that stores transactions that have not yet been added to the blockchain.</p><p><em>chain</em>: This is a list that stores the blocks in the blockchain. It is initialized with a single block, the Genesis block, which is created by calling the create_genesis_block method. It does this by calling the Block constructor with default values for the index, transactions, timestamp, and previous_hash arguments.</p><p>The <em>add_block</em> method is used to add a new block to the blockchain. It takes two arguments: the block object to be added and the proof of work (i.e. the valid hash value). First, it checks that the <em>previous_hash</em> value of the new block matches the hash of the last block in the chain. If these hashes do not match, the method returns False. Otherwise, it calls the <em>is_valid_proof</em> method to verify that the proof is a valid hash for the given block. If the proof is not valid, the method returns False. Otherwise, the block is added to the chain and the method returns True.</p><p>The <em>is_valid_proof</em> method is used to verify that the proof is a valid hash for the given block. It does this by checking that the proof starts with a certain number of zeros (determined by the difficulty variable) and that the proof matches the hash of the block as computed by the <em>compute_hash</em> method. If both of these conditions are met, the method returns True, otherwise it returns False.</p><p>The <em>proof_of_work</em> method is used to find a valid nonce value for a block that results in a hash that meets the difficulty criteria. It does this by computing the hash of the block. If the computed hash does not start with the required number of zeros (determined by the difficulty variable), the nonce value is incremented and the hash is recomputed. This process is repeated until a valid hash is found, at which point the method returns the valid hash.</p><p>The <em>add_new_transaction</em> method is used to add a new transaction to the list of unconfirmed transactions. It takes a single transaction argument and appends it to the unconfirmed_transactions list.</p><p>The <em>mine</em> method is used to add the pending transactions to the blockchain by creating a new block and finding the proof of work for the block. It takes a single difficulty argument that specifies the number of leading zeros that the hash of the new block must have. First, it checks that there are pending transactions to be added to the blockchain. If there are no pending transactions, the method returns False. Otherwise, it creates a new Block object with the pending transactions, sets the previous hash to the hash of the last block in the chain, and assigns the current timestamp to the new block. It then calls the mine_block method on the new block, passing in the difficulty level, which performs the Proof of Work (PoW) algorithm on the new block. After the mine_block method completes, the method calls the <em>proof_of_work</em> method, passing in the new block as a parameter. The <em>proof_of_work</em> method is used to verify that the PoW algorithm was performed correctly on the new block. If the <em>proof_of_work</em> method returns a valid result, the mine method adds the new block to the chain using the <em>add_block</em> method and clears the list of unconfirmed transactions. Finally, the method returns the hash of the new block.</p><p>Wow, that was a mouthful. Great job! If you’re still with me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*ZVQ_zAFSj9RHwFaXZTJT4g.jpeg" /></figure><p>Lastly, I implemented a <em>main</em> method to test it all out.</p><pre>from blockchain import *<br><br><br>def main():<br>    # Create a blockchain<br>    blockchain = Blockchain()<br><br>    transaction1 = {&quot;sender&quot;: &quot;Alice&quot;, &quot;receiver&quot;: &quot;Bob&quot;, &quot;amount&quot;: 10}<br>    transaction2 = {&quot;sender&quot;: &quot;Bob&quot;, &quot;receiver&quot;: &quot;Charlie&quot;, &quot;amount&quot;: 5}<br>    transaction3 = {&quot;sender&quot;: &quot;Charlie&quot;, &quot;receiver&quot;: &quot;Alice&quot;, &quot;amount&quot;: 15}<br><br>    # Add some transactions to the blockchain<br>    blockchain.add_new_transaction(transaction1)<br>    blockchain.add_new_transaction(transaction2)<br>    blockchain.add_new_transaction(transaction3)<br><br>    # Mine a new block<br>    print(&quot;Mining a new block...&quot;)<br>    last_block_hash = blockchain.mine(difficulty=2)<br>    print(f&quot;Block mined: {last_block_hash}&quot;)<br><br>    # Print the current state of the blockchain<br>    print(&quot;Current blockchain:&quot;)<br>    for i, block in enumerate(blockchain.chain):<br>        print(f&quot;Block {i}:&quot;)<br>        print(f&quot;Hash: {block.hash}&quot;)<br>        print(f&quot;Transactions: {block.transactions}&quot;)<br>        print(f&quot;Timestamp: {block.timestamp}&quot;)<br>        print(f&quot;Previous hash: {block.previous_hash}&quot;)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>In the <em>main</em> method, the code creates a new instance of the Blockchain class and stores it in the blockchain variable. Then, it creates three transactions and adds them to the blockchain using the <em>add_new_transaction</em> method.</p><p>Next, the code mines a new block by calling the <em>mine</em> method on the blockchain object. The <em>mine</em> method adds the pending transactions to the blockchain and finds a valid proof of work (also known as mining). The difficulty parameter controls the mining speed.</p><p>Finally, the code prints the current state of the blockchain by iterating over the blocks of the blockchain object and prints the attributes of each block.</p><p>Thank you for reading this article. I hope it was easily understandable and that you enjoyed it. I enjoyed writing it and sharing my knowledge with you. If you have any questions or comments, please don’t hesitate to reach out to me on <a href="https://twitter.com/KeithDumont3">Twitter</a>. I’d be happy to help in any way that I can. Thank you again for taking the time to read this article, and I hope you have a great day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71488d54bc19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IBC: Because Sharing is Caring (Even Between Different Blockchains)]]></title>
            <link>https://medium.com/@ksdumont/ibc-because-sharing-is-caring-even-between-different-blockchains-e3b179d1b71b?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3b179d1b71b</guid>
            <category><![CDATA[cosmos]]></category>
            <category><![CDATA[ibc]]></category>
            <category><![CDATA[interoperability]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Sat, 17 Dec 2022 21:51:54 GMT</pubDate>
            <atom:updated>2022-12-17T21:51:54.452Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Solution To The Interchain Interoperability Problem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*epbh_nm2H97MIDTfaac7uA.png" /><figcaption>Welcome to the Cosmos! (<a href="https://tutorials.cosmos.network/academy/1-what-is-cosmos/">source</a>)</figcaption></figure><h3><strong>Interchain Interoperability Problem</strong></h3><p>The interchain interoperability problem is a critical issue facing the blockchain industry. In simple terms, it refers to the difficulty of different blockchain networks being able to communicate and interact with each other.</p><p>This lack of interoperability limits the potential of blockchain technology and hinders its widespread adoption. Without interoperability, different blockchain networks operate in silos, unable to share information or assets with one another.</p><p>There are several approaches being explored to solve the interchain interoperability problem; one notably being the inter-blockchain communication protocol (IBC).</p><h3><strong>Inter-Blockchain Communication</strong></h3><p>If you’re reading this, you’ve probably already heard of Cosmos. Cosmos is a decentralized network of independent parallel blockchains, each powered by the Cosmos Hub. The Cosmos Hub is the central hub of the Cosmos network, and it uses the inter-blockchain communication (IBC) protocol to enable interoperability between different blockchains <strong>within</strong> the Cosmos network.</p><p>The IBC protocol allows different blockchains within the Cosmos network to securely transfer assets and information between each other. This enables the creation of cross-chain applications and decentralized finance (DeFi) solutions that can operate across multiple chains within the Cosmos network.</p><p>The IBC protocol uses a standard set of rules and protocols to facilitate communication and asset transfer between different chains. This allows for interoperability without sacrificing the autonomy and sovereignty of each individual blockchain within the network. Pretty cool, I know!</p><p>Overall, the Cosmos network and the IBC protocol it uses provide a solution to the interchain interoperability problem by enabling seamless communication and asset transfer between different blockchains within the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zWc-ujIAID1s7wgmZRt4Qg.png" /><figcaption>Map of Zones (<a href="https://mapofzones.com/home?columnKey=ibcVolume&amp;period=24h">source</a>)</figcaption></figure><p>As you can see above, the Cosmos network is made up of Zones. Zones refer to the “application-specific blockchains” in the Cosmos network, you can check out the zones and their assets <a href="https://mapofzones.com/">here</a>. The Cosmos network is constructed as a Hub and Spoke architecture. Each Zone is a spoke connected to a hub. Hubs can be connected with other hubs. Together, the connected Hubs and Zones make up the Cosmos Network.</p><h3><strong>A High-level Overview of How IBC Works</strong></h3><p>Inter-blockchain communication (IBC) can be thought of as having two layers: the transport layer and the application layer.</p><p>The transport layer is responsible for establishing and maintaining the connection between different blockchain networks, as well as for facilitating the transfer of assets or data between them. It consists of a set of protocols that define how the connection is established and maintained, as well as the format of the messages that are exchanged between the networks.</p><p>The application layer is the layer that sits on top of the transport layer and is responsible for implementing the specific functionality that the IBC system is intended to provide. For example, if the IBC system is being used to implement a decentralized exchange, the application layer would contain the code that defines how the exchange works, including the rules for matching orders and executing trades.</p><p>Together, the transport and application layers form the IBC system, which enables communication and value transfer between different blockchain networks. The transport layer provides the underlying infrastructure for the system, while the application layer defines the specific use cases that the system is intended to support.</p><p>As mentioned earlier, this is a very high level overview of the IBC protocol. For a deeper dive into IBC, check out <a href="https://polymerlabs.medium.com/blockchain-bridges-101-a-guide-to-inter-blockchain-communication-ibc-3efc092770b1">this</a> article by <a href="https://medium.com/u/a96f18a679a4">Polymer Labs</a>.</p><p>I know what you’re thinking, Thats great and all, but if you can only connect with chains within the Cosmos Network that meet the IBC <a href="https://ibcprotocol.org/faq/#what-blockchains-are-compatible-with-ibc">compatibility requirements</a>, What about other chains that are not IBC-enabled such as Ethereum, Polygon or Cardano? Does this truly solve the interchain interoperability problem?</p><p>Great Question! This is where it really gets exciting!</p><p>Polymer Labs is building the first universal IBC router to connect <strong>all</strong> chains!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*olH9hpOKO5Q7xEZEfwpRhA.jpeg" /><figcaption>Mind Blown! (<a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fregionweek.com%2Fwp-content%2Fuploads%2F2018%2F12%2F4th-november-surprised-baby.jpg&amp;imgrefurl=https%3A%2F%2Fregionweek.com%2F20-human-mind-blowing-facts%2F&amp;tbnid=InAifTiaEzQqoM&amp;vet=12ahUKEwiFgpvz0_77AhV_LUQIHe0mCkYQMygIegUIARDXAQ..i&amp;docid=JomlkS-WDVGg3M&amp;w=1000&amp;h=773&amp;q=mind%20blowing%20child&amp;ved=2ahUKEwiFgpvz0_77AhV_LUQIHe0mCkYQMygIegUIARDXAQ">source</a>)</figcaption></figure><p>Polymer Chain will function as an omni-chain hub following the IBC standards and specifications enabling communication between</p><ol><li>IBC-enabled blockchains</li><li>IBC-enabled blockchains &lt;&gt; non-IBC blockchains</li><li>non-IBC blockchains &lt;&gt; non-IBC blockchains</li></ol><p>Their vision is to scale IBC interoperability to all blockchains while maintaining privacy and trustlessness using <a href="https://medium.com/@ksdumont/zero-knowledge-proofs-the-data-protection-method-that-even-your-grandma-could-understand-91a3aebd7843">ZK proofs</a>. They aim to increase connectivity across all chains using a universal router that will integrate IBC directly into the VM of your favorite blockchain using <a href="https://polymerlabs.medium.com/developing-the-most-truly-decentralized-interoperability-solution-polymer-zk-ibc-f0287ea84a2b">ZK-IBC</a>.</p><p>ZK-IBC enables different blockchain networks to communicate with each other without the need for a trusted third party. It achieves this by verifying the consensus of each blockchain on the chain itself, which can result in increased efficiency, faster transaction speeds, and lower costs for multi-chain transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*-tdRaeuI1oU5GWkSxV5pzg.jpeg" /><figcaption>Thank you for reading! (<a href="https://www.google.com/imgres?imgurl=http%3A%2F%2Fwww.fifteen-endings.co.uk%2Fimages%2F8end.jpg&amp;imgrefurl=http%3A%2F%2Fwww.fifteen-endings.co.uk%2Fthe-project%2F&amp;tbnid=Sj8WU5tb4PkmzM&amp;vet=12ahUKEwiIz5-L1P77AhWQB0QIHdauBYUQMygEegUIARDxAQ..i&amp;docid=bSOcpP0ho-OuRM&amp;w=1000&amp;h=660&amp;q=the%20end%20art&amp;ved=2ahUKEwiIz5-L1P77AhWQB0QIHdauBYUQMygEegUIARDxAQ">source</a>)</figcaption></figure><p>If you made it this far and are excited to expand interoperability infrastructure and/or build multi-chain native dapps, feel free to reach out on <a href="http://discord.gg/hvMQp4qcM6">Discord</a> and follow <a href="https://medium.com/u/a96f18a679a4">Polymer Labs</a> on <a href="https://twitter.com/polymerdao?lang=en">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3b179d1b71b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zero Knowledge Proofs: The Data Protection Method That Even Your Grandma Could Understand]]></title>
            <link>https://medium.com/@ksdumont/zero-knowledge-proofs-the-data-protection-method-that-even-your-grandma-could-understand-91a3aebd7843?source=rss-cb843623f65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/91a3aebd7843</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[data-privacy]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Keith Dumont]]></dc:creator>
            <pubDate>Sat, 17 Dec 2022 15:20:55 GMT</pubDate>
            <atom:updated>2022-12-18T18:10:43.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*anKgpAef19Yo4WGsGNQJCQ.jpeg" /><figcaption>(<a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fmiro.medium.com%2Fmax%2F500%2F0*iZ-OORo-ssIIvUT5.&amp;imgrefurl=https%3A%2F%2Fmedium.com%2Fthrive-global%2Fshow-me-dont-tell-me-ff3217dc1ca6&amp;tbnid=B05Hbb69A6z8MM&amp;vet=12ahUKEwjxzeGo1P77AhVhB0QIHSJBCUwQMygCegUIARDDAQ..i&amp;docid=E6rde_UoCFEyqM&amp;w=500&amp;h=282&amp;q=show%20me%20dont%20tell%20me%20&amp;ved=2ahUKEwjxzeGo1P77AhVhB0QIHSJBCUwQMygCegUIARDDAQ">source</a>)</figcaption></figure><p>Zero knowledge proofs (ZKPs) are a type of cryptographic technique that allow one party (the prover) to prove to another party (the verifier) that they know a certain piece of information, without revealing what that information is. This may sound counterintuitive at first, but ZKPs have a number of important uses, including enhancing privacy and security in various applications.</p><p>At a high level, a zero knowledge proof consists of three main components:</p><ol><li>a statement or a theorem that the prover wants to prove</li><li>a set of rules or axioms that the prover and verifier both agree upon</li><li>a protocol that the prover and verifier follow to interact and exchange information</li></ol><p>One of the key features of zero knowledge proofs is that they are “non-interactive,” meaning that the prover and verifier do not need to exchange any additional information beyond the initial proof and verification. This makes them particularly useful for situations where the prover and verifier may not fully trust each other, or where the prover wants to maintain a high level of privacy.</p><h3>A Concrete Example</h3><p>Imagine that Alice wants to prove to Bob that she knows the secret password to a certain account, but she doesn’t want to reveal the actual password to Bob. Alice can use a zero knowledge proof to demonstrate that she knows the password without actually revealing it to Bob.</p><p>To do this, Alice and Bob can agree on a set of axioms or rules that they both understand, such as the rules of a particular mathematical function. Alice can then use these rules to construct a proof that she knows the password, without revealing the actual password to Bob. Bob can then verify the proof using the agreed-upon axioms, without learning the actual password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e19JF8mWFuF0lQcMs2_Zbg.jpeg" /><figcaption>(<a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Faa.techdemand.io%2Fwp-content%2Fuploads%2F2022%2F10%2F17124744%2FZero-Knowledge-Proofs.jpg&amp;imgrefurl=https%3A%2F%2Fwww.itsecuritydemand.com%2Finsights%2Fsecurity%2Fa-comprehensive-guide-to-zero-knowledge-proofs-zkps%2F&amp;tbnid=L9xaYw-vqNLTwM&amp;vet=12ahUKEwifk8781P77AhVCAEQIHftDAEMQMyg6egQIARBc..i&amp;docid=WeGAiFpLJuKkwM&amp;w=1200&amp;h=700&amp;q=zero%20knowledge%20proofs%20&amp;ved=2ahUKEwifk8781P77AhVCAEQIHftDAEMQMyg6egQIARBc">source</a>)</figcaption></figure><h3>Applications &amp; Use Cases</h3><p>Zero knowledge proofs (ZKPs) have a number of interesting and important use cases:</p><ol><li>Enhancing privacy and security in online transactions: ZKPs can be used to allow a user to prove their identity or possession of certain information (such as a password or private key) without revealing that information to the other party. This can be useful for protecting against identity fraud and enhancing the security of online transactions.</li><li>Verifying the authenticity of documents or data: ZKPs can be used to verify the authenticity of a document or data without revealing the actual content of the document or data. This can be useful for applications such as verifying the authenticity of a certificate or diploma without revealing the actual grades or coursework.</li><li>Protecting against voting fraud: ZKPs can be used to allow voters to verify that their vote was counted without revealing their actual vote to anyone else. This can help to protect against voting fraud and ensure the integrity of elections.</li><li>Enhancing privacy in decentralized systems: ZKPs can be used to allow users to participate in decentralized systems (such as blockchains) without revealing their identity or other sensitive information. This can help to enhance privacy and protect against malicious actors in decentralized systems.</li></ol><h3>Let’s Try a Fun Exercise</h3><p>Great! Now that we have the basics down. Let’s have some fun! Here is an interesting way that you could use zero knowledge proofs in Python and really impress your interviewer while solving a coding interview question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*L2gI6mxxkp9qoKgpwDmi0Q.jpeg" /><figcaption>(<a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fmedia.makeameme.org%2Fcreated%2Flets-just-have-5ac437.jpg&amp;imgrefurl=https%3A%2F%2Fmakeameme.org%2Fmeme%2Flets-just-have-5ac437&amp;tbnid=XHuSIhmHtQlj1M&amp;vet=12ahUKEwiNis3v2P77AhUUCUQIHfiuB4wQMygEegQIARB9..i&amp;docid=4OGWfnZsJPolCM&amp;w=600&amp;h=400&amp;q=now%20lets%20have%20some%20fun%20meme&amp;hl=en&amp;ved=2ahUKEwiNis3v2P77AhUUCUQIHfiuB4wQMygEegQIARB9">source</a>)</figcaption></figure><p>Assume that you are asked to write a function that takes in a list of strings and returns a Boolean value indicating whether or not the list contains a <a href="https://www.google.com/search?q=palindrome+definition&amp;oq=palindr&amp;aqs=chrome.0.69i59j69i57j69i59j69i60l5.1036j1j4&amp;sourceid=chrome&amp;ie=UTF-8">palindrome</a>. However, you are not allowed to reveal the actual palindrome to the interviewer.</p><p>One way you could solve this problem using zero knowledge proofs is by using a hash function to create a digest of the list of strings. You could then return the digest to the interviewer as a proof that the list contains a palindrome, without revealing the actual palindrome to them. Let’s take a look at the code:</p><pre>import hashlib<br><br>def contains_palindrome(lst):<br> # Iterate through the list and check if any of the strings are palindromes<br> for str in lst:<br>   if is_palindrome(str):<br> # If a palindrome is found, create a digest of the list using a hash function<br>     digest = hashlib.sha256(str(lst).encode()).hexdigest()<br> # Return the digest as a proof that the list contains a palindrome<br>     return digest<br> # If no palindromes are found, return False<br>   return False<br><br>def is_palindrome(str):<br> # Implement a function to check if a string is a palindrome<br> return str == str[::-1]<br><br># Example usage:<br>print(contains_palindrome([&quot;racecar&quot;, &quot;hello&quot;, &quot;world&quot;])) # Output: &quot;2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824&quot;<br>print(contains_palindrome([&quot;apple&quot;, &quot;orange&quot;, &quot;banana&quot;])) # Output: False</pre><p>In this example, the function contains_palindrome takes in a list of strings and returns a digest of the list as a proof that it contains a palindrome, without revealing the actual palindrome to the interviewer. The function is_palindrome is used to check if a given string is a palindrome.</p><p>This is just one way that zero knowledge proofs could be used to solve a coding interview question involving the need to prove knowledge of a certain piece of information without revealing it.</p><p>Zero knowledge proofs are a powerful and versatile tool for proving knowledge without revealing sensitive information. They have a wide range of applications in various fields and are likely to continue to be an important part of cryptography and computer science for years to come.</p><p>I hope you enjoyed this article. If you have any questions, feel free to reach out to me on <a href="https://twitter.com/KeithDumont3">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91a3aebd7843" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>