<?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: gouri t</title>
    <description>The latest articles on DEV Community by gouri t (@ctsxzdenhayl).</description>
    <link>https://dev.to/ctsxzdenhayl</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: gouri t</title>
      <link>https://dev.to/ctsxzdenhayl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ctsxzdenhayl"/>
    <language>en</language>
    <item>
      <title>Write about the account model</title>
      <dc:creator>gouri t</dc:creator>
      <pubDate>Sat, 16 May 2026 17:29:43 +0000</pubDate>
      <link>https://dev.to/ctsxzdenhayl/write-about-the-account-model-1ihn</link>
      <guid>https://dev.to/ctsxzdenhayl/write-about-the-account-model-1ihn</guid>
      <description>&lt;p&gt;Solana’s account model can feel confusing at first. Terms like lamports, owners, and program accounts sound very blockchain-specific, and when you inspect a Solana account in the CLI or Explorer, the JSON output can look intimidating.&lt;/p&gt;

&lt;p&gt;But once you stop thinking about Solana like Ethereum and start thinking about it like a filesystem or database system, things begin to click.&lt;/p&gt;

&lt;p&gt;In this article, I’ll break down Solana’s account model in plain English for developers who have never worked with blockchain before.&lt;/p&gt;

&lt;p&gt;Everything on Solana Is an Account&lt;/p&gt;

&lt;p&gt;One of the biggest differences between Solana and Ethereum is how state is stored.&lt;/p&gt;

&lt;p&gt;In Ethereum, there are two main account types:&lt;/p&gt;

&lt;p&gt;Externally Owned Accounts (EOAs) → user wallets&lt;br&gt;
Contract Accounts → smart contracts&lt;/p&gt;

&lt;p&gt;Solana simplifies this idea.&lt;/p&gt;

&lt;p&gt;On Solana, everything is an account:&lt;/p&gt;

&lt;p&gt;Wallets&lt;br&gt;
Smart contracts (called programs)&lt;br&gt;
Token balances&lt;br&gt;
NFTs&lt;br&gt;
Application state&lt;/p&gt;

&lt;p&gt;All of them are stored using the same account structure.&lt;/p&gt;

&lt;p&gt;You can think of Solana like a giant key-value database:&lt;/p&gt;

&lt;p&gt;Key Value&lt;br&gt;
32-byte public address  Account data&lt;/p&gt;

&lt;p&gt;Each account lives at a unique public address and contains metadata plus optional data.&lt;/p&gt;

&lt;p&gt;A Web2 Analogy: Solana as a Filesystem&lt;/p&gt;

&lt;p&gt;The easiest way to understand Solana accounts is to compare them to files in an operating system.&lt;/p&gt;

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

&lt;p&gt;Each account = a file&lt;br&gt;
The data field = file contents&lt;br&gt;
The owner = which program controls the file&lt;br&gt;
Programs = executable files&lt;br&gt;
Data accounts = documents/databases&lt;br&gt;
The System Program = operating system kernel&lt;/p&gt;

&lt;p&gt;Programs don’t directly “own” all their data internally. Instead, they read and write to separate accounts, similar to how a backend server interacts with a database.&lt;/p&gt;

&lt;p&gt;This design makes Solana extremely flexible and parallelizable.&lt;/p&gt;

&lt;p&gt;The Five Fields Every Account Has&lt;/p&gt;

&lt;p&gt;Every Solana account follows the same structure.&lt;/p&gt;

&lt;p&gt;Here are the five important fields:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lamports&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lamports are the smallest unit of SOL.&lt;/p&gt;

&lt;p&gt;1 SOL = 1,000,000,000 lamports&lt;/p&gt;

&lt;p&gt;This field stores the account’s SOL balance.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;"lamports": 2039280&lt;/p&gt;

&lt;p&gt;That means the account holds 0.00203928 SOL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a byte array that stores arbitrary information.&lt;/p&gt;

&lt;p&gt;Programs use this field to save state such as:&lt;/p&gt;

&lt;p&gt;token balances&lt;br&gt;
NFT metadata&lt;br&gt;
game progress&lt;br&gt;
user profiles&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;"data": ["", "base64"]&lt;/p&gt;

&lt;p&gt;If the array is empty, the account stores no custom data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Owner&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The owner field defines which program controls the account.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;"owner": "11111111111111111111111111111111"&lt;/p&gt;

&lt;p&gt;That address belongs to the System Program.&lt;/p&gt;

&lt;p&gt;The important rule is:&lt;/p&gt;

&lt;p&gt;Only the owner program can modify the account’s data.&lt;/p&gt;

&lt;p&gt;This is one of Solana’s core security mechanisms.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Executable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a boolean value:&lt;/p&gt;

&lt;p&gt;true → the account contains executable program code&lt;br&gt;
false → normal data account&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;"executable": false&lt;/p&gt;

&lt;p&gt;Most accounts are non-executable.&lt;/p&gt;

&lt;p&gt;Program accounts are special because they store deployable smart contract code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rent Epoch&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This field is now deprecated and usually set to the maximum value.&lt;/p&gt;

&lt;p&gt;Historically, it tracked when rent payments were due.&lt;/p&gt;

&lt;p&gt;You’ll still see it in account output, but modern Solana apps rarely interact with it directly.&lt;/p&gt;

&lt;p&gt;Ownership Rules: Solana’s Security Model&lt;/p&gt;

&lt;p&gt;Solana’s ownership model is surprisingly simple.&lt;/p&gt;

&lt;p&gt;Rule 1:&lt;/p&gt;

&lt;p&gt;Only the owner program can:&lt;/p&gt;

&lt;p&gt;modify account data&lt;br&gt;
subtract lamports from the account&lt;br&gt;
Rule 2:&lt;/p&gt;

&lt;p&gt;Anyone can send lamports to any writable account.&lt;/p&gt;

&lt;p&gt;This is similar to how anyone can transfer money to your bank account, but only you can spend from it.&lt;/p&gt;

&lt;p&gt;Because ownership is enforced by the runtime itself, programs cannot randomly modify accounts they do not control.&lt;/p&gt;

&lt;p&gt;The Concept That Surprises Most Developers&lt;/p&gt;

&lt;p&gt;Here’s the part that usually shocks Web2 developers:&lt;/p&gt;

&lt;p&gt;Programs Don’t Store Their Own State&lt;/p&gt;

&lt;p&gt;In Ethereum, smart contracts usually contain both:&lt;/p&gt;

&lt;p&gt;code&lt;br&gt;
storage/state&lt;/p&gt;

&lt;p&gt;Solana separates them.&lt;/p&gt;

&lt;p&gt;A Solana program is mostly stateless.&lt;/p&gt;

&lt;p&gt;Instead:&lt;/p&gt;

&lt;p&gt;Program account → stores executable code&lt;br&gt;
Data accounts → store application state&lt;/p&gt;

&lt;p&gt;Think of it like this:&lt;/p&gt;

&lt;p&gt;Web2 Backend    Solana&lt;br&gt;
Express server  Program&lt;br&gt;
PostgreSQL database Data accounts&lt;/p&gt;

&lt;p&gt;The program reads and writes data from separate accounts passed into each transaction.&lt;/p&gt;

&lt;p&gt;This architecture allows Solana to process many transactions in parallel because the runtime already knows which accounts a transaction will touch.&lt;/p&gt;

&lt;p&gt;Rent Exemption&lt;/p&gt;

&lt;p&gt;Accounts on Solana are not free.&lt;/p&gt;

&lt;p&gt;Every account must maintain a minimum SOL balance based on how much data it stores.&lt;/p&gt;

&lt;p&gt;This is called rent exemption.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because validators need storage resources to keep accounts on-chain.&lt;/p&gt;

&lt;p&gt;For a basic empty account, the minimum balance is roughly:&lt;/p&gt;

&lt;p&gt;0.00089 SOL&lt;/p&gt;

&lt;p&gt;Larger accounts require more lamports.&lt;/p&gt;

&lt;p&gt;You can calculate rent exemption using:&lt;/p&gt;

&lt;p&gt;solana rent &lt;/p&gt;

&lt;p&gt;Or through the RPC method:&lt;/p&gt;

&lt;p&gt;getMinimumBalanceForRentExemption&lt;/p&gt;

&lt;p&gt;If an account doesn’t maintain enough balance, it may eventually be cleaned up by the network.&lt;/p&gt;

&lt;p&gt;Example Account Output&lt;/p&gt;

&lt;p&gt;Here’s what a typical account might look like:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "lamports": 2039280,&lt;br&gt;
  "owner": "11111111111111111111111111111111",&lt;br&gt;
  "executable": false,&lt;br&gt;
  "rentEpoch": 18446744073709551615,&lt;br&gt;
  "data": ["", "base64"]&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Now you can actually read this:&lt;/p&gt;

&lt;p&gt;It holds some SOL&lt;br&gt;
It’s controlled by the System Program&lt;br&gt;
It is not executable&lt;br&gt;
It stores no custom data&lt;br&gt;
It is rent exempt&lt;/p&gt;

&lt;p&gt;That’s the account model in action.&lt;/p&gt;

&lt;p&gt;Why Solana Uses This Design&lt;/p&gt;

&lt;p&gt;At first, separating programs from state can feel awkward.&lt;/p&gt;

&lt;p&gt;But it gives Solana major advantages:&lt;/p&gt;

&lt;p&gt;better parallel transaction execution&lt;br&gt;
predictable state access&lt;br&gt;
flexible storage patterns&lt;br&gt;
improved scalability&lt;/p&gt;

&lt;p&gt;Instead of programs hiding internal storage, all state is explicit and passed into transactions directly.&lt;/p&gt;

&lt;p&gt;That design is one of the reasons Solana can achieve very high throughput.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;The Solana account model is the foundation of everything on the network.&lt;/p&gt;

&lt;p&gt;Once you understand:&lt;/p&gt;

&lt;p&gt;accounts&lt;br&gt;
ownership&lt;br&gt;
data storage&lt;br&gt;
rent exemption&lt;br&gt;
stateless programs&lt;/p&gt;

&lt;p&gt;…you can understand how tokens, NFTs, DeFi protocols, and nearly every Solana application works internally.&lt;/p&gt;

&lt;p&gt;For Web2 developers, the biggest mental shift is this:&lt;/p&gt;

&lt;p&gt;On Solana, programs behave more like APIs interacting with databases than traditional objects storing their own internal state.&lt;/p&gt;

&lt;p&gt;And honestly, once that clicks, the entire ecosystem becomes much easier to understand.&lt;/p&gt;

&lt;p&gt;For more details, check out the official documentation from Solana Foundation and the developer resources on Solana Docs and DEV Community.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
