<?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: atharv shukla</title>
    <description>The latest articles on DEV Community by atharv shukla (@atharv_shukla_f7a20a5893f).</description>
    <link>https://dev.to/atharv_shukla_f7a20a5893f</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3885599%2Fcf9414ab-2a4e-424c-9fe7-37ed1cf2556c.png</url>
      <title>DEV Community: atharv shukla</title>
      <link>https://dev.to/atharv_shukla_f7a20a5893f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atharv_shukla_f7a20a5893f"/>
    <language>en</language>
    <item>
      <title>What Building Three Token-2022 Mints Changed About How I Think About Tokens</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 12:02:14 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/what-building-three-token-2022-mints-changed-about-how-i-think-about-tokens-3njf</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/what-building-three-token-2022-mints-changed-about-how-i-think-about-tokens-3njf</guid>
      <description>&lt;p&gt;This week I built three different Token-2022 mints on Solana Devnet:&lt;/p&gt;

&lt;p&gt;A fee-bearing token&lt;br&gt;
An interest-bearing token&lt;br&gt;
A non-transferable (soulbound) token&lt;/p&gt;

&lt;p&gt;The biggest realization wasn't learning new CLI commands.&lt;/p&gt;

&lt;p&gt;It was understanding that Token-2022 lets you compose behaviors directly into a token instead of writing custom smart contracts.&lt;/p&gt;

&lt;p&gt;A transfer fee isn't middleware anymore.&lt;/p&gt;

&lt;p&gt;Interest isn't a background cron job.&lt;/p&gt;

&lt;p&gt;A soulbound badge isn't enforced by your backend.&lt;/p&gt;

&lt;p&gt;They're all properties of the mint itself.&lt;/p&gt;

&lt;p&gt;I wrote a complete technical walkthrough covering all three experiments here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/three-token-2022-mints-in-one-week-fees-yield-and-soulbound-"&gt;https://dev.to/atharv_shukla_f7a20a5893f/three-token-2022-mints-in-one-week-fees-yield-and-soulbound-&lt;/a&gt;...&lt;/p&gt;

&lt;p&gt;If you're coming from Web2 and wondering what Token-2022 actually changes, I hope it helps.&lt;/p&gt;

&lt;h1&gt;
  
  
  100DaysOfSolana
&lt;/h1&gt;

</description>
      <category>blockchain</category>
      <category>showdev</category>
      <category>tutorial</category>
      <category>web3</category>
    </item>
    <item>
      <title>Three Token-2022 Mints in One Week: Fees, Yield, and Soulbound</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 11:57:22 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/three-token-2022-mints-in-one-week-fees-yield-and-soulbound-48j3</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/three-token-2022-mints-in-one-week-fees-yield-and-soulbound-48j3</guid>
      <description>&lt;h2&gt;
  
  
  Token-2022 Is Middleware for Your Currency
&lt;/h2&gt;

&lt;p&gt;If you come from Web2, think of Token-2022 as the upgraded SPL token program on Solana — the same way you might think of Express middleware layered on top of a Node server. Instead of forking the token program to add custom behaviors, you flip extension flags at mint creation time. The runtime enforces them from that point forward. No custom smart contracts. No Rust. Just CLI commands and configuration that lives on chain forever.&lt;/p&gt;

&lt;p&gt;Every extension is stored inside the mint account using Solana's &lt;strong&gt;Type-Length-Value (TLV)&lt;/strong&gt; layout. When you enable an extension during mint creation, the account allocates extra bytes for that extension's data, which is why more features require more rent. The architecture looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              Token-2022 Mint Account
             ┌─────────────────────┐
             │   Base Mint Data    │  ← supply, decimals, authorities
             ├─────────────────────┤
             │   Transfer Fee      │  ← TLV: basis points, max fee, authorities
             ├─────────────────────┤
             │   Interest-Bearing  │  ← TLV: rate, timestamp, authority
             ├─────────────────────┤
             │   Metadata          │  ← TLV: name, symbol, uri
             ├─────────────────────┤
             │   Non-Transferable  │  ← TLV: flag (no extra data)
             └─────────────────────┘
              Extensions stack as
              additional TLV entries
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Over the past week, I shipped three mints on devnet using three different extensions. Here's exactly what I built and why each one matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mint 1: The Fee-Bearing Token (Transfer Fee Extension)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mint Address:&lt;/strong&gt; &lt;a href="https://explorer.solana.com/address/WjbwpciSWwF8XWjHKtrACU9ypK1LwpFjSgGMb4gV9Dp?cluster=devnet" rel="noopener noreferrer"&gt;&lt;code&gt;WjbwpciSWwF8XWjHKtrACU9ypK1LwpFjSgGMb4gV9Dp&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Extension:&lt;/strong&gt; &lt;code&gt;TransferFeeConfig&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The Command
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--transfer-fee-basis-points&lt;/span&gt; 100 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--transfer-fee-maximum-fee&lt;/span&gt; 1000000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--decimals&lt;/span&gt; 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This creates a token that automatically skims &lt;strong&gt;1% (100 basis points)&lt;/strong&gt; off every transfer, capped at 1,000,000 tokens. The fee is withheld in the recipient's token account, and the withdrawal authority (me) can sweep it back at any time.&lt;/p&gt;
&lt;h3&gt;
  
  
  On-Chain Proof
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;Extensions&lt;/span&gt;
  &lt;span class="s"&gt;Transfer fees&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Current fee&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;100bps&lt;/span&gt;
    &lt;span class="na"&gt;Current maximum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1000000000000&lt;/span&gt;
    &lt;span class="na"&gt;Config authority&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;BJpejz8HQwF1TciYZEBD8VGu12wdVQxq3KkcECcT1AiK&lt;/span&gt;
    &lt;span class="na"&gt;Withdrawal authority&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;BJpejz8HQwF1TciYZEBD8VGu12wdVQxq3KkcECcT1AiK&lt;/span&gt;
    &lt;span class="na"&gt;Withheld fees&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;I transferred 1,000 tokens to a second wallet and watched the protocol automatically withhold 10 tokens as the fee. Then I swept those withheld fees back with a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token withdraw-withheld-tokens &amp;lt;MY_ACCOUNT&amp;gt; &amp;lt;RECIPIENT_ACCOUNT&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When Would You Use This?
&lt;/h3&gt;

&lt;p&gt;Anytime you want the protocol itself to enforce a take rate — &lt;strong&gt;royalties on a creator token&lt;/strong&gt;, a protocol fee on a stablecoin, or a treasury skim on a community currency. The fee is baked into the mint. No one can transfer without paying it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mint 2: The Interest-Bearing Token (Transfer Fee + Interest Stacked)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mint Address:&lt;/strong&gt; &lt;a href="https://explorer.solana.com/address/GS7JaVubA3AxVbubg7tU8WsxLP2FLgMuMS82Yj8n6maL?cluster=devnet" rel="noopener noreferrer"&gt;&lt;code&gt;GS7JaVubA3AxVbubg7tU8WsxLP2FLgMuMS82Yj8n6maL&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Extensions:&lt;/strong&gt; &lt;code&gt;TransferFeeConfig&lt;/code&gt; + &lt;code&gt;InterestBearingConfig&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The Command
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--decimals&lt;/span&gt; 6 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--transfer-fee-basis-points&lt;/span&gt; 100 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--transfer-fee-maximum-fee&lt;/span&gt; 1000000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--interest-rate&lt;/span&gt; 5000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Two extensions on one mint. The transfer fee works exactly like Mint 1. The interest-bearing extension adds a &lt;strong&gt;50% APR (5000 basis points)&lt;/strong&gt; that makes the displayed balance drift upward over time.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Subtle Thing That Matters
&lt;/h3&gt;

&lt;p&gt;Here's what caught me off guard: &lt;strong&gt;the interest extension does not mint new supply&lt;/strong&gt;. It updates the &lt;em&gt;UI-displayed amount&lt;/em&gt; using a continuous compounding formula based on elapsed time. The raw token amount in the account stays the same. The "interest" is a presentation-layer calculation that wallets and explorers render.&lt;/p&gt;

&lt;p&gt;The extension changes how wallets compute and display balances. The raw token amount stored on-chain never increases. If you're building a product on top of this, you need to understand that distinction — the displayed balance and the actual balance are two different numbers.&lt;/p&gt;
&lt;h3&gt;
  
  
  On-Chain Proof
&lt;/h3&gt;

&lt;p&gt;Running &lt;code&gt;spl-token display&lt;/code&gt; on the same account 30 seconds apart:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;First check:
  1,000,000.332734

30 seconds later:
  1,000,000.730303
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The displayed balance drifts upward without any transaction. That's the interest extension at work — pure math, zero minting.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mint 3: The Soulbound Badge (Non-Transferable Extension)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mint Address:&lt;/strong&gt; &lt;a href="https://explorer.solana.com/address/295DTMWYjrVwFqRDtmCh386gfHzj3EtVtFVUQtAdRoed?cluster=devnet" rel="noopener noreferrer"&gt;&lt;code&gt;295DTMWYjrVwFqRDtmCh386gfHzj3EtVtFVUQtAdRoed&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Extension:&lt;/strong&gt; &lt;code&gt;Non-transferable&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The Command
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--enable-non-transferable&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--decimals&lt;/span&gt; 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Decimals 0, supply 1. A certificate of completion that can never leave the wallet it's minted to.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Proof: Breaking It on Purpose
&lt;/h3&gt;

&lt;p&gt;I pre-created a recipient's token account (so the transfer would actually reach the program), then tried to send my badge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;spl-token transfer 295DTMWYjrVwFqRDtmCh386gfHzj3EtVtFVUQtAdRoed 1 &lt;span class="se"&gt;\&lt;/span&gt;
  9YCJgq52Msb8tehyyokP5YNhkv2cGK2Bd83aAtwjFUdy &lt;span class="nt"&gt;--allow-unfunded-recipient&lt;/span&gt;

Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb invoke &lt;span class="o"&gt;[&lt;/span&gt;1]
Program log: Instruction: TransferChecked
Program log: Transfer is disabled &lt;span class="k"&gt;for &lt;/span&gt;this mint
Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb failed: custom program error: 0x25
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;Transfer is disabled for this mint&lt;/code&gt;&lt;/strong&gt; — error &lt;code&gt;0x25&lt;/code&gt; (decimal 37). The Token-2022 program itself refused the instruction. Not my code. Not an API layer. The &lt;em&gt;validator&lt;/em&gt; rejected it at the protocol level.&lt;/p&gt;

&lt;h3&gt;
  
  
  When Would You Use This?
&lt;/h3&gt;

&lt;p&gt;Proof-of-attendance tokens, certification badges, reputation scores, KYC stamps — any asset that should be permanently bound to its holder and never tradeable.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Extension Map
&lt;/h2&gt;

&lt;p&gt;Here's the full audit across all three mints:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mint&lt;/th&gt;
&lt;th&gt;Extensions&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;WjbwpciS...9Dp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Transfer Fees&lt;/td&gt;
&lt;td&gt;Charges 1% on every move&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GS7JaVub...maL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Transfer Fees + Interest-Bearing&lt;/td&gt;
&lt;td&gt;Charges 1% + accrues 50% APR display interest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;295DTMWY...oed&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Non-Transferable&lt;/td&gt;
&lt;td&gt;Cannot be sent, sold, or moved. Ever.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  What Surprised Me
&lt;/h2&gt;

&lt;p&gt;The biggest thing I didn't expect was how &lt;em&gt;composable&lt;/em&gt; extensions are. Stacking transfer fees and interest on one mint felt like adding two Express middlewares to a route — they don't interfere with each other, and the runtime handles the ordering.&lt;/p&gt;

&lt;p&gt;The non-transferable extension was the most visceral. Seeing the validator print &lt;code&gt;Transfer is disabled for this mint&lt;/code&gt; and reject your instruction at the protocol level hits differently than a 403 from an API. There's no backdoor. There's no admin panel. The rule lives in the bytes of the mint account, readable by anyone, enforceable by the network.&lt;/p&gt;

&lt;p&gt;After building these three mints, the biggest takeaway for me is that Token-2022 turns token behavior into configuration rather than application logic. Instead of writing separate smart contracts for fees, rewards, or credentials, you compose extensions directly into the mint and let the Solana runtime enforce those rules everywhere the token is used.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post is part of my &lt;a href="https://dev.to/t/100daysofsolana"&gt;#100DaysOfSolana&lt;/a&gt; journey. Follow along for daily hands-on Solana experiments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>100daysofsolana</category>
      <category>solana</category>
      <category>web3</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Day 49 of #100DaysOfSolana: From Minting My First NFT to Building On-Chain Collections</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 11:24:04 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/day-49-of-100daysofsolana-from-minting-my-first-nft-to-building-on-chain-collections-hhg</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/day-49-of-100daysofsolana-from-minting-my-first-nft-to-building-on-chain-collections-hhg</guid>
      <description>&lt;h1&gt;
  
  
  Day 49 of #100DaysOfSolana 🚀
&lt;/h1&gt;

&lt;p&gt;Over the past week, I went from knowing almost nothing about Solana NFTs to building a complete NFT collection using the &lt;strong&gt;Token-2022&lt;/strong&gt; program.&lt;/p&gt;

&lt;p&gt;One thing completely changed my understanding:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An NFT isn't a special kind of blockchain object. It's simply a token mint configured with the right properties and extensions.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;During this NFT arc I learned how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Mint a 1-of-1 NFT (Supply = 1, Decimals = 0)&lt;/li&gt;
&lt;li&gt;✅ Disable the Mint Authority to permanently lock the supply&lt;/li&gt;
&lt;li&gt;✅ Store metadata directly on-chain using the Metadata extension&lt;/li&gt;
&lt;li&gt;✅ Create NFT collections using the Group and Member extensions&lt;/li&gt;
&lt;li&gt;✅ Audit NFT state directly from the blockchain&lt;/li&gt;
&lt;li&gt;✅ Update NFT metadata live on Devnet&lt;/li&gt;
&lt;li&gt;✅ Understand the difference between on-chain metadata and off-chain images&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of my favorite moments was updating an NFT's metadata with a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token update-metadata &amp;lt;MINT&amp;gt; name &lt;span class="s2"&gt;"Field Notes"&lt;/span&gt;
spl-token update-metadata &amp;lt;MINT&amp;gt; rarity legendary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Watching those changes appear on Solana Explorer made me realize that NFTs aren't static JPEGs—they can be programmable digital assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Biggest Takeaway
&lt;/h2&gt;

&lt;p&gt;Coming from Web2, I expected NFTs to require complicated smart contracts.&lt;/p&gt;

&lt;p&gt;Instead, I discovered that Solana's &lt;strong&gt;Token Extensions (Token-2022)&lt;/strong&gt; provide many advanced capabilities directly at the protocol level.&lt;/p&gt;

&lt;p&gt;Metadata, collections, transfer rules, and many other behaviors are built into the token itself rather than implemented separately in application code.&lt;/p&gt;

&lt;p&gt;That was probably the biggest mental shift for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read the Full Technical Deep Dive
&lt;/h2&gt;

&lt;p&gt;I documented everything I learned in detail here:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Solana NFTs Without Metaplex: What I Learned Building NFTs with Token Extensions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/solana-nfts-without-metaplex-what-i-learned-building-nfts-with-token-extensions-28n"&gt;https://dev.to/atharv_shukla_f7a20a5893f/solana-nfts-without-metaplex-what-i-learned-building-nfts-with-token-extensions-28n&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're a Web2 developer curious about how NFTs actually work under the hood on Solana, I hope it helps.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post is part of my *&lt;/em&gt;#100DaysOfSolana** journey. Every day I'm learning something new about building on Solana, one challenge at a time.*&lt;/p&gt;

</description>
      <category>solana</category>
      <category>nft</category>
      <category>blockchain</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Solana NFTs Without Metaplex: What I Learned Building NFTs with Token Extensions</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 11:19:22 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/solana-nfts-without-metaplex-what-i-learned-building-nfts-with-token-extensions-28n</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/solana-nfts-without-metaplex-what-i-learned-building-nfts-with-token-extensions-28n</guid>
      <description>&lt;h1&gt;
  
  
  Solana NFTs Without Metaplex: What I Learned Building NFTs with Token Extensions 🎨
&lt;/h1&gt;

&lt;p&gt;Before this week, I assumed every NFT on Solana required Metaplex. After spending several days building on Devnet, I realized that isn't the whole story.&lt;/p&gt;

&lt;p&gt;Using &lt;strong&gt;Token-2022 (SPL Token Extensions)&lt;/strong&gt;, I built NFTs with on-chain metadata, grouped them into collections, audited their state directly on-chain, and even updated their metadata live—all without relying on Metaplex.&lt;/p&gt;

&lt;p&gt;This post summarizes the biggest concepts that clicked for me.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧠 What is a Solana NFT?
&lt;/h1&gt;

&lt;p&gt;Coming from Web2, I initially thought NFTs were just images stored on a blockchain.&lt;/p&gt;

&lt;p&gt;That isn't really true.&lt;/p&gt;

&lt;p&gt;A Solana NFT is fundamentally just an SPL Token Mint configured with a few important properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supply = &lt;strong&gt;1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Decimals = &lt;strong&gt;0&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Mint Authority disabled&lt;/li&gt;
&lt;li&gt;Metadata attached to the mint&lt;/li&gt;
&lt;li&gt;Optional collection membership&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it like a database record.&lt;/p&gt;

&lt;p&gt;Instead of&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Users
Products
Orders
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you have&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mint
Metadata
Collection
Owner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mint address acts like the primary key, while metadata and collection information provide the additional context that wallets and marketplaces use to render the NFT.&lt;/p&gt;




&lt;h1&gt;
  
  
  🛠️ What I Built
&lt;/h1&gt;

&lt;p&gt;During this NFT arc I progressively built more complex assets.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A 1-of-1 NFT
&lt;/h3&gt;

&lt;p&gt;The journey started with the simplest NFT possible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="nt"&gt;--decimals&lt;/span&gt; 0
spl-token mint &amp;lt;MINT&amp;gt; 1
spl-token authorize &amp;lt;MINT&amp;gt; mint &lt;span class="nt"&gt;--disable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After disabling the mint authority, no additional copies could ever be created.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. On-chain Metadata
&lt;/h3&gt;

&lt;p&gt;Next, I enabled the Token Metadata extension.&lt;/p&gt;

&lt;p&gt;Instead of relying on separate metadata accounts, Token-2022 lets metadata live directly on the mint itself.&lt;/p&gt;

&lt;p&gt;I added:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Symbol&lt;/li&gt;
&lt;li&gt;Metadata URI&lt;/li&gt;
&lt;li&gt;Image&lt;/li&gt;
&lt;li&gt;Attributes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;which immediately appeared inside Solana Explorer.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. NFT Collections
&lt;/h3&gt;

&lt;p&gt;Instead of leaving NFTs independent, I grouped them into an on-chain collection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                Solana Sketchbook
                     │
        ┌────────────┴────────────┐
        │                         │
     Sketch #1               Sketch #2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Collection Mint stores the &lt;strong&gt;Group Extension&lt;/strong&gt;, while each NFT stores a &lt;strong&gt;Group Member Extension&lt;/strong&gt; pointing back to its parent collection.&lt;/p&gt;

&lt;p&gt;This felt very similar to foreign keys in relational databases.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Live Metadata Updates
&lt;/h3&gt;

&lt;p&gt;The most interesting experiment was updating metadata after minting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token update-metadata &amp;lt;MINT&amp;gt; name &lt;span class="s2"&gt;"Field Notes"&lt;/span&gt;

spl-token update-metadata &amp;lt;MINT&amp;gt; rarity legendary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Refreshing Solana Explorer immediately showed the updated values.&lt;/p&gt;

&lt;p&gt;Watching blockchain data behave like editable database rows completely changed how I think about NFTs.&lt;/p&gt;




&lt;h1&gt;
  
  
  ⚡ What Surprised Me
&lt;/h1&gt;

&lt;p&gt;The biggest surprise wasn't creating the NFT.&lt;/p&gt;

&lt;p&gt;It was realizing that &lt;strong&gt;the NFT itself is just structured on-chain data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The image isn't stored on-chain.&lt;/p&gt;

&lt;p&gt;Instead, the NFT stores a URI pointing to a JSON file.&lt;/p&gt;

&lt;p&gt;That JSON then points to the actual image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NFT

↓

Metadata URI

↓

metadata.json

↓

Image URL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Changing the metadata happens immediately because it's stored on-chain.&lt;/p&gt;

&lt;p&gt;Changing the image may take longer because wallets cache the off-chain assets.&lt;/p&gt;

&lt;p&gt;That distinction between &lt;strong&gt;on-chain state&lt;/strong&gt; and &lt;strong&gt;off-chain resources&lt;/strong&gt; was probably the biggest lesson from this week.&lt;/p&gt;




&lt;h1&gt;
  
  
  🚀 What's Next?
&lt;/h1&gt;

&lt;p&gt;Now that I understand how NFTs are built with Token Extensions, I'd like to explore more advanced functionality such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transfer Hooks&lt;/li&gt;
&lt;li&gt;Royalty enforcement&lt;/li&gt;
&lt;li&gt;Programmable NFTs&lt;/li&gt;
&lt;li&gt;Metaplex Core&lt;/li&gt;
&lt;li&gt;Dynamic game assets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm particularly interested in seeing how these extensions can be combined to build gaming assets, memberships, and digital credentials.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This week completely changed my understanding of Solana NFTs.&lt;/p&gt;

&lt;p&gt;Instead of thinking of NFTs as "JPEGs on the blockchain," I now think of them as programmable digital assets whose behavior and metadata are stored directly on-chain.&lt;/p&gt;

&lt;p&gt;That mental model feels much closer to how software engineers already think about data structures and databases.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;This post is part of my #100DaysOfSolana journey.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>solana</category>
      <category>nft</category>
      <category>blockchain</category>
      <category>webdev</category>
    </item>
    <item>
      <title>title: "3 Things That Changed How I Think About Solana Tokens"</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 09:05:09 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/title-3-things-that-changed-how-i-think-about-solana-tokens-16k0</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/title-3-things-that-changed-how-i-think-about-solana-tokens-16k0</guid>
      <description>&lt;h1&gt;
  
  
  3 Things That Changed How I Think About Solana Tokens
&lt;/h1&gt;

&lt;p&gt;Over the past week, while exploring Solana's Token-2022 Program, I realized that tokens can represent much more than digital currencies.&lt;/p&gt;

&lt;p&gt;Here are the three biggest lessons that changed how I think about blockchain assets.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Tokens Can Behave Like Savings Accounts
&lt;/h2&gt;

&lt;p&gt;Using the &lt;strong&gt;Interest-Bearing Extension&lt;/strong&gt;, I created a token whose displayed balance grows over time without changing the raw on-chain balance.&lt;/p&gt;

&lt;p&gt;Instead of constantly minting new tokens, wallets calculate the interest-adjusted balance using the interest rate and elapsed time.&lt;/p&gt;

&lt;p&gt;This felt much closer to how modern banking applications display accrued interest.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Tokens Can Enforce Compliance
&lt;/h2&gt;

&lt;p&gt;One extension that really surprised me was &lt;strong&gt;Default Account State&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By configuring new token accounts to start in the &lt;strong&gt;Frozen&lt;/strong&gt; state, nobody could receive or transfer tokens until the account was explicitly approved.&lt;/p&gt;

&lt;p&gt;This is exactly how regulated financial systems and KYC workflows operate.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Credentials Don't Have to Be Tradable
&lt;/h2&gt;

&lt;p&gt;The most interesting experiment was combining:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-Transferable&lt;/li&gt;
&lt;li&gt;Permanent Delegate&lt;/li&gt;
&lt;li&gt;Metadata&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;to build a revocable digital credential.&lt;/p&gt;

&lt;p&gt;The credential:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;belongs permanently to one wallet,&lt;/li&gt;
&lt;li&gt;cannot be transferred,&lt;/li&gt;
&lt;li&gt;can still be revoked by the issuing authority.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This models real-world certificates, employee badges, and professional licenses surprisingly well.&lt;/p&gt;




&lt;h2&gt;
  
  
  Biggest Takeaway
&lt;/h2&gt;

&lt;p&gt;Before this week, I thought blockchain tokens were simply balances stored on-chain.&lt;/p&gt;

&lt;p&gt;Now I see them as programmable digital assets capable of representing financial products, regulated assets, memberships, and digital identities.&lt;/p&gt;

&lt;p&gt;That completely changed how I think about Web3 development.&lt;/p&gt;




&lt;p&gt;If you're interested in the technical implementation, CLI commands, and extension configurations, I documented everything in my full deep dive:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Beyond Simple Transfers: 3 Solana Token Extension Patterns I Built This Week&lt;/strong&gt;&lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/beyond-simple-transfers-3-solana-token-extension-patterns-i-built-this-week-1406" class="crayons-story__hidden-navigation-link"&gt;Beyond Simple Transfers: 3 Solana Token Extension Patterns I Built This Week&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/atharv_shukla_f7a20a5893f" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3885599%2Fcf9414ab-2a4e-424c-9fe7-37ed1cf2556c.png" alt="atharv_shukla_f7a20a5893f profile" class="crayons-avatar__image" width="96" height="96"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/atharv_shukla_f7a20a5893f" class="crayons-story__secondary fw-medium m:hidden"&gt;
              atharv shukla
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                atharv shukla
                
              
              &lt;div id="story-author-preview-content-4148523" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/atharv_shukla_f7a20a5893f" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3885599%2Fcf9414ab-2a4e-424c-9fe7-37ed1cf2556c.png" class="crayons-avatar__image" alt="" width="96" height="96"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;atharv shukla&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/beyond-simple-transfers-3-solana-token-extension-patterns-i-built-this-week-1406" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 15&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/beyond-simple-transfers-3-solana-token-extension-patterns-i-built-this-week-1406" id="article-link-4148523"&gt;
          Beyond Simple Transfers: 3 Solana Token Extension Patterns I Built This Week
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/solana"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;solana&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/blockchain"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;blockchain&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/web3"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;web3&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/learning"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;learning&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/beyond-simple-transfers-3-solana-token-extension-patterns-i-built-this-week-1406#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;





&lt;p&gt;&lt;em&gt;Part of my #100DaysOfSolana journey.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>solana</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>learning</category>
    </item>
    <item>
      <title>Beyond Simple Transfers: 3 Solana Token Extension Patterns I Built This Week</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 08:56:25 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/beyond-simple-transfers-3-solana-token-extension-patterns-i-built-this-week-1406</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/beyond-simple-transfers-3-solana-token-extension-patterns-i-built-this-week-1406</guid>
      <description>&lt;h1&gt;
  
  
  Beyond Simple Transfers: 3 Solana Token Extension Patterns I Built This Week 🚀
&lt;/h1&gt;

&lt;p&gt;When most developers think about blockchain tokens, they imagine simple assets that move freely between wallets. That's how ERC-20 tokens work, and it's what I initially expected when I started learning Solana.&lt;/p&gt;

&lt;p&gt;This week, while exploring Solana's &lt;strong&gt;Token-2022 Program&lt;/strong&gt;, I realized that tokens can behave much more like real-world financial assets and digital credentials. Instead of writing custom smart contracts for every rule, Solana lets you configure those rules directly into the token itself.&lt;/p&gt;

&lt;p&gt;Over the past few days, I experimented with three different Token Extension patterns that solve real-world problems.&lt;/p&gt;




&lt;h1&gt;
  
  
  1. Interest-Bearing Tokens
&lt;/h1&gt;

&lt;p&gt;Think about a savings account.&lt;/p&gt;

&lt;p&gt;Your bank doesn't constantly mint new money into your account every second. Instead, it stores your balance and calculates accrued interest whenever you view it.&lt;/p&gt;

&lt;p&gt;Solana's &lt;strong&gt;Interest-Bearing Extension&lt;/strong&gt; follows a similar idea.&lt;/p&gt;

&lt;p&gt;The raw token balance never changes on-chain. Instead, the mint stores:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interest rate&lt;/li&gt;
&lt;li&gt;Initialization timestamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wallets calculate the displayed balance dynamically using those values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating an interest-bearing token
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--interest-rate&lt;/span&gt; 500
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later, I updated the rate to make the effect more visible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token set-interest-rate &amp;lt;MINT_ADDRESS&amp;gt; 15000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This taught me that Solana separates the &lt;strong&gt;ledger balance&lt;/strong&gt; from the &lt;strong&gt;displayed balance&lt;/strong&gt;, making continuous compounding possible without constantly modifying account balances.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Compliance-Gated Tokens (Default Frozen)
&lt;/h1&gt;

&lt;p&gt;Not every asset should be usable immediately.&lt;/p&gt;

&lt;p&gt;Think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bank accounts&lt;/li&gt;
&lt;li&gt;Brokerage accounts&lt;/li&gt;
&lt;li&gt;KYC verification&lt;/li&gt;
&lt;li&gt;Employee onboarding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;New users often need approval before they can transact.&lt;/p&gt;

&lt;p&gt;Using the &lt;strong&gt;Default Account State&lt;/strong&gt; extension, every newly created token account starts in a &lt;strong&gt;Frozen&lt;/strong&gt; state.&lt;/p&gt;

&lt;p&gt;Only the &lt;strong&gt;Freeze Authority&lt;/strong&gt; can approve (thaw) the account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating the mint
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--enable-freeze&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--default-account-state&lt;/span&gt; frozen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trying to mint immediately resulted in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Account is frozen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After thawing the account,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token thaw &amp;lt;TOKEN_ACCOUNT&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;minting succeeded normally.&lt;/p&gt;

&lt;p&gt;This pattern maps directly to regulated financial systems where accounts must pass compliance checks before becoming active.&lt;/p&gt;




&lt;h1&gt;
  
  
  3. Revocable Digital Credentials
&lt;/h1&gt;

&lt;p&gt;This became my favorite Token-2022 pattern.&lt;/p&gt;

&lt;p&gt;Imagine issuing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;University degrees&lt;/li&gt;
&lt;li&gt;Employee ID cards&lt;/li&gt;
&lt;li&gt;Professional certifications&lt;/li&gt;
&lt;li&gt;DAO membership badges&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These credentials should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;belong permanently to one person&lt;/li&gt;
&lt;li&gt;never be transferable&lt;/li&gt;
&lt;li&gt;still be revocable by the issuer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To achieve this, I combined three extensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-Transferable&lt;/li&gt;
&lt;li&gt;Permanent Delegate&lt;/li&gt;
&lt;li&gt;Metadata
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--decimals&lt;/span&gt; 0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--enable-non-transferable&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--enable-permanent-delegate&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--enable-metadata&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;Non-Transferable&lt;/strong&gt; extension prevents the holder from transferring the credential.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Permanent Delegate&lt;/strong&gt; allows the issuer to revoke the credential by burning it directly from the holder's account.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Metadata&lt;/strong&gt; extension stores human-readable information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credential name&lt;/li&gt;
&lt;li&gt;Symbol&lt;/li&gt;
&lt;li&gt;Metadata URI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, these extensions model how real-world certifications work.&lt;/p&gt;




&lt;h1&gt;
  
  
  What Surprised Me
&lt;/h1&gt;

&lt;p&gt;The biggest surprise wasn't the extensions themselves.&lt;/p&gt;

&lt;p&gt;It was realizing that Solana treats token behavior as &lt;strong&gt;protocol-level configuration&lt;/strong&gt; rather than application logic.&lt;/p&gt;

&lt;p&gt;In a traditional Web2 application, these features would require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backend APIs&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;li&gt;Scheduled jobs&lt;/li&gt;
&lt;li&gt;Access-control middleware&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With Token-2022, they're enforced directly by the blockchain.&lt;/p&gt;




&lt;h1&gt;
  
  
  Storage Isn't Free
&lt;/h1&gt;

&lt;p&gt;Every extension adds extra data to the mint account.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Larger account size&lt;/li&gt;
&lt;li&gt;Higher rent-exempt deposit&lt;/li&gt;
&lt;li&gt;More features&lt;/li&gt;
&lt;li&gt;Slightly higher creation cost&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, I observed that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interest-bearing tokens used less storage than multi-extension tokens.&lt;/li&gt;
&lt;li&gt;Tokens combining metadata, transfer fees, and interest required significantly larger mint accounts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a useful reminder that protocol features come with storage costs.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Before this week, I thought blockchain tokens were simply balances stored on-chain.&lt;/p&gt;

&lt;p&gt;After experimenting with Token-2022, I now see them as programmable digital assets that can model real-world business rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Savings accounts&lt;/li&gt;
&lt;li&gt;Regulated financial assets&lt;/li&gt;
&lt;li&gt;Employee credentials&lt;/li&gt;
&lt;li&gt;University certificates&lt;/li&gt;
&lt;li&gt;Loyalty programs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;without writing custom smart contracts.&lt;/p&gt;

&lt;p&gt;Token Extensions have completely changed how I think about token design on Solana.&lt;/p&gt;

&lt;p&gt;If you're starting with Solana development, I highly recommend experimenting with Token-2022. Building these examples yourself makes the concepts much easier to understand than simply reading the documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://solana.com/docs/core/tokens" rel="noopener noreferrer"&gt;https://solana.com/docs/core/tokens&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://spl.solana.com/token-2022" rel="noopener noreferrer"&gt;https://spl.solana.com/token-2022&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post is part of my #100DaysOfSolana journey.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>solana</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>learning</category>
    </item>
    <item>
      <title>Day 35 of #100DaysOfSolana: The Moment Token-2022 Finally Clicked</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 07:53:37 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/day-35-of-100daysofsolana-the-moment-token-2022-finally-clicked-2h7f</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/day-35-of-100daysofsolana-the-moment-token-2022-finally-clicked-2h7f</guid>
      <description>&lt;p&gt;This week, I explored Solana's &lt;strong&gt;Token-2022&lt;/strong&gt; program by building custom SPL tokens with metadata, protocol-level transfer fees, and non-transferable (Soulbound) extensions using the Solana CLI.&lt;/p&gt;

&lt;p&gt;Out of everything I built this week, one moment stood out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Experiment
&lt;/h2&gt;

&lt;p&gt;After creating a &lt;strong&gt;non-transferable (Soulbound) token&lt;/strong&gt;, I generated a second wallet and attempted to transfer the token.&lt;/p&gt;

&lt;p&gt;Instead of succeeding, the blockchain rejected the transaction with the following message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Program log: Transfer is disabled for this mint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That single line completely changed how I think about blockchain applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Biggest Lesson
&lt;/h2&gt;

&lt;p&gt;Coming from a Web2 background, I'm used to enforcing rules through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backend APIs&lt;/li&gt;
&lt;li&gt;Database constraints&lt;/li&gt;
&lt;li&gt;Frontend validation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On Solana, Token-2022 lets the &lt;strong&gt;asset itself&lt;/strong&gt; define its behavior.&lt;/p&gt;

&lt;p&gt;A non-transferable token doesn't rely on an application deciding whether a transfer is allowed. The &lt;strong&gt;Token-2022 program enforces the rule directly at the protocol level&lt;/strong&gt;, meaning every wallet, application, and SDK automatically follows it.&lt;/p&gt;

&lt;p&gt;That distinction between &lt;strong&gt;application-layer logic&lt;/strong&gt; and &lt;strong&gt;protocol-layer logic&lt;/strong&gt; was the biggest takeaway from this week's learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Next, I'll be implementing these same token interactions using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@solana/web3.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@solana/spl-token&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;before moving into on-chain development with &lt;strong&gt;Anchor Framework&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I also documented my complete journey—from creating my first token mint to experimenting with metadata, transfer fees, and Soulbound tokens—in my previous article:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://dev.to/atharv_shukla_f7a20a5893f/from-setup-to-soulbound-tokens-my-journey-into-solana-token-extensions-393m"&gt;https://dev.to/atharv_shukla_f7a20a5893f/from-setup-to-soulbound-tokens-my-journey-into-solana-token-extensions-393m&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for following along!&lt;/p&gt;

&lt;h1&gt;
  
  
  100DaysOfSolana
&lt;/h1&gt;

</description>
      <category>solana</category>
      <category>blockchain</category>
      <category>webdev</category>
      <category>rust</category>
    </item>
    <item>
      <title>From Setup to Soulbound Tokens: My Journey into Solana Token Extensions</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Wed, 15 Jul 2026 07:43:30 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/from-setup-to-soulbound-tokens-my-journey-into-solana-token-extensions-393m</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/from-setup-to-soulbound-tokens-my-journey-into-solana-token-extensions-393m</guid>
      <description>&lt;p&gt;Building on Web2 platforms usually means accepting the constraints of databases you don't control and rules enforced by someone else’s application logic. But what happens when the logic lives on the protocol level, and you hold the keys?&lt;/p&gt;

&lt;p&gt;Over the past week, as part of my #100DaysOfSolana journey, I’ve gone from installing the Solana CLI to creating custom tokens with built-in metadata, permanent transfer fees, and even non-transferable "Soulbound" credentials. This is a look at what I built, how it works, and what surprised me along the way.&lt;/p&gt;

&lt;p&gt;Context: Why Solana Token Extensions?&lt;/p&gt;

&lt;p&gt;Before diving in, I assumed creating a token on a blockchain was as simple as writing a smart contract and deploying it. But on Solana, things work a bit differently. Instead of every developer writing their own custom smart contracts for tokens (like ERC-20 on Ethereum), Solana uses a standardized program called the SPL Token Program.&lt;/p&gt;

&lt;p&gt;The Token Extensions Program (commonly called Token-2022) is an upgraded version of the original SPL Token Program that adds protocol-level features like metadata pointers, transfer fees, confidential transfers, and non-transferable (soulbound) tokens. I spent my week exploring exactly what this new program can do.&lt;/p&gt;

&lt;p&gt;The Walkthrough: Building the Tokens&lt;/p&gt;

&lt;p&gt;Here is a breakdown of the core token features I built using the Solana CLI and the Token Extensions program.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Foundation: Minting My First Token&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before getting into the fancy extensions, I needed to understand the basics. In Solana, a &lt;strong&gt;Mint&lt;/strong&gt; is the blueprint for a token. It doesn't hold tokens; it simply defines them.&lt;/p&gt;

&lt;p&gt;Using the CLI, creating a mint on Devnet was incredibly fast:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the &lt;code&gt;--program-id Tokenz...&lt;/code&gt; flag? That tells the network to use the new &lt;strong&gt;Token-2022&lt;/strong&gt; program instead of the legacy SPL Token Program.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Giving it an Identity: The Metadata Extension&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A token is just a string of numbers until you give it a name and a logo. Previously, metadata on Solana required interacting with a completely separate program (Metaplex). With Token-2022, you can embed metadata pointers directly into the token mint itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token initialize-metadata &amp;lt;MINT_ADDRESS&amp;gt; &lt;span class="s2"&gt;"My Awesome Token"&lt;/span&gt; &lt;span class="s2"&gt;"MAT"&lt;/span&gt; &lt;span class="s2"&gt;"https://my-metadata-url.json"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single command gave my token a name, ticker symbol, and a pointer to off-chain JSON metadata. No additional smart contracts were required.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Enforcing Economics: The Transfer Fee Extension&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is where things became really interesting.&lt;/p&gt;

&lt;p&gt;In traditional finance or gaming platforms, operators often take a small percentage from every transaction. On a blockchain, however, users can transfer assets directly between wallets without any middleman.&lt;/p&gt;

&lt;p&gt;Using the Transfer Fee Extension, I configured my token to automatically deduct a 50 basis point (0.5%) fee on every transfer while also setting a maximum fee limit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--transfer-fee&lt;/span&gt; 50 50000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The most impressive part was that this rule is enforced by the blockchain itself—not by a website or frontend application. Every wallet or application interacting with the token must respect the transfer fee because it is part of the token's protocol-level behavior.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Digital Credentials: The Non-Transferable Extension&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, I experimented with Soulbound Tokens.&lt;/p&gt;

&lt;p&gt;In Web2, things like verification badges, employee IDs, and course certificates stay attached to your account. They aren't supposed to be sold or transferred.&lt;/p&gt;

&lt;p&gt;The Non-Transferable Extension brings the same concept to blockchain assets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-token &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--enable-non-transferable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I minted a few tokens and then attempted to transfer them to another wallet.&lt;/p&gt;

&lt;p&gt;Instead of succeeding, the network rejected the transaction with the following message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Program log: Transfer is disabled for this mint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That failure was actually the success of the experiment.&lt;/p&gt;

&lt;p&gt;Unlike a frontend validation or backend API check, this restriction exists directly inside the Token-2022 program itself. No wallet, application, or script can bypass it.&lt;/p&gt;

&lt;p&gt;Interestingly, although transfers are blocked, the token owner can still burn (destroy) the token if they choose. This makes it perfect for credentials such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;University certificates&lt;/li&gt;
&lt;li&gt;KYC verification badges&lt;/li&gt;
&lt;li&gt;Event participation NFTs&lt;/li&gt;
&lt;li&gt;Employee IDs&lt;/li&gt;
&lt;li&gt;Membership credentials&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;What Surprised Me&lt;/p&gt;

&lt;p&gt;The biggest "aha!" moment for me was understanding the difference between application-layer logic and protocol-layer logic.&lt;/p&gt;

&lt;p&gt;As a Web2 developer, I'm used to enforcing rules through backend APIs, databases, and frontend validation. If I don't want users to transfer something, I simply disable the button or reject the API request.&lt;/p&gt;

&lt;p&gt;On Solana, things work very differently.&lt;/p&gt;

&lt;p&gt;By enabling a single flag during token creation, the blockchain itself becomes responsible for enforcing the rule. Every application, wallet, explorer, and SDK automatically follows the same behavior because the rule is part of the token's definition—not the application's implementation.&lt;/p&gt;

&lt;p&gt;It completely changed the way I think about where business logic should live.&lt;/p&gt;




&lt;p&gt;What's Next?&lt;/p&gt;

&lt;p&gt;Building everything through the CLI gave me a solid understanding of how accounts, token mints, and extensions actually work under the hood.&lt;/p&gt;

&lt;p&gt;My next goal is to move these concepts into JavaScript using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@solana/web3.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@solana/spl-token&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I want to build a frontend application where users can create and interact with custom Token-2022 assets directly from their browser.&lt;/p&gt;

&lt;p&gt;A week ago, terms like &lt;strong&gt;Mint&lt;/strong&gt;, &lt;strong&gt;Metadata Pointers&lt;/strong&gt;, and &lt;strong&gt;Token-2022&lt;/strong&gt; were simply buzzwords to me.&lt;/p&gt;

&lt;p&gt;After building these tokens myself, I now understand that Solana isn't just about creating cryptocurrencies—it's about creating programmable digital assets whose behavior is enforced directly by the blockchain itself.&lt;/p&gt;

&lt;p&gt;That shift in perspective has been one of the most valuable lessons I've learned during this journey, and I'm excited to keep building.&lt;/p&gt;

&lt;p&gt;Helpful Resources&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Solana Tokens: &lt;a href="https://solana.com/docs/core/tokens" rel="noopener noreferrer"&gt;https://solana.com/docs/core/tokens&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Token Extensions (Token-2022): &lt;a href="https://solana.com/docs/core/tokens/token-2022" rel="noopener noreferrer"&gt;https://solana.com/docs/core/tokens/token-2022&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;SPL Token CLI: &lt;a href="https://spl.solana.com/token" rel="noopener noreferrer"&gt;https://spl.solana.com/token&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This post was created as part of the &lt;strong&gt;#100DaysOfSolana&lt;/strong&gt; challenge.&lt;/p&gt;

</description>
      <category>solana</category>
      <category>blockchain</category>
      <category>webdev</category>
      <category>rust</category>
    </item>
    <item>
      <title>Day 27: Writing About the Solana Account Model</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Tue, 30 Jun 2026 10:45:29 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/day-27-writing-about-the-solana-account-model-2597</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/day-27-writing-about-the-solana-account-model-2597</guid>
      <description>&lt;p&gt;Today, I took a step back from writing code to write about the core architectural foundation of Solana: &lt;strong&gt;The Account Model&lt;/strong&gt;. To solidify my understanding, I wrote a comprehensive article aimed at Web2 developers who are new to blockchain, explaining how Solana manages state.&lt;/p&gt;

&lt;p&gt;Below is the draft of the article, formatted for publishing on &lt;a href="https://dev.to"&gt;DEV.to&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;DEV.to Article Draft&lt;/p&gt;

&lt;p&gt;Title: Demystifying the Solana Account Model: A Guide for Web2 Developers&lt;br&gt;
Tags: &lt;code&gt;solana&lt;/code&gt;, &lt;code&gt;blockchain&lt;/code&gt;, &lt;code&gt;web3&lt;/code&gt;, &lt;code&gt;beginners&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you are a Web2 developer dipping your toes into the Web3 waters, blockchain architecture can feel incredibly alien. You hear terms like "smart contracts," "state," and "ledgers," and you try to map them to things you know. &lt;/p&gt;

&lt;p&gt;If you look at Ethereum, it might make sense at first: it uses an Account-based model where you have Externally Owned Accounts (EOAs, like your MetaMask wallet) and Contract Accounts (which contain both the code and the state/variables of a smart contract). This feels a bit like Object-Oriented Programming, where an object contains both its methods (code) and its properties (state).&lt;/p&gt;

&lt;p&gt;But then you look at Solana, and everything you thought you understood gets flipped on its head. &lt;/p&gt;

&lt;p&gt;On Solana, programs are completely stateless, and everything is an account. &lt;/p&gt;

&lt;p&gt;Let's break down Solana’s Account Model using Web2 concepts you already use daily.&lt;/p&gt;

&lt;p&gt;The Ultimate Analogy: Solana as a Filesystem&lt;/p&gt;

&lt;p&gt;The easiest way to understand Solana's account model is to think of the entire blockchain as a global, decentralized filesystem.&lt;/p&gt;

&lt;p&gt;The Ledger is the Hard Drive: A massive, shared storage space.&lt;br&gt;
Accounts are Files: Every piece of information on Solana lives inside an "account," which acts just like a file.&lt;br&gt;
Public Keys are File Paths: Every account has a unique 32-byte address (like &lt;code&gt;BPFLoaderUpgradeab1e11111111111111111111111&lt;/code&gt; or a wallet address). Think of this public key as the absolute path to the file (e.g., &lt;code&gt;/users/alice/data.json&lt;/code&gt;).&lt;br&gt;
The System Program is the OS Kernel: The underlying operating system kernel that manages file creation, allocating size, and assigning permissions.&lt;/p&gt;

&lt;p&gt;Just like a file on your computer has metadata (file size, owner, read/write permissions) and file contents, a Solana account contains metadata and a raw byte array for data.&lt;/p&gt;

&lt;p&gt;The Anatomy of an Account: The 5 Fields&lt;/p&gt;

&lt;p&gt;Every single account on Solana shares the exact same basic structure. When you query an account using the Solana command-line interface (&lt;code&gt;solana account &amp;lt;ADDRESS&amp;gt;&lt;/code&gt;), the JSON response reveals five main fields:&lt;/p&gt;

&lt;p&gt;json&lt;br&gt;
{&lt;br&gt;
  "pubkey": "3zcpeKkCFg1z3sR1u1qQcm6h4n5t282a5cQ5bX2gYp3Z",&lt;br&gt;
  "account": {&lt;br&gt;
    "lamports": 124806720,&lt;br&gt;
    "data": ["...", "base64"],&lt;br&gt;
    "owner": "BPFLoaderUpgradeab1e11111111111111111111111",&lt;br&gt;
    "executable": true,&lt;br&gt;
    "rentEpoch": 18446744073709551615&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Let's unpack what these fields represent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;lamports (The SOL Balance): A lamport is the smallest fractional unit of SOL, named after Leslie Lamport (think of it like a Satoshi for Bitcoin or a Wei for Ethereum). &lt;code&gt;1 SOL = 1,000,000,000 lamports&lt;/code&gt;. This balance is used to pay for storage and transaction fees.&lt;/li&gt;
&lt;li&gt;data (The File Contents): A raw byte array (&lt;code&gt;Vec&amp;lt;u8&amp;gt;&lt;/code&gt;) containing the actual state stored by this account. For a wallet account, this might be empty. For a database account, it contains serialized variables.&lt;/li&gt;
&lt;li&gt;owner (The File Owner/Permissions): This is the public key of the program that controls this account. Crucially, only the owner program is allowed to modify the account's data or deduct its lamport balance.&lt;/li&gt;
&lt;li&gt;executable (Is it an App or a Document?): A boolean flag. If &lt;code&gt;true&lt;/code&gt;, this account contains compiled WebAssembly/SBF bytecode that the Solana runtime can run. It is a program (smart contract). If &lt;code&gt;false&lt;/code&gt;, it's just a data storage account.&lt;/li&gt;
&lt;li&gt;rent_epoch (Storage Rent): Historically used to track rent collections. Today, rent is deprecated because all accounts are required to be "rent-exempt" (more on this below). It is now set to a placeholder max value (&lt;code&gt;18446744073709551615&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Programs Don't Store State (Stateless Architecture)&lt;/p&gt;

&lt;p&gt;In Web2, if you write a Node.js express server, the code is loaded into memory, and it might read/write from a local Postgres database. The server code itself doesn't dynamically change its own binary files on disk to save user data; it talks to an external database.&lt;/p&gt;

&lt;p&gt;Solana works the exact same way. Solana programs are stateless.&lt;/p&gt;

&lt;p&gt;On Ethereum, a smart contract's code and its variables are packed together in the same contract account. On Solana, they are strictly separated:&lt;/p&gt;

&lt;p&gt;mermaid&lt;br&gt;
graph TD&lt;br&gt;
    subgraph Program Account&lt;br&gt;
        A[Program ID / Proxy Address] --&amp;gt;|Executable: true| B[Program Data Account: Bytecode]&lt;br&gt;
    end&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;subgraph Data Accounts
    C[User Wallet Account A]
    D[User Wallet Account B]
    E[Protocol Configuration Account]
end

B --&amp;gt;|Reads/Writes Data| C
B --&amp;gt;|Reads/Writes Data| D
B --&amp;gt;|Reads/Writes Data| E
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For example, the Token-2022 Program (&lt;code&gt;TokenzQdBNbXt8TuTRCEjrpb5764uWo1tz5SQH376BB&lt;/code&gt;) contains the executable logic for minting and transferring tokens. But it doesn't store your token balance. Instead, your balance is stored in a separate Token Account owned by the Token-2022 program, which holds data indicating: "This wallet address owns X amount of this token."&lt;/p&gt;

&lt;p&gt;The Rules of Ownership: Solana's Security Model&lt;/p&gt;

&lt;p&gt;How does Solana ensure someone doesn't just write a malicious script to change another user's balance? Through strict runtime ownership rules:&lt;/p&gt;

&lt;p&gt;Only the Owner Program can write to the account data.&lt;br&gt;
Only the Owner Program can deduct lamports (debit) from the account.&lt;br&gt;
Anyone can credit lamports to any writable account (just like anyone can transfer money to your bank account).&lt;br&gt;
Anyone can read any account's data. All accounts are public by default.&lt;/p&gt;

&lt;p&gt;If Program A tries to modify an account owned by Program B, the Solana runtime rejects the transaction immediately. This simple rule eliminates a massive class of security vulnerabilities.&lt;/p&gt;

&lt;p&gt;Rent Exemption: Keeping the Ledger Lean&lt;/p&gt;

&lt;p&gt;In Web2, if you rent an AWS EC2 instance or store files in an S3 bucket, you pay a recurring subscription. If you stop paying, AWS deletes your files.&lt;/p&gt;

&lt;p&gt;Solana handles blockchain storage in a similar way. Because validators must keep all active accounts in memory (RAM) for fast transaction processing, storage isn't free. &lt;/p&gt;

&lt;p&gt;To prevent the blockchain from being filled with abandoned accounts, Solana requires accounts to maintain a minimum lamports balance. This is called being Rent-Exempt.&lt;/p&gt;

&lt;p&gt;The rent-exempt balance is directly proportional to the size of the account's &lt;code&gt;data&lt;/code&gt; array.&lt;br&gt;
 For a basic wallet account with zero data bytes, the rent-exempt minimum is roughly &lt;code&gt;0.00089 SOL&lt;/code&gt;.&lt;br&gt;
 When you close a Solana account, you can reclaim all the rent lamports back into your main wallet! It's like getting a deposit refund on a rental apartment.&lt;/p&gt;

&lt;p&gt;Summary&lt;/p&gt;

&lt;p&gt;As a Web2 developer, you can master the Solana Account Model by keeping these four rules in mind:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Everything is a file (account) in a flat key-value store.&lt;/li&gt;
&lt;li&gt;Metadata is standardized across all files (Lamports, Data, Owner, Executable).&lt;/li&gt;
&lt;li&gt;Programs are stateless executables; they read and write to separate database files (data accounts).&lt;/li&gt;
&lt;li&gt;Ownership is absolute; only the program marked as the &lt;code&gt;owner&lt;/code&gt; can modify a file's contents or spend its funds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Understanding this separation of code and state is the "aha!" moment for every Solana developer. Once you grasp this, building decentralized applications, understanding PDA (Program Derived Addresses) generation, and writing efficient Anchor programs starts to make perfect sense!&lt;/p&gt;

&lt;p&gt;Have questions about how accounts work on Solana? Drop a comment below, and let's discuss!&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>beginners</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Solana Transactions Explained for Backend Developers</title>
      <dc:creator>atharv shukla</dc:creator>
      <pubDate>Tue, 30 Jun 2026 08:41:51 +0000</pubDate>
      <link>https://dev.to/atharv_shukla_f7a20a5893f/solana-transactions-explained-for-backend-developers-23hb</link>
      <guid>https://dev.to/atharv_shukla_f7a20a5893f/solana-transactions-explained-for-backend-developers-23hb</guid>
      <description>&lt;p&gt;If you're coming from a Web2 backend background, your mental model of APIs is probably built on the standard HTTP client-server pattern: client makes a request, the database runs a transaction, and you return a status code.&lt;/p&gt;

&lt;p&gt;When diving into Solana, you quickly run into a lot of the same terms—like "transactions"—but the actual execution under the hood is very different. Here's a quick guide on how Solana transactions actually work, what's inside them, and a few things that caught me off guard. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Anatomy of a Solana Transaction : 
An HTTP request is usually headers and a JSON body. A Solana transaction is a packed binary payload that cannot exceed 1,232 bytes (this limit exists so transactions can fit cleanly into a single IPv6 packet). &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inside that byte limit, a transaction contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Signatures: Cryptographic proof from the accounts authorizing the action.&lt;/li&gt;
&lt;li&gt;Message: The instructions and context, which includes:

&lt;ul&gt;
&lt;li&gt;Account Keys: Every single account the transaction will read from or write to. Solana needs this declared upfront so it can parallelize execution.&lt;/li&gt;
&lt;li&gt;Recent Blockhash: A hash from a recent block. This acts as a timestamp and prevents replay attacks. If the blockhash is too old (usually over 150 blocks, or about a minute), the transaction expires.&lt;/li&gt;
&lt;li&gt;Instructions: The actual operations to execute. Each instruction specifies an on-chain program (like calling a controller method) and passes along the necessary accounts and raw data.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;The Transaction Lifecycle
In Web2, a database transaction is either committed or it isn't. On a blockchain, consensus is reached in stages:&lt;/li&gt;
&lt;li&gt;Processed: A single validator has included the transaction in a block. &lt;/li&gt;
&lt;li&gt;Confirmed: A supermajority (66%+) of validators have voted on the block. At this point, the transaction is functionally irreversible.&lt;/li&gt;
&lt;li&gt;Finalized: 31 or more blocks have been built on top of your block. The write is permanently locked into ledger history.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can think of this as moving from a local write, to multi-region replication, to an immutable backup.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Failed Transactions Still Cost Fees
This is the biggest shift. In Web2, if a request fails validation (say, a 400 Bad Request), you don't get billed for the server CPU cycles it took to reject the request. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On Solana, failed transactions still charge fees.&lt;/p&gt;

&lt;p&gt;If your signatures are valid and the blockhash is recent, validators will execute your transaction. Even if the program logic fails halfway through (e.g. you tried to transfer more SOL than you actually have), you still pay for the compute. &lt;/p&gt;

&lt;p&gt;Here is what it looks like when a transaction fails on-chain:&lt;/p&gt;

&lt;p&gt;text&lt;br&gt;
Transaction executed:&lt;br&gt;
  Signature: 5LseX35v...K4KgG7&lt;br&gt;
  Status: Error processing Instruction 0: custom program error: 0x1&lt;br&gt;
  Fee: 0.000005 SOL&lt;br&gt;
  Account 0 balance: 0.428975 SOL -&amp;gt; 0.42897 SOL&lt;br&gt;
  Compute Units Consumed: 150&lt;br&gt;
  Log Messages:&lt;br&gt;
    Program 11111111111111111111111111111111 invoke [1]&lt;br&gt;
    Transfer: insufficient lamports 428970000, need 500000000000&lt;br&gt;
    Program 11111111111111111111111111111111 failed: custom program error: 0x1&lt;/p&gt;

&lt;p&gt;Notice that the fee-payer's balance still decreased by &lt;code&gt;0.000005 SOL&lt;/code&gt; even though the transfer failed. &lt;/p&gt;

&lt;p&gt;To avoid wasting real money on failed execution, Web3 developers use Transaction Simulation (preflight checks) on the client side to test the transaction's success on a local state before broadcasting it to the network.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Key Takeaways&lt;/li&gt;
&lt;li&gt;No ad-hoc lookups: You cannot query arbitrary accounts mid-transaction; every address you interact with must be declared in your instructions.&lt;/li&gt;
&lt;li&gt;Keep it fast: Because of the recent blockhash requirement, signed transactions expire in about a minute.&lt;/li&gt;
&lt;li&gt;Preflight is your friend: Run simulations on the RPC node first to save your users from paying fees on failed transactions.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>solana</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>100daysofsolana</category>
    </item>
  </channel>
</rss>
