惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Cyberwarzone
Cyberwarzone
SecWiki News
SecWiki News
Webroot Blog
Webroot Blog
L
LINUX DO - 最新话题
V
Vulnerabilities – Threatpost
T
Troy Hunt's Blog
Cloudbric
Cloudbric
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
S
Schneier on Security
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Attack and Defense Labs
Attack and Defense Labs
A
Arctic Wolf
V2EX - 技术
V2EX - 技术
Security Latest
Security Latest
AWS News Blog
AWS News Blog
Scott Helme
Scott Helme
W
WeLiveSecurity
S
Secure Thoughts
Y
Y Combinator Blog
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
量子位
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
The GitHub Blog
The GitHub Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
Vercel News
Vercel News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Schneier on Security
Schneier on Security
云风的 BLOG
云风的 BLOG
小众软件
小众软件
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
C
CERT Recently Published Vulnerability Notes
Security Archives - TechRepublic
Security Archives - TechRepublic
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Palo Alto Networks Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Solana's Account Model Explained for Web2 Developers
Tanisha fons · 2026-05-18 · via DEV Community

Solana's Account Model Explained for Web2 Developers

If you're coming from web development, Solana's account model is probably the first thing that will genuinely confuse you and then, once it clicks, the first thing that will genuinely impress you.

Let me save you a few days of head-scratching.


Think of It Like a Filesystem

Before diving into the technical details, here's an analogy that will carry you a long way:

Solana is a filesystem.

Every account is a file. Each file has metadata (owner, permissions, size) and contents (data). Programs are like executable files chmod +x style. Data accounts are the documents those programs read and write. And the System Program? That's the kernel. It creates files, manages ownership, and handles the lowest-level operations.

Keep that mental model handy. We'll come back to it.


Everything is an Account

In Ethereum, there's a distinction between "externally owned accounts" (wallets controlled by private keys) and "contract accounts" (smart contracts). Different types, different rules.

Solana doesn't do that.

Everything is an account. Your wallet? An account. A smart contract (called a "program" in Solana)? An account. The token balance you hold? Stored in... an account. All of this lives in one giant flat key-value store where:

  • Key = a 32-byte public address
  • Value = the account itself

Simple. Uniform. Powerful.


The Five Fields Every Account Has

Pop open a Solana account in the CLI and you'll see something like this:

$ solana account 11111111111111111111111111111111

Enter fullscreen mode Exit fullscreen mode

{
  "lamports": 1000000000,
  "data": "",
  "owner": "NativeLoader1111111111111111111111111111111",
  "executable": true,
  "rentEpoch": 18446744073709551615
}

Enter fullscreen mode Exit fullscreen mode

Every single account on Solana — whether it's a wallet, a program, or a piece of stored state — has exactly these five fields:

1. lamports

This is the SOL balance, but measured in the smallest unit: lamports. 1 SOL = 1,000,000,000 lamports (one billion). Think of it like wei to ether, or satoshis to bitcoin. It's just a u64 integer under the hood.

2. data

A raw byte array. This is where the interesting stuff lives. For wallets, it's empty. For programs, it holds compiled bytecode. For data accounts (more on those in a moment), it holds whatever state the owning program decides to write there.

3. owner

The program address that "owns" this account. This is the key to Solana's security model: only the owner program can modify this account's data or debit its lamports. Anyone can add lamports (credit), but only the owner can take them away or change the data.

4. executable

A boolean. true means this account holds a deployable program. false means it's a data/state account. Once set to true, the data becomes immutable — you can't accidentally overwrite a running program.

5. rentEpoch

This field is deprecated. You'll always see it set to the max u64 value (18446744073709551615). Ignore it — it's a legacy artifact from how rent collection used to work.


Ownership Rules (and Why They Matter)

Here's Solana's security model in two sentences:

  1. Only the owner program can modify an account's data or debit lamports.
  2. Anyone can credit lamports to any writable account.

That's it. That's the whole access control system.

In web2 terms: the owner is like a Unix file owner with exclusive write permissions. Other programs can look, but they can't touch unless they own it.

This is why, when you interact with a Solana program (say, a DeFi protocol), you have to sign a transaction that authorizes that program to act on accounts you own. The program can only write to accounts where it is listed as owner — it can never reach into your wallet uninvited.


The Surprising Part: Programs Don't Store Their Own State

This is the concept that trips up almost every Web2 developer the first time.

In most backend frameworks, state lives inside the application. Your Node.js server has in-memory state, or it queries a database it owns. Either way, the program and its data are tightly coupled.

On Solana, programs are stateless.

A Solana program stores its compiled code in one account (marked executable: true). Any data it needs to track — user balances, game state, protocol configuration — lives in completely separate accounts that the program owns.

The analogy: imagine a REST API (the program) that never stores anything locally. Every request reads from and writes to a database (the data accounts). The API logic and the database are cleanly separated. The "database" is owned by the API, but the data itself lives outside the code.

In practice, this means when you call a Solana program, you have to tell it which accounts to read and write. You pass them in as part of the transaction. The program can't go looking for its own data — you have to bring it.

This feels weird at first. Then you realize it's what makes Solana blazing fast: the runtime knows exactly which accounts a transaction will touch before it even executes, so it can parallelize transactions that don't share accounts.


Rent Exemption: Paying for Space on Chain

Every account occupies space on every Solana validator in the world. That's not free.

To keep an account alive on-chain, it must hold a minimum lamport balance proportional to the size of its data. This is called being rent-exempt.

For a basic account with no extra data, the threshold is roughly 0.00089 SOL (about $0.10–$0.20 at most price ranges). Accounts above this threshold stay on-chain indefinitely. Accounts below it... don't exist in the first place, because modern Solana tooling simply won't let you create underfunded accounts.

You can check the exact minimum for any given data size:

# Check rent for a 0-byte account
$ solana rent 0

# Output:
# Rent-exempt minimum: 0.00089088 SOL

Enter fullscreen mode Exit fullscreen mode

Or via RPC:

curl https://api.mainnet-beta.solana.com -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getMinimumBalanceForRentExemption","params":[0]}'

Enter fullscreen mode Exit fullscreen mode

The larger the account (more bytes in data), the higher the minimum balance required. Close the account, reclaim the lamports — the space is yours to rent, not buy forever.


Putting It All Together

Here's the mental model, fully assembled:

Solana Concept Filesystem Analogy
Account File
data field File contents
owner field File owner (Unix permissions)
executable: true Executable binary (chmod +x)
Program account Application binary
Data account Data file read/written by the app
System Program OS kernel
Lamports Disk quota

When you deploy a Solana program, you're writing an executable file to the filesystem. When that program creates accounts to track state, it's creating data files it owns. When users interact with it, they're running the binary and pointing it at the right files.


Why This Design?

The account model isn't arbitrary. It's designed for performance and parallelism.

Because every transaction must declare its accounts upfront, the Solana runtime can look at two transactions and immediately know whether they can run in parallel (different accounts) or need to be serialized (same accounts). This is how Solana achieves the throughput it does — it's not just hardware, it's the data model.

State separation also means programs are more composable. One program can pass an account it owns to another program, delegating access in controlled ways. The whole DeFi ecosystem on Solana is built on programs handing account authority back and forth.


Your First Mental Checkpoint

Before you write your next line of Solana code, be able to answer these questions:

  • What's the difference between executable: true and executable: false?
  • Which account can modify which data, and why?
  • Why do you have to pass accounts into a program call instead of letting the program find its own state?
  • What happens to an account that falls below the rent-exempt threshold?

If you can answer those confidently, you understand the account model. Everything else tokens, NFTs, PDAs, CPIs — is built on top of exactly this foundation.


This article is part of my #100DaysOfSolana journey. If you're on a similar path, drop a comment always happy to compare notes.