<?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>Forem: Hemapriya Kanagala</title>
    <description>The latest articles on Forem by Hemapriya Kanagala (@hemapriya_kanagala).</description>
    <link>https://forem.com/hemapriya_kanagala</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%2F3307586%2F2dffaf97-946d-44a6-8a39-07d94a72e07d.png</url>
      <title>Forem: Hemapriya Kanagala</title>
      <link>https://forem.com/hemapriya_kanagala</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hemapriya_kanagala"/>
    <language>en</language>
    <item>
      <title>How I Built a Blockchain User Profile with Solidity (and You Can Too)</title>
      <dc:creator>Hemapriya Kanagala</dc:creator>
      <pubDate>Tue, 29 Jul 2025 03:57:11 +0000</pubDate>
      <link>https://forem.com/hemapriya_kanagala/how-i-built-a-blockchain-user-profile-with-solidity-and-you-can-too-11mc</link>
      <guid>https://forem.com/hemapriya_kanagala/how-i-built-a-blockchain-user-profile-with-solidity-and-you-can-too-11mc</guid>
      <description>&lt;p&gt;This is a smart contract I wrote using Solidity that lets people &lt;strong&gt;register and update their profile on the blockchain&lt;/strong&gt;. It was one of the first contracts I built to understand how user data works on Ethereum.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;br&gt;&lt;br&gt;
Everyone has a wallet address. What if we could let each address store their &lt;strong&gt;name, age, and email&lt;/strong&gt; - all saved on-chain?&lt;/p&gt;

&lt;p&gt;So I built that.&lt;br&gt;&lt;br&gt;
Here is the &lt;a href="https://github.com/hemapriya-kanagala/user-profile-smart-contract" rel="noopener noreferrer"&gt;GitHub link&lt;/a&gt; if you want to check out the code.&lt;br&gt;&lt;br&gt;
I wrote just one file: &lt;code&gt;UserProfile.sol&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Contract Does
&lt;/h2&gt;

&lt;p&gt;This smart contract lets a user:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Register their &lt;strong&gt;name, age, and email&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Update that information later&lt;/li&gt;
&lt;li&gt;View their own profile (no one else can access it)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything is connected to their &lt;strong&gt;Ethereum wallet address&lt;/strong&gt;, so you don’t need to log in - your wallet is your ID.&lt;/p&gt;




&lt;h2&gt;
  
  
  Concepts I Used
&lt;/h2&gt;

&lt;p&gt;If you're new to Solidity or smart contracts, these are the main building blocks I used:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;struct&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Groups related data - like name, age, and email - into a single object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mapping&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stores info for each user using their wallet address as the key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;require()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds checks so people don’t register twice or update before registering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;block.timestamp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Saves the time a user registered, using the blockchain’s clock&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each time someone registers, their info is stored on the blockchain - and only &lt;strong&gt;they&lt;/strong&gt; can update or view it.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;Here’s what the contract does in plain English:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;register(name, age, email)&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This function saves your profile to the blockchain - but only if you haven’t registered before. If you try again, it gives an error.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;updateProfile(name, age, email)&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;If you already registered, this lets you change your info anytime.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;getProfile()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This function shows your current profile - your name, age, email, and the time you first registered. Only you can see it (based on your wallet).&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Try It Yourself (Beginner-Friendly)
&lt;/h2&gt;

&lt;p&gt;You don’t need a real wallet or ETH to test this. Remix IDE runs everything in your browser using fake ETH.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to Test the User Profile Contract
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Go to Remix&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ &lt;a href="https://remix.ethereum.org" rel="noopener noreferrer"&gt;https://remix.ethereum.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a new file&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Click “+” → Name it &lt;code&gt;UserProfile.sol&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Paste in the contract code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ You can find it &lt;a href="https://github.com/hemapriya-kanagala/user-profile-smart-contract" rel="noopener noreferrer"&gt;here on GitHub&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compile it&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Go to the &lt;strong&gt;Solidity Compiler&lt;/strong&gt; tab&lt;br&gt;&lt;br&gt;
→ Make sure version is &lt;code&gt;0.8.0&lt;/code&gt; or higher&lt;br&gt;&lt;br&gt;
→ Click &lt;strong&gt;Compile&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy it&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Go to the &lt;strong&gt;Deploy &amp;amp; Run Transactions&lt;/strong&gt; tab&lt;br&gt;&lt;br&gt;
→ Select &lt;strong&gt;Remix VM (Prague)&lt;/strong&gt; as environment&lt;br&gt;&lt;br&gt;
→ Leave &lt;strong&gt;Value&lt;/strong&gt; as &lt;code&gt;0&lt;/code&gt;&lt;br&gt;&lt;br&gt;
→ Click &lt;strong&gt;Deploy&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Register yourself&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Fill in name, age, and email&lt;br&gt;&lt;br&gt;
→ Click &lt;code&gt;register()&lt;/code&gt;&lt;br&gt;&lt;br&gt;
✅ You’ll see a green checkmark&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check your profile&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Click &lt;code&gt;getProfile()&lt;/code&gt;&lt;br&gt;&lt;br&gt;
✅ Your info will appear: name, age, email, and timestamp&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Try updating it&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
→ Enter new name, age, or email&lt;br&gt;&lt;br&gt;
→ Click &lt;code&gt;updateProfile()&lt;/code&gt;&lt;br&gt;&lt;br&gt;
→ Then click &lt;code&gt;getProfile()&lt;/code&gt; again to see the updated info&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Lesson&lt;/th&gt;
&lt;th&gt;How I Used It&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Structs in Solidity&lt;/td&gt;
&lt;td&gt;Grouped user info like name, age, email&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mappings&lt;/td&gt;
&lt;td&gt;Stored each user's profile by their address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access control with &lt;code&gt;msg.sender&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Made sure only the owner of a profile can update or view it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blockchain timestamp&lt;/td&gt;
&lt;td&gt;Recorded when each user registered&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remix testing&lt;/td&gt;
&lt;td&gt;Quickly deployed and tested without real ETH&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Common Mistakes to Avoid
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mistake&lt;/th&gt;
&lt;th&gt;Why It’s a Problem&lt;/th&gt;
&lt;th&gt;How I Solved It&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Registering twice&lt;/td&gt;
&lt;td&gt;Contract would overwrite data&lt;/td&gt;
&lt;td&gt;Used &lt;code&gt;require()&lt;/code&gt; to block double registration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Updating before registering&lt;/td&gt;
&lt;td&gt;User wouldn’t exist in mapping yet&lt;/td&gt;
&lt;td&gt;Added &lt;code&gt;require()&lt;/code&gt; to check registration first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Returning too much data&lt;/td&gt;
&lt;td&gt;Could make &lt;code&gt;view&lt;/code&gt; functions heavy&lt;/td&gt;
&lt;td&gt;Kept &lt;code&gt;getProfile()&lt;/code&gt; simple and clear&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Up Next
&lt;/h2&gt;

&lt;p&gt;I’d really appreciate your questions or feedback. Did something confuse you? Let me know. Your insights help shape the next articles.&lt;/p&gt;

&lt;p&gt;Also, if there’s a non-Web3 topic you want me to cover (open source, side projects, etc), drop a comment below. If I know it, I’ll write about it. If not, I’ll point you to a good place to begin.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Stay in Touch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/hemapriya-kanagala/user-profile-smart-contract" rel="noopener noreferrer"&gt;Check out the GitHub repo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/hemapriya-kanagala" rel="noopener noreferrer"&gt;Follow me on GitHub&lt;/a&gt; for projects and experiments
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/hemapriya-kanagala/" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt; - I’d love to hear from you
&lt;/li&gt;
&lt;li&gt;Drop a comment if you tried this or have questions - I’d love to help!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;&lt;em&gt;Thanks for reading!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>solidity</category>
      <category>ethereum</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What Actually Happens When You Make a Blockchain Transaction?</title>
      <dc:creator>Hemapriya Kanagala</dc:creator>
      <pubDate>Fri, 25 Jul 2025 06:33:31 +0000</pubDate>
      <link>https://forem.com/hemapriya_kanagala/what-actually-happens-when-you-make-a-blockchain-transaction-2be5</link>
      <guid>https://forem.com/hemapriya_kanagala/what-actually-happens-when-you-make-a-blockchain-transaction-2be5</guid>
      <description>&lt;p&gt;Welcome back! If you read &lt;a href="https://dev.to/hemapriya_kanagala/beginners-guide-to-blockchain-how-it-actually-works-and-why-it-matters-2ccb"&gt;Article 1: A Beginner’s Guide to How Blockchain Actually Works&lt;/a&gt;, we walked through what a blockchain is, how blocks form, and why decentralization matters.&lt;/p&gt;

&lt;p&gt;Now let’s get a little more hands-on.&lt;/p&gt;

&lt;p&gt;You’ve probably heard things like:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Just send me crypto.”&lt;br&gt;&lt;br&gt;
“It’s on the blockchain.”&lt;br&gt;&lt;br&gt;
“Check your wallet.”  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But what does that &lt;em&gt;actually&lt;/em&gt; mean? What happens under the hood when you send a transaction?&lt;/p&gt;

&lt;p&gt;This article takes you behind the scenes - from clicking “Send” in your wallet to seeing the transaction confirmed on a blockchain explorer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step-by-Step: How a Blockchain Transaction Works
&lt;/h2&gt;

&lt;p&gt;Let’s follow a single transaction from start to finish. We’ll use a simple example:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You want to send 1 token to a friend using a wallet like MetaMask.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here’s what happens behind the scenes:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. You Create the Transaction in Your Wallet&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;wallet&lt;/strong&gt; is an interface that lets you interact with the blockchain. It stores your &lt;strong&gt;private key&lt;/strong&gt; (securely) and helps you sign transactions.&lt;/p&gt;

&lt;p&gt;You enter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your friend’s &lt;strong&gt;public address&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Amount to send&lt;/li&gt;
&lt;li&gt;Optional message or data (depends on blockchain)&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;gas fee&lt;/strong&gt; you're willing to pay&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your wallet then &lt;strong&gt;signs&lt;/strong&gt; the transaction using your private key. This proves it came from you, without ever revealing your key.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📌 &lt;strong&gt;Signing&lt;/strong&gt; means creating a unique digital signature based on your private key and the transaction data.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Your Wallet Broadcasts the Transaction to the Network&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once signed, the transaction is &lt;strong&gt;broadcast&lt;/strong&gt; to the network. This means it’s sent to nearby &lt;strong&gt;nodes&lt;/strong&gt; (computers running the blockchain software).&lt;/p&gt;

&lt;p&gt;Those nodes check if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your signature is valid&lt;/li&gt;
&lt;li&gt;You have enough balance&lt;/li&gt;
&lt;li&gt;The transaction is formatted correctly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If it looks good, they pass it on to more nodes - spreading it across the network, like sharing a file with everyone.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📌 &lt;strong&gt;Nodes&lt;/strong&gt; are participants in the blockchain network. They validate transactions and keep a full copy of the blockchain.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;3. The Transaction Enters the Mempool&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Valid transactions are stored in something called the &lt;strong&gt;mempool&lt;/strong&gt; - short for &lt;em&gt;memory pool&lt;/em&gt;. Think of it as a waiting room where pending transactions sit before being added to a block.&lt;/p&gt;

&lt;p&gt;Every node maintains its own mempool, but they’re usually very similar.&lt;/p&gt;

&lt;p&gt;Inside the mempool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transactions are ranked (usually by fee amount)&lt;/li&gt;
&lt;li&gt;Miners or validators pick from the top&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;📌 The &lt;strong&gt;mempool&lt;/strong&gt; is like a “to-do list” for the network.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;4. A Validator Picks It Up and Adds It to a Block&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Depending on the blockchain’s consensus method, a participant is selected to propose the next block. This could be a &lt;strong&gt;miner&lt;/strong&gt; (Proof of Work) or &lt;strong&gt;validator&lt;/strong&gt; (Proof of Stake).&lt;/p&gt;

&lt;p&gt;They:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pick high-fee transactions from the mempool&lt;/li&gt;
&lt;li&gt;Group them into a block&lt;/li&gt;
&lt;li&gt;Validate and order them&lt;/li&gt;
&lt;li&gt;Propose the block to the network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If accepted, the block is added to the chain - and your transaction is officially recorded.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📌 A &lt;strong&gt;block&lt;/strong&gt; contains many transactions, plus metadata like timestamp, block number, and a hash of the previous block.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. You See the Transaction Confirmed&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once included in a block, your transaction gets a &lt;strong&gt;confirmation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Over time, more blocks are added after it - which makes your transaction harder to reverse. That’s why you’ll hear things like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Wait for 3 confirmations.”&lt;br&gt;&lt;br&gt;
“It’s confirmed on-chain.”  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You (or anyone) can view it on a &lt;strong&gt;blockchain explorer&lt;/strong&gt; like LiskScan or Etherscan. These tools let you search by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wallet address&lt;/li&gt;
&lt;li&gt;Transaction hash&lt;/li&gt;
&lt;li&gt;Block number&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A Real-World Analogy: Certified Mail
&lt;/h2&gt;

&lt;p&gt;Here’s a way to picture the entire process using something familiar — mailing a certified letter.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Blockchain Step&lt;/th&gt;
&lt;th&gt;Certified Mail Equivalent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Create transaction in wallet&lt;/td&gt;
&lt;td&gt;Write a letter, sign the envelope&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Broadcast to network&lt;/td&gt;
&lt;td&gt;Drop it at your local post office&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mempool&lt;/td&gt;
&lt;td&gt;Letter goes into a mail sorting facility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validator adds it to block&lt;/td&gt;
&lt;td&gt;A courier picks it up and delivers it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Confirmed on-chain&lt;/td&gt;
&lt;td&gt;Recipient signs for it, and delivery is logged&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both systems involve signing, routing, validation, and a final delivery record.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wait... What’s This “Gas Fee” I’m Paying?
&lt;/h2&gt;

&lt;p&gt;On most blockchains, every transaction requires a small payment - called a &lt;strong&gt;gas fee&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You’re paying the network to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate your transaction&lt;/li&gt;
&lt;li&gt;Store it in a block&lt;/li&gt;
&lt;li&gt;Broadcast it across the chain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fees vary based on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network congestion (how full the mempool is)&lt;/li&gt;
&lt;li&gt;Complexity of your transaction (simple send vs smart contract)&lt;/li&gt;
&lt;li&gt;Priority (higher fee = faster confirmation)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;On Ethereum, gas is measured in &lt;strong&gt;gwei&lt;/strong&gt;. On Lisk, it’s based on &lt;strong&gt;LSK&lt;/strong&gt; token units.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here’s a quick comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Transaction Type&lt;/th&gt;
&lt;th&gt;Typical Gas Fee (Estimates)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Simple token transfer&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NFT mint or marketplace buy&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complex smart contract call&lt;/td&gt;
&lt;td&gt;Higher (depends on logic &amp;amp; storage)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Tip: Always check the fee before sending - wallets like MetaMask show it clearly.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How Long Does It Take?
&lt;/h2&gt;

&lt;p&gt;Transaction time depends on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The blockchain’s block time (e.g. Ethereum ~12s, Lisk ~10s)&lt;/li&gt;
&lt;li&gt;Network traffic&lt;/li&gt;
&lt;li&gt;Your fee&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Blockchain&lt;/th&gt;
&lt;th&gt;Avg Block Time&lt;/th&gt;
&lt;th&gt;Confirm Time (1 block)&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ethereum (PoS)&lt;/td&gt;
&lt;td&gt;~12 sec&lt;/td&gt;
&lt;td&gt;~12 sec&lt;/td&gt;
&lt;td&gt;High usage = higher fees&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bitcoin (PoW)&lt;/td&gt;
&lt;td&gt;~10 min&lt;/td&gt;
&lt;td&gt;~10 min&lt;/td&gt;
&lt;td&gt;Slower but more secure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lisk (PoS)&lt;/td&gt;
&lt;td&gt;~10 sec&lt;/td&gt;
&lt;td&gt;~10 sec&lt;/td&gt;
&lt;td&gt;Fast and energy-efficient&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;More confirmations = stronger finality (i.e. harder to reverse).&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;What If Two People Try to Send the Same Coins?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The blockchain uses the &lt;strong&gt;nonce&lt;/strong&gt; (a number that increases with each transaction) to prevent double spending.&lt;/p&gt;

&lt;p&gt;If someone tries to send the same coins twice, only the valid transaction with the correct nonce will be accepted. The rest will be ignored.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Why Transactions Sometimes Fail&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here are common reasons a transaction doesn’t go through:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;“Out of gas” error&lt;/td&gt;
&lt;td&gt;You didn’t pay enough to complete it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;“Nonce too low”&lt;/td&gt;
&lt;td&gt;Another transaction was already sent before this one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stuck in mempool&lt;/td&gt;
&lt;td&gt;Gas fee too low, not attractive to validators&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wrong network selected&lt;/td&gt;
&lt;td&gt;You sent tokens on the wrong chain&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Always double-check your settings before hitting Send.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Can I Try This Myself?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Yes, if you’re curious and want to see this in action, here’s a safe, free way to experiment using a test network.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install MetaMask&lt;/strong&gt; browser extension
&lt;/li&gt;
&lt;li&gt;Create a new wallet and save your secret phrase securely
&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;Lisk Sepolia&lt;/strong&gt; as a custom network
&lt;/li&gt;
&lt;li&gt;Get free test tokens from the &lt;a href="https://faucet.sepolia.lisk.com" rel="noopener noreferrer"&gt;L2 Faucet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Use MetaMask to send a small token to yourself
&lt;/li&gt;
&lt;li&gt;Go to &lt;a href="https://sepolia-blockscout.lisk.com" rel="noopener noreferrer"&gt;LiskScan&lt;/a&gt; and look up your wallet address
&lt;/li&gt;
&lt;li&gt;See your transaction as it appears on-chain&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This gives you a hands-on feel for how blockchain transactions work.&lt;/p&gt;

&lt;p&gt;Or, if this still feels early, you can just keep learning. Later articles will help build your confidence.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I’d really appreciate your questions or feedback. Did something confuse you? Let me know. Your insights help shape the next articles.&lt;/p&gt;

&lt;p&gt;Also, if there’s a non-Web3 topic you want me to cover (open source, side projects, etc), drop a comment below. If I know it, I’ll write about it. If not, I’ll point you to a good place to begin.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Stay in Touch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/hemapriya-kanagala" rel="noopener noreferrer"&gt;Follow me on GitHub&lt;/a&gt; for projects and experiments
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/hemapriya-kanagala/" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt; - I’d love to hear from you
&lt;/li&gt;
&lt;li&gt;Drop a comment or message if something clicked or confused; I read all of them.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>cryptocurrency</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A Beginner’s Guide to How Blockchain Actually Works</title>
      <dc:creator>Hemapriya Kanagala</dc:creator>
      <pubDate>Fri, 18 Jul 2025 22:44:47 +0000</pubDate>
      <link>https://forem.com/hemapriya_kanagala/beginners-guide-to-blockchain-how-it-actually-works-and-why-it-matters-2ccb</link>
      <guid>https://forem.com/hemapriya_kanagala/beginners-guide-to-blockchain-how-it-actually-works-and-why-it-matters-2ccb</guid>
      <description>&lt;p&gt;If you've ever heard the word "blockchain" and thought, “Sounds complicated... probably not for me,” you're not alone. That was me too, not long ago. But the more I dug in, the more I realized it’s not some far-off concept meant only for coders or finance experts. It’s actually a simple idea that has the potential to change how we do things online, from sending money to keeping records and building apps.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;What Is Blockchain?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Think of a digital notebook shared by many people at once. Every time someone records a transaction, it shows up instantly in everyone’s copy. No one can delete past entries or alter them without being noticed.&lt;/p&gt;

&lt;p&gt;That unchangeable, transparent, shared structure is essentially what blockchain is. The participants all maintain it - no single person owns it. That’s what “decentralized” means.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Why Does It Matter?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Today, we depend on systems like banks, messaging platforms, or organizations to handle transactions, verify identities, or secure agreements. These intermediaries add layers of trust, fees, and delays.&lt;/p&gt;

&lt;p&gt;Blockchain removes those layers by embedding trust in the system itself. People call it “trustless,” meaning you don’t have to rely on a central authority. The rules are enforced by the entire network.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;How Blocks Form a Chain&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A block is simply a collection of data - commonly a group of transactions. Inside each block you’ll find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The details of what happened
&lt;/li&gt;
&lt;li&gt;A timestamp
&lt;/li&gt;
&lt;li&gt;A unique digital signature (called a hash)
&lt;/li&gt;
&lt;li&gt;A reference to the previous block’s hash
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Linking blocks this way creates a chain. If someone tampers with a block, its hash changes and eventually the links break. That’s what makes the blockchain secure.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;How the Network Decides What’s Real&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Without a central authority, blockchains rely on a system called &lt;strong&gt;consensus&lt;/strong&gt;. All participants (called &lt;strong&gt;nodes&lt;/strong&gt;) follow a set of rules to verify transactions and add new blocks.&lt;/p&gt;

&lt;p&gt;Here are two popular methods:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Proof of Work&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Miners compete to solve a math problem. Whoever solves it adds the next block and earns a reward. This method secures the network but uses a lot of energy.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Proof of Stake&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Participants lock up some of their coins as collateral. The network chooses one to add the next block. This method is faster and uses far less energy.&lt;/p&gt;

&lt;p&gt;Most newer networks like Ethereum and Lisk use Proof of Stake today.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Public vs. Private Blockchains: What’s the Difference?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Some blockchains are open to anyone. Others are private and used within companies.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Public Blockchain&lt;/th&gt;
&lt;th&gt;Private Blockchain&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Who can use it?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Anyone&lt;/td&gt;
&lt;td&gt;Only approved users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Who controls it?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No one&lt;/td&gt;
&lt;td&gt;One organization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bitcoin, Ethereum&lt;/td&gt;
&lt;td&gt;Hyperledger, Corda&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Public ones are like a &lt;strong&gt;public park&lt;/strong&gt;. Anyone can enter and use it.&lt;br&gt;&lt;br&gt;
Private ones are more like an &lt;strong&gt;office building&lt;/strong&gt;. You need a keycard.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Quick Pause: What About Security?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;One word: &lt;strong&gt;cryptography&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Blockchains use strong math-based tools to keep things safe. Each user has two keys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;public key&lt;/strong&gt;, which is like your email address (you can share it)
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;private key&lt;/strong&gt;, which is like your password (you never share it)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, these keys help verify that transactions are real. If someone sends money, their private key is used to “sign” the transaction, proving it came from them.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Smart Contracts: Programs That Run Themselves&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This part blew my mind the first time I understood it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smart contracts&lt;/strong&gt; are self-executing agreements written in code. They live on the blockchain, and when conditions are met, they act on their own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Let’s say you hire a freelancer online. Instead of using a middleman to hold the payment, you create a smart contract. When the work is marked as done, the money automatically goes to the freelancer.&lt;/p&gt;

&lt;p&gt;No one can interfere. The contract is the boss.&lt;/p&gt;

&lt;p&gt;Smart contracts are being used in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DeFi (decentralized finance)
&lt;/li&gt;
&lt;li&gt;NFT marketplaces
&lt;/li&gt;
&lt;li&gt;Blockchain-based games
&lt;/li&gt;
&lt;li&gt;Digital voting
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Challenges and Real Solutions&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Blockchain sounds amazing, but it’s not perfect. Here are a few issues and how developers are solving them.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Scalability&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Popular blockchains can get congested and slow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use &lt;strong&gt;Layer 2&lt;/strong&gt; tools, like rollups, which process transactions more efficiently. Think of it like adding an express lane to a busy highway.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Energy Use&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Proof of Work blockchains use a ton of power.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Moving to &lt;strong&gt;Proof of Stake&lt;/strong&gt; reduces energy use by over 90 percent. Ethereum already made this change.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Regulations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Governments are still figuring out how to handle crypto and blockchain legally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
New laws are being written, and tools like &lt;strong&gt;Decentralized Identity (DID)&lt;/strong&gt; are helping users stay compliant while protecting privacy.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;What Is the Superchain?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Some projects, like those based on the &lt;strong&gt;OP Stack&lt;/strong&gt;, aim to connect blockchains together so they can share updates and improvements. &lt;strong&gt;Lisk&lt;/strong&gt; is part of this vision. The idea is a flexible, scalable, cooperative network of blockchains.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;How to Begin Yourself&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You don’t need coding skills to try it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://metamask.io/" rel="noopener noreferrer"&gt;MetaMask&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Create a wallet and save your recovery phrase
&lt;/li&gt;
&lt;li&gt;Add the Lisk Sepolia test network
&lt;/li&gt;
&lt;li&gt;Get free tokens from &lt;a href="https://www.l2faucet.com/lisk" rel="noopener noreferrer"&gt;L2 Faucet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Send a token to yourself or a friend
&lt;/li&gt;
&lt;li&gt;See the transaction on a blockchain explorer
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You’ve now used a blockchain.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Summary&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Blockchain is a secure, shared digital record
&lt;/li&gt;
&lt;li&gt;It’s decentralized - no single owner
&lt;/li&gt;
&lt;li&gt;Blockchains use cryptography and consensus to stay honest
&lt;/li&gt;
&lt;li&gt;Smart contracts let you automate agreements
&lt;/li&gt;
&lt;li&gt;There are challenges, but active solutions exist
&lt;/li&gt;
&lt;li&gt;You can try blockchain yourself without cost
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;What Comes Next&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the next article, we’ll dive into what happens when you send a transaction - from your wallet all the way to confirmation on the blockchain.&lt;/p&gt;

&lt;p&gt;I’d really appreciate your questions or feedback. Did something confuse you? Let me know. Your insights help shape the next articles.&lt;/p&gt;

&lt;p&gt;Also, if there’s a non-Web3 topic you want me to cover (open source, side projects, etc), drop a comment below. If I know it, I’ll write about it. If not, I’ll point you to a good place to begin.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Stay in Touch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/hemapriya-kanagala" rel="noopener noreferrer"&gt;Follow me on GitHub&lt;/a&gt; for projects and experiments
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/hemapriya-kanagala/" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt; - I’d love to hear from you
&lt;/li&gt;
&lt;li&gt;Drop a comment or message if something clicked or confused; I read all of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See you in Article 2.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>beginners</category>
      <category>cryptocurrency</category>
    </item>
  </channel>
</rss>
