<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marlon</title>
    <description>The latest articles on DEV Community by Marlon (@ithinkobjects).</description>
    <link>https://dev.to/ithinkobjects</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F606243%2F7bddcf55-85e7-483d-acd0-64155999cd90.jpg</url>
      <title>DEV Community: Marlon</title>
      <link>https://dev.to/ithinkobjects</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ithinkobjects"/>
    <language>en</language>
    <item>
      <title>XRPL: Console log the ledger index</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Sun, 15 Sep 2024 03:08:19 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/xrpl-console-log-the-ledger-index-17c6</link>
      <guid>https://dev.to/ithinkobjects/xrpl-console-log-the-ledger-index-17c6</guid>
      <description>&lt;p&gt;Tools needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;NPM&lt;/li&gt;
&lt;li&gt;VS Code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a new repository, initialize NPM, and install the XRPL.js package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir helloWorld
cd helloWorld
npm init
npm i xrpl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new app.js file in the repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the file and paste this code into it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Pull the XRPL package into the file
const XRPL = require('xrpl');

// Create an async function to console log of the ledger index
const displayLastLedgerIndex = async () =&amp;gt; {
  // Connect to the XRPL client via a desired network
  const client = new XRPL.Client('wss://xrplcluster.com');
  await client.connect();

  // Request XRPL client information
  const ledgerInfo = await client.request({
    command: 'ledger',
    ledger_index: 'validated',
  });

  // Console log the ledger index
  console.log(`Hello World, from the XRPL. The last index was: ${ledgerInfo.result.ledger_index}`);

  // Disconnect from the XRPL client
  await client.disconnect();
};

// Call the async function
displayLastLedgerIndex();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, run this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you have it! We've both made our step in interacting with the XRPL. Please like and share if you found this information valuable.&lt;/p&gt;

</description>
      <category>xrpl</category>
      <category>xrpldeveloper</category>
      <category>xrp</category>
      <category>ripple</category>
    </item>
    <item>
      <title>Stellar Blockchain (XLM): Configuration Options</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Sat, 26 Nov 2022 02:40:40 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-blockchain-xlm-configuration-options-26pf</link>
      <guid>https://dev.to/ithinkobjects/stellar-blockchain-xlm-configuration-options-26pf</guid>
      <description>&lt;h2&gt;
  
  
  Configuration Options
&lt;/h2&gt;

&lt;p&gt;There are five main configuration options that are relevant as of now, and these are &lt;em&gt;Account Merge&lt;/em&gt;, &lt;em&gt;Manage Data&lt;/em&gt;, &lt;em&gt;Set Options - Home Domain&lt;/em&gt;, &lt;em&gt;Set Options - Weight, Thresholds, and Signers&lt;/em&gt;, and &lt;em&gt;SetFlags&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Account Merge
&lt;/h3&gt;

&lt;p&gt;An &lt;em&gt;Account Merge&lt;/em&gt; operation is used when you want to delete an account on the Stellar blockchain. In order to delete an account, you must get rid of all your native XLM and subentries; such as trustlines, additional signers, open offers, and data entries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Manage Data
&lt;/h3&gt;

&lt;p&gt;The &lt;em&gt;Manage Data&lt;/em&gt; operation consists of setting, modifying, or deleting data entries within an account’s metadata. Data entries are a key/value pair of application-specific data attached to an account. Each data entry increases the account’s minimum balance by one base reserve- 0.5 XLM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set Options: Home Domain
&lt;/h3&gt;

&lt;p&gt;The &lt;em&gt;Set Options&lt;/em&gt; operation enables many different configurations. The &lt;em&gt;Home Domain&lt;/em&gt; configuration option allows an individual account to point to a web browser domain. The domain serves a TOML file that displays information about the account's Stellar integration. The stellar.toml file proves who owns the HTTPS domain linked to a Stellar account, and that the owner is responsible for accounts and assets linked on it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set Options - Weights, Thresholds, and Signers
&lt;/h3&gt;

&lt;p&gt;Again, the &lt;em&gt;Set Options&lt;/em&gt; operation enables many different configurations. The weights, thresholds, and signers configuration options allows an account to set weights for the master key and additional signers, set thresholds for operations, and add additional signers to an account for multi-signature transactions. The weight of a signer determines how much leverage the signer has in each transaction, and the default weight for the master key is one. Each operation is categorized as having either a low, medium, or high threshold (0-255), and the default threshold value for each category is zero; which guarantees that the master key can always sign the transaction. If the thresholds are set to be greater than zero, then the master key's plus additional signers weights need to be greater than the operation threshold. It's possible to lock yourself out of your account if the operation thresholds are set to be greater than the signature weights added up together.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set Options: Set Flags; Set Trust Line Flags
&lt;/h3&gt;

&lt;p&gt;Again, the &lt;em&gt;Set Options&lt;/em&gt; operation enables many different configurations. There are four flags that can be set: &lt;em&gt;Authorized Required&lt;/em&gt;, &lt;em&gt;Authorization Revocable&lt;/em&gt;, Authorization Immutable_, and &lt;em&gt;Clawback Enabled&lt;/em&gt;. The authorized required flag will require another account to be approved before it can hold the issued asset. The authorization revocable flag will enable the issuing account to revoke another account from being authorized; which prevents the other account from transferring or trading the asset, and closes any open orders. The authorization immutable flag restricts any of the other flags from being set and disables the issuing account from being mergeable. The clawback enabled flag gives the issuing account the right to get back any portion of the other account's balance of the issued asset. When interacting with issued assets, it's important to know which flags they have set so you're not caught off guard by revoked or clawbacked assets.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;Set Trust Line Flags&lt;/em&gt; operation enables the issuing account to set flags for individual trustlines. There are two flags that can be set for this operation: &lt;em&gt;Authorized&lt;/em&gt; and &lt;em&gt;Authorized To Maintain Liabilities&lt;/em&gt;. The authorized flag gives full authorization to another account (truster) allowing it to transact freely with the issued asset. The authorized to maintain liabilities flag gives limited authorization allowing it to maintain current orders, but prevents future operations from occurring without approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outro
&lt;/h2&gt;

&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I am simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>stellar</category>
      <category>xlm</category>
      <category>blockchain</category>
      <category>crypto</category>
    </item>
    <item>
      <title>Stellar (XLM) Blockchain: Account Merge</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Wed, 02 Nov 2022 17:52:05 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-xlm-blockchain-account-merge-3p05</link>
      <guid>https://dev.to/ithinkobjects/stellar-xlm-blockchain-account-merge-3p05</guid>
      <description>&lt;h2&gt;
  
  
  What is an Account Merge?
&lt;/h2&gt;

&lt;p&gt;An account merge, on the Stellar (XLM) Blockchain, is the operation for deleting an account. The account is deleted and removed from the ledger when all of its XLM (Lumens), including the base reserves, are transferred to another account.&lt;/p&gt;

&lt;p&gt;Before this operation may be carried out successfully, all subentries like trustlines, additional signers, open offers, and data entries must be removed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Side Comment
&lt;/h3&gt;

&lt;p&gt;You may notice this blog post is shorter than my previous Stellar Quests posts. I'm changing up the format of these posts by only summarizing the WHAT and not the HOW. That'll be much more relevant when I begin to use the Stellar SDK (Software Development Kit).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>stellar</category>
      <category>xlm</category>
      <category>blockchain</category>
      <category>guide</category>
    </item>
    <item>
      <title>Stellar Quests Level 1: Guide</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Thu, 27 Oct 2022 19:08:26 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-quests-level-1-guide-b1m</link>
      <guid>https://dev.to/ithinkobjects/stellar-quests-level-1-guide-b1m</guid>
      <description>&lt;h2&gt;
  
  
  Quests L1
&lt;/h2&gt;

&lt;p&gt;Level 1, in the Stellar Quests, was all about Payment Operations. These operations were: Create Account, Payment, Change Trust, Manage Offers, and Path Payments. We are guided through each of these in this order, and each step takes us further into the Stellar galaxy. Let's briefly overview each payment operation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Account
&lt;/h3&gt;

&lt;p&gt;This operation allows one to instantiate an account on the Stellar network. We can either instantiate the account with a starting amount of 0 or more. The base reserve for an account to exist is 1 Lumen ($XLM).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more here: &lt;a href="https://dev.to/gldnwzrd/stellar-quests-level-1-create-account-276g"&gt;https://dev.to/gldnwzrd/stellar-quests-level-1-create-account-276g&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Payment
&lt;/h3&gt;

&lt;p&gt;This operation allows one to send the native asset Lumen ($XLM), or a custom asset directly to a destination account on the Stellar network. The amount sent must be greater than 0, and cannot cause the account to go below its reserve minimum.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more here: &lt;a href="https://dev.to/gldnwzrd/stellar-quests-level-1-payment-57lm"&gt;https://dev.to/gldnwzrd/stellar-quests-level-1-payment-57lm&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Change Trust
&lt;/h3&gt;

&lt;p&gt;This operation allows one to establish a trustline with the issuer account, of a custom asset, on the Stellar network. One can set a limit on the amount their willing to trust. Calling this operation again, after getting rid of the entire balance of the custom asset, with the amount their willing to trust at 0 will remove the trustline entirely.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more here: &lt;a href="https://dev.to/gldnwzrd/stellar-quests-level-1-change-trust-5hhf"&gt;https://dev.to/gldnwzrd/stellar-quests-level-1-change-trust-5hhf&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Manage Offers
&lt;/h3&gt;

&lt;p&gt;This operation allows one to make an exchange between two assets on the Stellar network's native decentralized exchange. There are three operations under this belt: Manage Buy Offer, Manage Sell Offer, and Passive Buy Offer. All offers require that you sell one asset for another, but are different based on functionality or intention. In both Manage Buy and Sell Offers, we are putting up X amount of an asset for X amount of another asset; this operation executes immediately. Passive Buy Offer is unique in that it doesn't execute immediately on existing offers in the DEX (decentralized exchange); instead, it waits for new buy or sell offers. Side note, Passive Offers may be used to create a stable balance (zero spread) between two equal assets, and thus are common with stable coins.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more here: &lt;a href="https://dev.to/gldnwzrd/stellar-quests-level-1-manage-offers-3l93"&gt;https://dev.to/gldnwzrd/stellar-quests-level-1-manage-offers-3l93&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Payment Paths
&lt;/h3&gt;

&lt;p&gt;This operation allows one to send X amount of an asset (A) and have it arrive to the destination as X amount another asset (B) by hopping through 1-n offers on Stellar network's DEX (decentralized exchange). There are two operations under this belt: Path Payment Strict Send, and Path Payment Strict Receive. Strict Send will guarantee that the sender doesn't send any less or more of a chosen amount of asset A; the receiver may suffer some losses due to exchange rates. Strict Receive will guarantee that the receiver doesn't receive any less or more of a chosen amount of asset B; the sender may have to send more due to exchange rates.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more here: &lt;a href="https://dev.to/gldnwzrd/stellar-quests-level-1-path-payments-4khc"&gt;https://dev.to/gldnwzrd/stellar-quests-level-1-path-payments-4khc&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Outro
&lt;/h2&gt;

&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>xlm</category>
      <category>blockchain</category>
      <category>guide</category>
    </item>
    <item>
      <title>Stellar Quests Level 1: Path Payments</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Tue, 25 Oct 2022 21:21:04 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-quests-level-1-path-payments-4khc</link>
      <guid>https://dev.to/ithinkobjects/stellar-quests-level-1-path-payments-4khc</guid>
      <description>&lt;h2&gt;
  
  
  What are Path Payments?
&lt;/h2&gt;

&lt;p&gt;Similar to Payments, a Path Payment is the transfer of currency from one party/person/thing to another, but the difference is that the recipient will receive their desired currency rather than what was originally sent from the source. Payments are sent directly from one account to another, while a Path Payment goes through the Stellar DEX (decentralized exchange) and/or liquidity pools before reaching the recipient.&lt;/p&gt;

&lt;p&gt;In order for a Path Payment to work, there needs to be sufficient buy/sell offers on the DEX or a liquidity pool exchange path. There are times when a path payment will need to take several hops before reaching its destination, and although the transaction can fail when there aren't sufficient offers or liquidity pools, this operation is still "convenient".&lt;br&gt;
&lt;code&gt;&lt;br&gt;
Account A sells XLM → [buy XLM / sell ETH → buy ETH / sell BTC → buy BTC / sell USDC] → Account B receives USDC&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
There are two different operations for Path Payments: path payments "strict send", and path payment "strict receive". These two operations act in a different manner: the first, Strict Send, will make sure that the amount sent from the source is exact while the amount received by the destination may be less depending on conversion rates; and the second, Strict Receive, will make sure that the amount received by the destination is exact while the amount sent from the source may be less or more- also depending on conversion rates.&lt;/p&gt;

&lt;p&gt;Both Path Payment Strict Send and Path Payment Strict Receive, on the Stellar blockchain, are operation types that must be selected when building a transaction. &lt;strong&gt;NOTE:&lt;/strong&gt; Don't confuse transactions with operations- a single transaction can perform many different types of operations, and can also bundle many operations into the single transaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path Payment Strict Send
&lt;/h2&gt;

&lt;p&gt;Strict Send path payments are created by building a transaction of operation type "Path Payment Strict Send". This operation asks for seven inputs: destination, sending asset, send amount, intermediate path, destination asset, minimum destination amount, and source account. The &lt;em&gt;Destination&lt;/em&gt; is the public key of the account that will receive the payment. The &lt;em&gt;Sending Asset&lt;/em&gt; is the form of value one will send to the destination; this can be the native asset Lumen ($XLM), or a custom asset. &lt;strong&gt;NOTE:&lt;/strong&gt; In order for a destination to receive a custom asset, they must've established a trustline for it. The &lt;em&gt;Sending Amount&lt;/em&gt; is the exact total of an asset one will send to the destination. The &lt;em&gt;Intermediate Path&lt;/em&gt; specifies the assets one wants the payment to path through; this input is optional because it gives greater control to organizations if needed. The &lt;em&gt;Destination Asset&lt;/em&gt; is the form of value received by the destination. The &lt;em&gt;Minimum Destination Amount&lt;/em&gt; is the min amount of an asset that must be received by the destination; which can cause a transaction to fail is there aren't sufficient buy/sell offers or liquidity pools available to guarantee the minimum. The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that'll be making the path payment; this input is optional because if the value won't be sent by the account which has built the transaction, then the public key entered here will refer to the account that will send the value. &lt;strong&gt;NOTE:&lt;/strong&gt; All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually making the path payment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path Payment Strict Receive
&lt;/h2&gt;

&lt;p&gt;Strict Receive path payments are created by building a transaction of operation type "Path Payment Strict Receive". This operation asks for seven inputs: destination, sending asset, maximum send amount, intermediate path, destination asset, destination amount, and source account. The &lt;em&gt;Destination&lt;/em&gt; is the public key of the account that will receive the payment. The &lt;em&gt;Sending Asset&lt;/em&gt; is the form of value one will send to the destination; this can be the native asset Lumen ($XLM), or a custom asset. &lt;strong&gt;NOTE:&lt;/strong&gt; In order for a destination to receive a custom asset, they must've established a trustline for it. The &lt;em&gt;Maximum Sending Amount&lt;/em&gt; is the max amount of an asset one is willing to send to the destination; which can cause a transaction to fail is there aren't sufficient buy/sell offers or liquidity pools available to guarantee the maximum. The &lt;em&gt;Intermediate Path&lt;/em&gt; specifies the assets one wants the payment to path through; this input is optional because it gives greater control to organizations if needed. The &lt;em&gt;Destination Asset&lt;/em&gt; is the form of value received by the destination. The &lt;em&gt;Destination Amount&lt;/em&gt; is the exact total of an asset one will receive from the source. The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that'll be making the path payment; this input is optional because if the value won't be sent by the account which has built the transaction, then the public key entered here will refer to the account that will send the value. &lt;strong&gt;NOTE:&lt;/strong&gt; All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually making the path payment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outro
&lt;/h2&gt;

&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>xlm</category>
      <category>blockchain</category>
      <category>guide</category>
    </item>
    <item>
      <title>Stellar Quests Level 1: Manage Offers</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Fri, 21 Oct 2022 22:16:34 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-quests-level-1-manage-offers-3l93</link>
      <guid>https://dev.to/ithinkobjects/stellar-quests-level-1-manage-offers-3l93</guid>
      <description>&lt;h2&gt;
  
  
  What are Offers?
&lt;/h2&gt;

&lt;p&gt;An offer, on the Stellar blockchain, is when a party/person/thing decides to buy/sell one asset for another at a specific exchange rate; ex. I want to sell 100 XLM for 1,000 SALT. This takes place on Stellar's decentralized exchanged (DEX). There are three different types of offers on Stellar: Buy Offer, Sell Offer, and Passive Sell Offer. Technically, all offers are both buy/sell offers. The difference in wording is to help others "reason" about their offers.&lt;/p&gt;

&lt;p&gt;How promptly an offer is executed depends on whether or not there's a relevant counter offer on the decentralized exchange (DEX). If there aren't any relevant counter offers, then the offer will sit until a counterparty takes it or until it's removed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manage Buy Offer
&lt;/h2&gt;

&lt;p&gt;Buy offers are created by building a transaction of operation type "Manage Buy Offer". This operation asks for six inputs: selling, buying, buy amount, price, offer id, and source. &lt;em&gt;Selling&lt;/em&gt; is the asset you're giving in exchange. &lt;em&gt;Buying&lt;/em&gt; is the asset you're getting in exchange. The &lt;em&gt;Amount&lt;/em&gt; is the required total of the buying asset you want to receive for this offer. The &lt;em&gt;Price&lt;/em&gt; is the "price of &lt;em&gt;one unit&lt;/em&gt; of buying in terms of selling"; so if we're selling 100 XLM for 1000 SALT, then each unit of SALT we're buying costs .10. &lt;em&gt;Offer ID&lt;/em&gt; tells the transaction to do one of two things: create a new offer (Ex. 0), or update an existing one (Ex. 3948329). The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that'll be creating the offer; this input is optional because if the offer won't be created by the account which has built the transaction, then the public key entered here will refer to the account that will create the offer. &lt;strong&gt;NOTE:&lt;/strong&gt; All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually creating &lt;br&gt;
the offer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manage Sell Offer
&lt;/h2&gt;

&lt;p&gt;Sell offers are created by building a transaction of operation type "Manage Sell Offer". This operation asks for six inputs: selling, buying, buy amount, price, offer id, and source. &lt;em&gt;Selling&lt;/em&gt; is the asset you're giving in exchange. &lt;em&gt;Buying&lt;/em&gt; is the asset you're getting in exchange. The &lt;em&gt;Amount&lt;/em&gt; is the required total of the buying asset you want to receive for this offer. The &lt;em&gt;Price&lt;/em&gt; is the "price of &lt;em&gt;one unit&lt;/em&gt; of selling in terms of buying"; so if we're buying 100 XLM with 1000 SALT, then each unit of XLM we're buying costs 10. &lt;em&gt;Offer ID&lt;/em&gt; tells the transaction to do one of two things: create a new offer (Ex. 0), or update an existing one (Ex. 3948329). The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that'll be creating the offer; this input is optional because if the offer won't be created by the account which has built the transaction, then the public key entered here will refer to the account that will create the offer. &lt;strong&gt;NOTE:&lt;/strong&gt; All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually creating &lt;br&gt;
the offer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passive Sell Offer
&lt;/h2&gt;

&lt;p&gt;This is a concept I'm still struggling to understand because the definition itself has a lot of contradictions- lol. Take a look...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A Passive Sell Offer creates an offer to sell one asset for another &lt;em&gt;without&lt;/em&gt; taking a reverse offer of equal price (??? Okay). This allows you to maintain an order book that both buys and sells an asset equally without the offers actually executing (??? What).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdz3ije9g6z1zda7x5j9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdz3ije9g6z1zda7x5j9.gif" alt="... so anyway" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Outro
&lt;/h2&gt;

&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xlm</category>
      <category>stellar</category>
      <category>blockchain</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Stellar Quests Level 1: Change Trust</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Thu, 20 Oct 2022 19:42:42 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-quests-level-1-change-trust-5hhf</link>
      <guid>https://dev.to/ithinkobjects/stellar-quests-level-1-change-trust-5hhf</guid>
      <description>&lt;h2&gt;
  
  
  What are Trustlines?
&lt;/h2&gt;

&lt;p&gt;A trustline, on the Stellar blockchain, is an one way agreement between two accounts. The source account that's making the agreement decides to trust another account. The trust is based on a custom asset (ex. "$ROCK") where Account-A decides that they would like to hold/sell/trade the custom asset issued by Account-B because they believe it to be of value. &lt;strong&gt;NOTE:&lt;/strong&gt; Custom assets are never actually created- they only exist in the form of trust on other accounts; I'll cover this concept more in depth in a future blog post. &lt;/p&gt;

&lt;h2&gt;
  
  
  How are Trustlines created?
&lt;/h2&gt;

&lt;p&gt;Trustlines are created by building a transaction of operation type "Change Trust". This operation asks for three inputs: asset, trust limit, and source account. The &lt;em&gt;Asset&lt;/em&gt; is the custom asset one decides to trust; this field requires the asset code (ex. ROCK) and the issuer account id (public key of the account that issued the custom asset). The &lt;em&gt;Trust Limit&lt;/em&gt; is a number that represents the max amount of units, of a custom asset, that you're willing to trust; if set to 1,000, then the account creating the trustline will only be able to hold 1,000 units of the custom asset. The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that'll be creating the trustline; this input is optional because if the trustline won't be created by the account which has built the transaction, then the public key entered here will refer to the account that will create the trustline. &lt;strong&gt;NOTE:&lt;/strong&gt; All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually creating &lt;br&gt;
the trustline.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>xlm</category>
      <category>stellar</category>
      <category>blockchain</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Stellar Quests Level 1: Payment</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Wed, 19 Oct 2022 20:06:00 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-quests-level-1-payment-57lm</link>
      <guid>https://dev.to/ithinkobjects/stellar-quests-level-1-payment-57lm</guid>
      <description>&lt;h2&gt;
  
  
  What is a Payment?
&lt;/h2&gt;

&lt;p&gt;Payments are the transfers of value from one party/person/thing to another, and they're the corner stone of all blockchains. Payments on the Stellar blockchain are theoretically no different from payments on any other blockchain.&lt;/p&gt;

&lt;p&gt;A payment, on the Stellar blockchain, is an operation type that must be selected when building a transaction. &lt;strong&gt;NOTE:&lt;/strong&gt; Don't confuse transactions with operations- a single transaction can perform many different types of operations, and can also bundle many operations into the single transaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  How are Payments created?
&lt;/h2&gt;

&lt;p&gt;Payments are created by building a transaction of operation type "Payment". This operation asks for four inputs: destination, asset, amount, and source account. The &lt;em&gt;Destination&lt;/em&gt; is the public key of the account that will receive the payment. The &lt;em&gt;Asset&lt;/em&gt; is the form of value one will send to the destination; this can be the native asset Lumen ($XLM), or a custom asset. &lt;strong&gt;NOTE:&lt;/strong&gt; In order for a destination to receive a custom asset, they must've established a trustline for it. The &lt;em&gt;Amount&lt;/em&gt; is the total of an asset one will send to the destination; the ratio is 1:1. The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that'll be making the payment; this input is optional because if the amount won't be sent by the account which has built the transaction, then the public key entered here will refer to the account that will send the amount. &lt;strong&gt;NOTE:&lt;/strong&gt; All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually making the payment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>stellar</category>
      <category>xlm</category>
      <category>blockchain</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Stellar Quests Level 1: Create Account</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Tue, 18 Oct 2022 16:04:34 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/stellar-quests-level-1-create-account-276g</link>
      <guid>https://dev.to/ithinkobjects/stellar-quests-level-1-create-account-276g</guid>
      <description>&lt;h2&gt;
  
  
  What are Stellar accounts?
&lt;/h2&gt;

&lt;p&gt;Accounts on the Stellar blockchain are the "central data structure which hold balances, sign transactions, and issue assets". Each account needs a keypair and the required minimum balance of Lumens ($XLM) in order to exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  How are Accounts created?
&lt;/h2&gt;

&lt;p&gt;Before an account can be created, a keypair needs to be generated. A keypair itself does &lt;strong&gt;NOT&lt;/strong&gt; instantiate an account. The Stellar blockchain implements this rule so that there isn't an abundance of unused accounts. In order for an account to be instantiated, one must first send at least 1 Lumen ($XLM) to the public key address.&lt;/p&gt;

&lt;p&gt;This gets done by building a transaction of operation type "Create Account". This operation asks for three inputs: destination, starting balance, and source account. The &lt;em&gt;Destination&lt;/em&gt; would be the public key from the keypair that was generated. The &lt;em&gt;Starting Balance&lt;/em&gt; is the amount one wishes to fund the new account with; which must be greater than 1 Lumen ($XLM). The &lt;em&gt;Source Account&lt;/em&gt; is the public key of the account that will be sending the funds; plus, this input is optional because if the funds will not be sent by the account which has built the transaction, then the public key entered here will refer to the account that is. NOTE: All transactions &lt;strong&gt;MUST&lt;/strong&gt; be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is funding the new account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accounts and their balances
&lt;/h2&gt;

&lt;p&gt;Accounts may hold different balances of different types of assets. There are two types of assets. There's the native asset "Lumen ($XLM)", and then there are "custom assets". In future blog posts, I'll be covering custom assets and how they're established.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I plan on writing corresponding blog posts with relevant code examples. For now, I am simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: &lt;a href="https://quest.stellar.org/" rel="noopener noreferrer"&gt;https://quest.stellar.org/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>stellar</category>
      <category>xlm</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Lifecycle Of A Blockchain Transaction</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Wed, 27 Apr 2022 02:28:07 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/lifecycle-of-a-blockchain-transaction-2h3p</link>
      <guid>https://dev.to/ithinkobjects/lifecycle-of-a-blockchain-transaction-2h3p</guid>
      <description>&lt;p&gt;First, I want to thank Patrick McCorry for making all of this knowledge available to myself and others.&lt;/p&gt;

&lt;p&gt;Second, I'd like to assert that I'm writing from a Bitcoin and Ethereum paradigm, but these principles apply to most blockchains.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;We'll be looking at the lifecycle of a transaction that can be broken down into three simple steps: (1) a user sends a transaction to the peer-to-peer network, (2) pending transactions eventually reach block producers, and (3) the fee market entices block producers (miners) to pick transactions for the next block. In order to expand on each of these points, we'll cover what peers (nodes) and block producers (miners) are in detail. In a following blog, we'll go over exactly what users are, and how they interact with the blockchain network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Peers Of A Peer-To-Peer Network
&lt;/h2&gt;

&lt;p&gt;The peers of a peer-to-peer (P2P) network are essentially us, the people, represented as nodes (computers). Being a peer on the P2P network boils down to stabilizing a network where financial incentives lie, or altruistically.&lt;/p&gt;

&lt;p&gt;As a peer (node) on the network, you offer connection slots, propagate messages, and serve history. Connection slots are connections to a small group of peers (nodes) to help form a mesh network where nodes connect directly, dynamically, and non-hierarchically to as many other nodes as possible to cooperate with one another. The propagation of messages acts as a filter where nodes check the validity of transactions and blocks before passing them onto their peers. Serving history helps new peers catch up on the network by providing historical blocks.&lt;/p&gt;

&lt;p&gt;Peers are able to connect with other peers through two approaches: (1) trusted DNS seeds (hard-coded) and (2) advertisements on the network. DNS seeds are servers which return trusted IP addresses (peers) that when connected to can be sent requests for a list of active peers (IP addresses; up to 1,000) on the network that are ranked by the DNS seed's reputation algorithm. Advertising on the network is done by sharing your nodes connection details to its closest peers (or initial connections) who will then advertise the details to their closest peers.&lt;/p&gt;

&lt;p&gt;There are two types of connections peers are able to have: incoming and outgoing. Incoming connections happens when a peer wants to connect their node with your node. An outgoing connection happens when you want to connect your node with a peer's node. It's important to have both incoming and outgoing connections because this increases the availability of connection slots, and prevents one from a solar eclipse attack- where a peer's point-of-view is controlled by malicious agents who choose to feed the peer incorrect information. Connecting to at least one honest peer guarantees that you'll always be able to discern the truth and follow the correct (longest/heaviest) blockchain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In order for a transaction to be propagated throughout the entire network, a user must advertise a transaction to a single peer on the network.&lt;/strong&gt; The peer in turn makes an announcement to all of its connected peers sending a hash of the transaction (fixed byte value rather than the full transaction payload), and the connected peers receiving the announcement will determine whether or not they have the transaction payload already by querying their local replicated database with the transaction hash. If the connected peer doesn't already have the transaction payload, then they'll request it from the initial peer that made the announcement to begin with- then, the connected peer makes an announcement just like the initial peer until finally every peer on the network has the transaction payload (data) in their local replicated database.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The reason peers propagate a transaction hash first rather than the transaction payload is to save on bandwidth consumption used by the network. If a connected peer already has the transaction payload, then there's no reason to send it over.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each peer (node) has a memory pool- which is a pending list of transactions that have been propagated, but not confirmed within a newly produced block. Memory pools are a local policy implemented by nodes and have nothing to do with consensus (agreement of the network), and they help mitigate flood protection on the network by relatively synchronizing transaction lists across all peers. Flood attacks are costly to perform as every transaction included in the blockchain will be charged a fee. In Bitcoin, duplicate transactions pay the minimum transaction fee- but in Ethereum, they pay a 10% fee bump.&lt;/p&gt;

&lt;p&gt;There are different types of nodes that support the network: full, archival, pruned, and light-client. Every node validates blocks and transactions in real-time, except light-clients. Full nodes keep a copy of all historical blocks, and makes a copy of the database publicly available. Archival nodes (a.k.a. indexed nodes) keep a snapshot of the state of the database for every block produced. Light-client nodes keep a collection of it's own data (user activity), and a very shallow copy of the blockchain (block headers).&lt;/p&gt;

&lt;p&gt;The ultimate goal of a peer-to-peer network is data availability and message propagation; which guarantees that new blocks are publicly available, and that anyone (without bounds) can send a message to all peers on the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Block Producers Of A Blockchain
&lt;/h2&gt;

&lt;p&gt;The block producers (miners) of a blockchain are essentially entities with financial incentive to produce the next block. They provide a simple service, and don't run the network. They're incentivized to be honest, but should not be trusted. Block producers are able to produce a block that doesn't follow protocol, but the P2P network will reject it and it'll cost the block producer money. Their activity can be broken down to this: order transactions within a block, and extend the longest chain with the block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In order for a block producer to be chosen to produce the next block for the blockchain, he/she/it must win the leader election.&lt;/strong&gt; There is a tricky question which comes into play here: how do we create a list candidates when there's no strong notion of identity? There's isn't a trusted identity to create such a list either. The answer to this question is Proof Of X (work/stake); where one proves ownership over a scarce resource that should be limited and expensive to acquire. In the Nakamoto Consensus algorithm, there are two ways to win the leader election: self-selection, and proportional-selection. Self-selection is where participants (block producers) purchase resources and register. Proportional-selection is where participants are elected to become the leader proportional to their ownership of resources.&lt;/p&gt;

&lt;p&gt;The leader election is not a free game to play, and only works if the miner (block producer) can cover costs of producing a new block and return a profit still. There are two types of cost associated with being a block producer: upfront costs to purchase hardware or tokens, and on-going costs to participate which includes electricity and computation bandwidth. There are two revenue streams that come from being a block producer: network fees, and the issuance of new coins (tokens). Network fees are collected from user transactions (included the block produced), and issuance fees are a protocol reward which subsidizes the block producer with newly minted coins. The long term plan for Bitcoin is to rely solely on network fees to reward the miners because eventually all 21 million Bitcoins will have been minted and issued.&lt;/p&gt;

&lt;p&gt;Producing blocks of transactions is a knapsack problem- the space of a block is limited, and the block producer (miner) wants to fill the bag with transactions that'll return the most profit. Every user transaction carries with it a weight (byte size/ gas limit) and value (fee paid to the miner), so the block producer can determine which transactions they'd like to include in a newly produced block. This is why transactions are confirmed &lt;em&gt;eventually&lt;/em&gt;, and why some transactions take a lot longer to confirm than others.&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>bitcoin</category>
      <category>ethereum</category>
    </item>
    <item>
      <title>The Cryptography In Cryptocurrency</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Mon, 18 Apr 2022 00:12:45 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/the-cryptography-in-cryptocurrency-4lk6</link>
      <guid>https://dev.to/ithinkobjects/the-cryptography-in-cryptocurrency-4lk6</guid>
      <description>&lt;p&gt;First, I want to thank Patrick McCorry for making all of this knowledge available to myself and others.&lt;/p&gt;

&lt;p&gt;Second, I'd like to assert that I'm writing from a Bitcoin and Ethereum paradigm, but these principles apply to most blockchains.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;We'll be looking at cryptography's role in cryptocurrency. Cryptography is not always used for data privacy. In cryptocurrency, it's used for protecting integrity, verifying transactions, and authenticating users- simply put, traceability. We won't be going over user authentication in this blog- but stay tuned!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hash Function
&lt;/h2&gt;

&lt;p&gt;Q: What is a cryptographic hash function?&lt;br&gt;
A: A function that can be used to map data (preimages) of arbitrary size to fixed-size values (hashes). The values returned by a hash function are called hash values, hash codes, digests, or simply hashes. Any change made to the preimage will result in a totally unique hash.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three Properties The Hash Function
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Preimage Resistance&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Given a hash (h), it should be difficult to find any preimage (p) such that h=hash(p). This property guarantees that the hash will give no clue as to what the preimage actually is.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Second Preimage Resistance&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Given a preimage (p1), it should be difficult to find a different preimage (p2) such that hash(p1)=hash(p2). This property guarantees you can't change your mind after making a public commitment.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Collision Resistance&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It should be difficult to find two different preimages (p1) (p2) such that hash(p1)==hash(p2). This is very similar to second preimage resistance except that collision resistance pertains to hash tables (maps), and second preimage resistance pertains to public commitments.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Chain In Blockchain
&lt;/h2&gt;

&lt;p&gt;In Bitcoin and Ethereum, each block appended at the end of the blockchain has a block header that contains a hash of the previous block's header as a way of pointing to the block that came before it. This creates a weighted blockchain where the heaviest (longest) chain is considered to be the "real" blockchain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnyx3snwdmi2xa2dpizfy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnyx3snwdmi2xa2dpizfy.png" alt="Image description" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Verifying Transactions In The Blockchain
&lt;/h2&gt;

&lt;p&gt;Each block header comes with a hash tree root that is a commitment to all transactions in the block (a hash of hashes of transactions).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25pa7m1s432jnedzjs2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25pa7m1s432jnedzjs2x.png" alt="Image description" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Verifying that a transaction was confirmed in the blockchain is simply a matter of requesting information from a SPV (Simplified Payment Verification) client. The request to a SPV client carries with it the transaction we want to verify, the block id where the transaction is located, and a couple hashed transactions from the same block that will enable us to re-compute the hash tree root. If the re-computed hash tree root is equal to the original, then it's safe to say that this transaction was indeed verified and confirmed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F38wmopk3e878ay1h71tx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F38wmopk3e878ay1h71tx.png" alt="Image description" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>bitcoin</category>
      <category>ethereum</category>
    </item>
    <item>
      <title>High Level Understanding Of Smart Contracts In Ethereum</title>
      <dc:creator>Marlon</dc:creator>
      <pubDate>Fri, 15 Apr 2022 03:36:56 +0000</pubDate>
      <link>https://dev.to/ithinkobjects/high-level-understanding-of-smart-contracts-in-ethereum-4e29</link>
      <guid>https://dev.to/ithinkobjects/high-level-understanding-of-smart-contracts-in-ethereum-4e29</guid>
      <description>&lt;p&gt;First, I want to thank Patrick McCorry for making all of this knowledge available to myself and others.&lt;/p&gt;

&lt;p&gt;Second, I'd like to assert that I'm writing from an Ethereum paradigm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;We'll be looking at smart contracts to cover what they are and how they're used in relation to Ethereum.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is A Smart Contract?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"A smart contract is a computerized transaction protocol that executes the terms of a contract. The general objectives are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries." -Nick Szabo (1994)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Simply put, a smart contract will guarantee immutability of code (never modified), atomic operations of code (all or nothing), and public accessibility of code (no secrets).&lt;/p&gt;

&lt;h2&gt;
  
  
  Smart Contracts In Ethereum
&lt;/h2&gt;

&lt;p&gt;There are two types of accounts in Ethereum's database: externally owned accounts and contract accounts. Externally owned accounts are controlled by individuals (keys), and contract accounts are controlled by code (smart contracts) and storage.&lt;/p&gt;

&lt;p&gt;Contract accounts are the reason for two of the three types of transactions on Ethereum:  creation transactions, and invocation transactions. Creation transactions carry smart contract code in their payload that get instantiated as an account in the Ethereum database. After a smart contract has been created by a creation transaction, invocation transactions become possible. Invocation transactions carry commands in their payload to invoke code in the target contract- that's stored in the database- that updates the state of the database.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Are Smart Contracts Built
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Solidity: Type language; object oriented.&lt;/li&gt;
&lt;li&gt;Ethereum Virtual Machine: Every peer on the network has an instance of the EVM their local machine; each peer deterministically executes code (transactions).&lt;/li&gt;
&lt;li&gt;Event Driven Programs: Smart contracts don't run themselves. Every transaction made to the blockchain (Ethereum database) costs "gas" (a unit of measurement for computation).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>web3</category>
      <category>solidity</category>
      <category>evm</category>
      <category>smartcontract</category>
    </item>
  </channel>
</rss>
