<?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: NIRANJAN LAMICHHANE</title>
    <description>The latest articles on DEV Community by NIRANJAN LAMICHHANE (@niranjannlc).</description>
    <link>https://dev.to/niranjannlc</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%2F577981%2F6afec0bf-fa5e-401b-a390-565d09e3982b.jpeg</url>
      <title>DEV Community: NIRANJAN LAMICHHANE</title>
      <link>https://dev.to/niranjannlc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niranjannlc"/>
    <language>en</language>
    <item>
      <title>From Android Engineer to AI/ML – My Journey and First Realization</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Fri, 07 Aug 2026 15:15:46 +0000</pubDate>
      <link>https://dev.to/niranjannlc/from-android-engineer-to-aiml-my-journey-and-first-realization-2de</link>
      <guid>https://dev.to/niranjannlc/from-android-engineer-to-aiml-my-journey-and-first-realization-2de</guid>
      <description>&lt;p&gt;Starting my journey as the AI/ML engineer from Android Engineer... My current goal is to win a hackathon/competition related to this domain within 60 days and secure a job/contract related within 100 days.&lt;br&gt;&lt;br&gt;
I will be documenting the concepts learned and things experimented in this series of dev.to posts.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Curiosity
&lt;/h2&gt;

&lt;p&gt;First of all, I started with the following curiosity in the mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What's the role of machine learning in software engineering?&lt;/li&gt;
&lt;li&gt;What problem will it try to solve, or solve which traditional approach of programming cannot?&lt;/li&gt;
&lt;li&gt;What are its usecases?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Discovery
&lt;/h2&gt;

&lt;p&gt;Till now, what I discovered is that machine learning can be a replacement/alternative/substitute of conditional statements (if..else, while loop, etc.) of the conventional programming approach.&lt;/p&gt;

&lt;p&gt;When you have just a few branches, conditional statements work perfectly. But when the number of rules becomes huge — like trying to decide something based on hundreds or thousands of possible conditions — hand-coding all those if-else paths turns into a tangled mess that’s hard to maintain and scale.&lt;/p&gt;

&lt;p&gt;Here to solve this we train the model on the data (condition, value). We predict the value from the condition using this trained model.&lt;/p&gt;

&lt;p&gt;&lt;a href="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%2Farticles%2Fy6aetut0ih0a0cp9nn5m.png" class="article-body-image-wrapper"&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%2Farticles%2Fy6aetut0ih0a0cp9nn5m.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Sweet Spot (Still Searching)
&lt;/h2&gt;

&lt;p&gt;However, I have not discovered the sweet spot for machine learning from which branching of conditional statements are to be replaced. But I am pretty sure that machine learning should not be imposed on the place where conditional statement branches will do the thing.&lt;/p&gt;

&lt;p&gt;Is my understanding correct? Please give your feedback and view.&lt;/p&gt;

&lt;p&gt;This much for today from my side. Will keep updating about my journey.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>careerdevelopment</category>
    </item>
    <item>
      <title>I Built a Nepal Government Complaint Transparency Bot with Hermes Agent (From Zero, in One Hour )</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Mon, 01 Jun 2026 06:23:59 +0000</pubDate>
      <link>https://dev.to/niranjannlc/i-built-a-nepal-government-complaint-transparency-bot-with-hermes-agent-from-zero-in-one-hour--4gi0</link>
      <guid>https://dev.to/niranjannlc/i-built-a-nepal-government-complaint-transparency-bot-with-hermes-agent-from-zero-in-one-hour--4gi0</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hermes-agent-2026-05-15"&gt;Hermes Agent Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;Hello Sarkar Analyzer&lt;/strong&gt; — a Telegram bot that fetches, analyzes, and reports on public complaints filed by citizens with the Nepal Government at &lt;a href="https://gunaso.opmcm.gov.np/complaints" rel="noopener noreferrer"&gt;gunaso.opmcm.gov.np&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Nepal's Hello Sarkar ("Hello Government") portal lets citizens file complaints against any government ministry or department. The data is public — but buried inside a JavaScript-heavy Nuxt.js app that most people never dig into. My bot surfaces that data instantly on Telegram:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/complaints&lt;/code&gt; — live analysis: total complaints, resolved vs pending, resolution rate, top 3 most complained-about departments&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/report&lt;/code&gt; — downloads a full &lt;code&gt;.txt&lt;/code&gt; civic report to your phone&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/about&lt;/code&gt; — project background&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal: make government accountability data accessible to any Nepali citizen with a phone.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Bot commands in action:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

🏛 Hello Sarkar — Civic Complaint Analysis
📅 2026-06-01 11:30 NPT

📊 Overview
• Total:       847
• ✅ Resolved: 312 (36.8%)
• ⏳ Pending:  535

🏆 Top 3 Most Complained Departments
  1. Ministry of Land Management — 143 complaints
  2. Department of Transport — 98 complaints
  3. Ministry of Local Government — 87 complaints

🔗 gunaso.opmcm.gov.np
Built with Hermes Agent 🤖
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Image  demo :&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsokrgpw2nqajcd2u0f6j.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fsokrgpw2nqajcd2u0f6j.png" alt="Hermes writing the scraper code" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwus1e2wprj0yvpyov6f.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fpwus1e2wprj0yvpyov6f.png" alt="Xontinue writing code " width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2e3bkrvtertq7s98gtbx.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2F2e3bkrvtertq7s98gtbx.png" alt=" completed action" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wsdf832aa1hx7o416kd.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2F7wsdf832aa1hx7o416kd.png" alt="Bot running successfully" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhplr09t4polai5t1evc.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fwhplr09t4polai5t1evc.png" alt="Telegram bot responding to /complaints" width="800" height="619"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Code and  My Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hermes Agent&lt;/strong&gt; by Nous Research — wrote, debugged, and ran all code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python 3&lt;/strong&gt; — bot runtime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;python-telegram-bot&lt;/strong&gt; — Telegram interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selenium + headless Chrome&lt;/strong&gt; — JavaScript page rendering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BeautifulSoup4&lt;/strong&gt; — DOM parsing &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WSL2 / Ubuntu&lt;/strong&gt; — development environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have no idea  except for hermes agent and wsl2 and how other is used . &lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Hermes Agent
&lt;/h2&gt;

&lt;p&gt;Here's the honest story: I came to this challenge as someone who had &lt;strong&gt;never used Hermes Agent before&lt;/strong&gt;. I spent the first half of the day just getting it installed.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Setup Journey
&lt;/h3&gt;

&lt;p&gt;I started from absolute zero — no curl, no pip, no WSL2. After installing WSL2, I discovered I was running as root (no &lt;code&gt;sudo&lt;/code&gt;), &lt;code&gt;apt&lt;/code&gt; wasn't in PATH, and pip threw &lt;code&gt;externally-managed-environment&lt;/code&gt; errors. Every step had a new obstacle.&lt;/p&gt;

&lt;p&gt;What got me through it was Hermes Agent's ability to &lt;strong&gt;diagnose its own environment&lt;/strong&gt;. Running &lt;code&gt;hermes doctor&lt;/code&gt; gave me a clear picture of what was working and what wasn't — 18 of 27 tools enabled on a completely fresh setup.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Build
&lt;/h3&gt;

&lt;p&gt;Once running, I gave Hermes this prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Create a Telegram bot that fetches and analyzes public complaints from gunaso.opmcm.gov.np. The site is a Nuxt.js SPA — figure out how to get the data."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hermes immediately identified the real challenge: the site renders everything in JavaScript. It couldn't just use &lt;code&gt;requests&lt;/code&gt; + BeautifulSoup. So it autonomously:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wrote a multi-layer scraper that tries 8 known Nepal govt API URL patterns first&lt;/li&gt;
&lt;li&gt;Falls back to &lt;strong&gt;Selenium with headless Chrome&lt;/strong&gt; to actually render the page&lt;/li&gt;
&lt;li&gt;Intercepts real XHR/fetch calls the browser makes to find the live API endpoint&lt;/li&gt;
&lt;li&gt;Parses the rendered DOM as a final fallback&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When it hit a &lt;code&gt;TERMINAL_SSH_PORT&lt;/code&gt; config error blocking code execution, it diagnosed the cause (a bad hostname from earlier SSH setup), fixed the &lt;code&gt;.env&lt;/code&gt; file, and continued — without me telling it what was wrong.&lt;/p&gt;

&lt;p&gt;When the bot crashed with &lt;code&gt;AttributeError: 'list' object has no attribute 'get'&lt;/code&gt; — because the API returned lists-of-lists instead of dicts — Hermes identified the data shape mismatch and rewrote the &lt;code&gt;analyze()&lt;/code&gt; function to handle all three possible shapes: &lt;code&gt;dict&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, and raw &lt;code&gt;str&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I wrote zero lines of this bot.&lt;/strong&gt; Every function, every fallback strategy, every bug fix came from Hermes Agent reasoning through the problem autonomously.&lt;/p&gt;

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

&lt;p&gt;The thing that struck me most was how Hermes handled ambiguity. The Nepal government site doesn't document its API. There's no public endpoint listed anywhere.  &lt;/p&gt;

&lt;p&gt;That layered reasoning — &lt;em&gt;try the smart thing, then the less smart thing, then the brute force thing&lt;/em&gt; — felt genuinely agentic. Not just code generation. Problem solving. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for Nepal 🇳🇵
&lt;/h2&gt;

&lt;p&gt;Nepal's Hello Sarkar portal holds real accountability data — which ministries get the most complaints, how long resolutions take, what citizens are suffering through. That data is technically public but practically inaccessible to most people.&lt;/p&gt;

&lt;p&gt;A Telegram bot changes that. Telegram has deep penetration in Nepal. Any citizen, journalist, or civil society researcher can now type &lt;code&gt;/complaints&lt;/code&gt; and get instant civic insight — no browser, no technical knowledge needed.&lt;/p&gt;

&lt;p&gt;Hermes Agent made this possible in a single afternoon, from a country where most AI agent tutorials assume you already have a working dev environment with &lt;code&gt;brew install&lt;/code&gt; everything. Starting from &lt;code&gt;apt not found&lt;/code&gt; and ending with a working Telegram bot connected to live government data — that's the real demo.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by Niranjan Lamichhane, Kathmandu, Nepal 🇳🇵&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Powered by Hermes Agent + OpenRouter (free tier) + WSL2&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hermesagentchallenge</category>
      <category>devchallenge</category>
      <category>agents</category>
    </item>
    <item>
      <title>Building Multi‑Extension Tokens on Solana and making it compliance goated</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Fri, 29 May 2026 09:13:13 +0000</pubDate>
      <link>https://dev.to/niranjannlc/building-multi-extension-tokens-on-solana-and-making-it-compliance-goated-49pg</link>
      <guid>https://dev.to/niranjannlc/building-multi-extension-tokens-on-solana-and-making-it-compliance-goated-49pg</guid>
      <description>&lt;p&gt;After 36 days of diving into Solana development, I finally reached the most exciting milestone: &lt;strong&gt;composability&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Solana’s Token Extensions allow you to combine multiple features into a single mint — without writing complex smart contract logic.  &lt;/p&gt;

&lt;p&gt;In this post, I’ll walk you through two real‑world scenarios:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Day 37&lt;/strong&gt; – A token with &lt;em&gt;transfer fee&lt;/em&gt;, &lt;em&gt;interest‑bearing&lt;/em&gt;, and &lt;em&gt;metadata&lt;/em&gt; extensions.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Day 38&lt;/strong&gt; – A compliance‑gated token with &lt;em&gt;default frozen accounts&lt;/em&gt; (perfect for regulated finance).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All commands are tested on &lt;strong&gt;Devnet&lt;/strong&gt; using the &lt;code&gt;spl-token&lt;/code&gt; CLI. Let’s go!&lt;/p&gt;


&lt;h2&gt;
  
  
  Day 37: The Triple‑Extension Token
&lt;/h2&gt;
&lt;h3&gt;
  
  
  The Goal
&lt;/h3&gt;

&lt;p&gt;Create a mint that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Charges a 1% transfer fee (capped at 5 tokens).&lt;/li&gt;
&lt;li&gt;Grows in value over time (interest‑bearing, 5 bps annually).&lt;/li&gt;
&lt;li&gt;Stores its name, symbol, and URI directly on‑chain (metadata).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Step 1 – Create the Mint
&lt;/h3&gt;

&lt;p&gt;One command, no backslashes (Windows‑friendly):&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 &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token &lt;span class="nt"&gt;--decimals&lt;/span&gt; 2 &lt;span class="nt"&gt;--transfer-fee-basis-points&lt;/span&gt; 100 &lt;span class="nt"&gt;--transfer-fee-maximum-fee&lt;/span&gt; 500 &lt;span class="nt"&gt;--interest-rate&lt;/span&gt; 5 &lt;span class="nt"&gt;--enable-metadata&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt; (yours will differ):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Creating token DrcSSbxxb63GiZiaXd1tFPRwwofFV3pJHSpFY1aCvcjN under program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Address:  DrcSSbxxb63GiZiaXd1tFPRwwofFV3pJHSpFY1aCvcjN
Decimals:  2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the mint address — we’ll call it &lt;code&gt;$MINT&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 – Initialize Metadata
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token initialize-metadata &lt;span class="nv"&gt;$MINT&lt;/span&gt; &lt;span class="s2"&gt;"ArcCoin"&lt;/span&gt; &lt;span class="s2"&gt;"ARC"&lt;/span&gt; &lt;span class="s2"&gt;"https://raw.githubusercontent.com/solana-developers/opos-asset/main/assets/CompressedCoil/metadata.json"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3 – Verify All Extensions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token display &lt;span class="nv"&gt;$MINT&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt; (abridged):&lt;br&gt;
&lt;/p&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;Interest-bearing&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Current rate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;5bps&lt;/span&gt;
  &lt;span class="na"&gt;Transfer fees&lt;/span&gt;&lt;span class="pi"&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;50000&lt;/span&gt;
  &lt;span class="na"&gt;Metadata Pointer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Metadata address&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;DrcSSbxxb63GiZiaXd1tFPRwwofFV3pJHSpFY1aCvcjN&lt;/span&gt;
  &lt;span class="na"&gt;Metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ArcCoin&lt;/span&gt;
    &lt;span class="na"&gt;Symbol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ARC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All three extensions are active ✅&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 – Create an Account and Mint 1000 Tokens
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-account &lt;span class="nv"&gt;$MINT&lt;/span&gt;
spl-token mint &lt;span class="nv"&gt;$MINT&lt;/span&gt; 1000
spl-token balance &lt;span class="nv"&gt;$MINT&lt;/span&gt;   &lt;span class="c"&gt;# 1000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5 – Test the Transfer Fee
&lt;/h3&gt;

&lt;p&gt;Create a second wallet (if you haven’t already):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;solana-keygen new &lt;span class="nt"&gt;--outfile&lt;/span&gt; second-wallet.json &lt;span class="nt"&gt;--no-bip39-passphrase&lt;/span&gt; &lt;span class="nt"&gt;--force&lt;/span&gt;
solana airdrop 1 second-wallet.json   &lt;span class="c"&gt;# fund for rent&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create its token account and transfer 100 tokens:&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-account &lt;span class="nv"&gt;$MINT&lt;/span&gt; &lt;span class="nt"&gt;--owner&lt;/span&gt; second-wallet.json
spl-token transfer &lt;span class="nv"&gt;$MINT&lt;/span&gt; 100 second-wallet.json &lt;span class="nt"&gt;--expected-fee&lt;/span&gt; 1 &lt;span class="nt"&gt;--allow-unfunded-recipient&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check balances:&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 balance &lt;span class="nv"&gt;$MINT&lt;/span&gt;                     &lt;span class="c"&gt;# 900&lt;/span&gt;
spl-token balance &lt;span class="nv"&gt;$MINT&lt;/span&gt; &lt;span class="nt"&gt;--owner&lt;/span&gt; second-wallet.json   &lt;span class="c"&gt;# 99&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 1 token fee is &lt;strong&gt;withheld&lt;/strong&gt; in the recipient’s account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6 – Harvest Withheld Fees
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Find recipient’s token account&lt;/span&gt;
spl-token accounts &lt;span class="nt"&gt;--owner&lt;/span&gt; second-wallet.json &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="c"&gt;# Withdraw to your own token account&lt;/span&gt;
spl-token withdraw-withheld-tokens YOUR_TOKEN_ACCOUNT RECIPIENT_TOKEN_ACCOUNT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After harvest:&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 balance &lt;span class="nv"&gt;$MINT&lt;/span&gt;   &lt;span class="c"&gt;# 901 (the fee is yours)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Day 37 takeaway&lt;/strong&gt; – three extensions working together, no custom program required.&lt;/p&gt;




&lt;h2&gt;
  
  
  Day 38: Compliance‑Gated Token (Default Frozen)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Goal
&lt;/h3&gt;

&lt;p&gt;Create a mint where &lt;strong&gt;every token account starts frozen&lt;/strong&gt;. Only the freeze authority can thaw (approve) an account. This is how a regulated stablecoin or KYC‑gated platform works at the protocol level.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 – Create the Mint with &lt;code&gt;--default-account-state frozen&lt;/code&gt;
&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="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb &lt;span class="nt"&gt;--enable-freeze&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;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Address:  4jC4rjpi5wh1TKd2b8cLyAqFm9a68jmGRF1qPEnkENjm
Decimals:  9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save as &lt;code&gt;$MINT_FROZEN&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 – Create Two Token Accounts (Both Will Be Frozen)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token create-account &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt;                &lt;span class="c"&gt;# yours&lt;/span&gt;
spl-token create-account &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt; &lt;span class="nt"&gt;--owner&lt;/span&gt; second-wallet.json   &lt;span class="c"&gt;# second wallet&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3 – Try to Mint (Must Fail)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token mint &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt; 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Expected error&lt;/strong&gt;:&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;✅ The enforcement works – even the mint authority cannot bypass it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 – Thaw Your Account (The “KYC Approval”)
&lt;/h3&gt;

&lt;p&gt;First find your token account address (&lt;code&gt;spl-token accounts&lt;/code&gt;), then:&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 YOUR_TOKEN_ACCOUNT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5 – Mint Now Succeeds
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token mint &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt; 100
spl-token balance &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt;   &lt;span class="c"&gt;# 100&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6 – Transfer to Still‑Frozen Second Account (Must Fail)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token transfer &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt; 50 second-wallet.json &lt;span class="nt"&gt;--allow-unfunded-recipient&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Error: &lt;code&gt;Account is frozen&lt;/code&gt; (destination).&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7 – Thaw Second Account, Then Transfer Succeeds
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token thaw SECOND_WALLET_TOKEN_ACCOUNT
spl-token transfer &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt; 50 second-wallet.json &lt;span class="nt"&gt;--allow-unfunded-recipient&lt;/span&gt;
spl-token balance &lt;span class="nv"&gt;$MINT_FROZEN&lt;/span&gt; &lt;span class="nt"&gt;--owner&lt;/span&gt; second-wallet.json   &lt;span class="c"&gt;# 50&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Day 38 takeaway&lt;/strong&gt; – compliance is enforced at the runtime level, not in off‑chain code.&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Composability is powerful&lt;/strong&gt; – you can mix and match extensions like LEGO bricks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The CLI abstracts complexity&lt;/strong&gt; – one command sets up TLV‑encoded extension data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default frozen accounts&lt;/strong&gt; are a game‑changer for regulated finance on Solana.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugging on Windows&lt;/strong&gt; requires absolute paths and careful attention to program IDs (the correct one is &lt;code&gt;TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb&lt;/code&gt; – note the lowercase &lt;code&gt;z&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>blockchain</category>
      <category>100daysofsolana</category>
      <category>web3</category>
    </item>
    <item>
      <title>Intrest bearing token in solana</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Fri, 29 May 2026 07:48:58 +0000</pubDate>
      <link>https://dev.to/niranjannlc/intrest-bearing-token-in-solana-20p0</link>
      <guid>https://dev.to/niranjannlc/intrest-bearing-token-in-solana-20p0</guid>
      <description>&lt;h2&gt;
  
  
  Create an Interest‑Bearing Token on Solana (Token‑2022) – Step by Step
&lt;/h2&gt;

&lt;p&gt;Learn how to mint a token that earns interest &lt;strong&gt;automatically, every second&lt;/strong&gt;, using Solana’s Token‑2022 program.&lt;br&gt;&lt;br&gt;
No staking, no separate contracts – just a CLI and a wallet.&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Solana CLI &amp;amp; SPL Token CLI installed&lt;/li&gt;
&lt;li&gt;A funded wallet (devnet/testnet)&lt;/li&gt;
&lt;li&gt;Basic terminal comfort&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  2. Create the Mint (with 5% interest)
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;--interest-rate&lt;/code&gt; is in &lt;strong&gt;basis points&lt;/strong&gt; (bps).&lt;br&gt;&lt;br&gt;
500 bps = 5% APY.&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;--interest-rate&lt;/span&gt; 500
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sample output mint address (yours will differ):&lt;br&gt;&lt;br&gt;
&lt;code&gt;CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  3. Create a Token Account for Your Wallet
&lt;/h2&gt;


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

&lt;/div&gt;


&lt;p&gt;(My created account: &lt;code&gt;9nSZ154gJQ8H2qzgLV8mk7K5N4LbngViksUyrzsgncn1&lt;/code&gt;)&lt;/p&gt;


&lt;h2&gt;
  
  
  4. Mint 1000 Tokens
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token mint &amp;lt;MINT_ADDRESS&amp;gt; 1000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Observe the Growing Balance
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Check UI balance (applied interest)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token balance &amp;lt;MINT_ADDRESS&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Result right after mint: &lt;code&gt;1000.000362839&lt;/code&gt; – already more than 1000!&lt;/p&gt;
&lt;h3&gt;
  
  
  Inspect mint metadata
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;spl-token display &amp;lt;MINT_ADDRESS&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You’ll see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SPL Token Mint
  …
  Supply: 1000000000000   (raw supply, 1000 tokens with 9 decimals)
  Decimals: 9
  Interest-bearing:
    Current rate: 500bps
    Average rate: 500bps
    Rate authority: …
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key insight:&lt;/strong&gt; The on‑chain supply never changes.&lt;br&gt;&lt;br&gt;
The UI balance grows because the program calculates interest per second from the last update time.&lt;/p&gt;
&lt;h3&gt;
  
  
  See raw account data (optional)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;solana account &amp;lt;MINT_ADDRESS&amp;gt; &lt;span class="nt"&gt;--output&lt;/span&gt; json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Returns a base64‑encoded blob – that’s where the interest rate and timestamp live.&lt;/p&gt;


&lt;h2&gt;
  
  
  6. Wait and Watch Interest Compound
&lt;/h2&gt;

&lt;p&gt;After a few minutes, run &lt;code&gt;spl-token balance&lt;/code&gt; again.&lt;br&gt;&lt;br&gt;
The number will be larger – without any transaction.&lt;/p&gt;


&lt;h2&gt;
  
  
  7. Change the Interest Rate
&lt;/h2&gt;

&lt;p&gt;As the &lt;strong&gt;rate authority&lt;/strong&gt;, you can update the rate anytime.&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;span class="c"&gt;# 150% APY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check display again – &lt;code&gt;Current rate&lt;/code&gt; now shows &lt;code&gt;15000bps&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
Balance will start climbing much faster.&lt;/p&gt;

&lt;p&gt;Later I set it to &lt;code&gt;30000&lt;/code&gt; (300% APY) and balance quickly went to &lt;code&gt;1000.015285823&lt;/code&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  8. Rate Limits
&lt;/h2&gt;

&lt;p&gt;The rate is stored as a 16‑bit signed integer (i16).&lt;br&gt;&lt;br&gt;
Max allowed: &lt;strong&gt;32767 bps&lt;/strong&gt; (~327.67% APY).&lt;br&gt;&lt;br&gt;
Min allowed: &lt;strong&gt;-32768 bps&lt;/strong&gt; (negative interest, for demurrage tokens).&lt;/p&gt;

&lt;p&gt;Trying &lt;code&gt;35000&lt;/code&gt; or &lt;code&gt;100000&lt;/code&gt; will error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: number too large to fit in target type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  My Full Command History (Reference)
&lt;/h2&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;span class="nt"&gt;--interest-rate&lt;/span&gt; 500
spl-token create-account CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
spl-token mint CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu 1000 &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
spl-token balance CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
&lt;span class="c"&gt;# 1000.000362839&lt;/span&gt;
spl-token display CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu &lt;span class="nt"&gt;--program-id&lt;/span&gt; TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
solana account CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu &lt;span class="nt"&gt;--output&lt;/span&gt; json
spl-token set-interest-rate CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu 15000
spl-token balance … &lt;span class="c"&gt;# 1000.008316801&lt;/span&gt;
spl-token set-interest-rate CRXKmUj2dVcJhr6uH5YVduZ352YdUeSxYT2WEvPA66Vu 30000
spl-token balance … &lt;span class="c"&gt;# 1000.015285823&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Yield‑bearing stablecoins&lt;/strong&gt; without external protocols
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic savings tokens&lt;/strong&gt; that reward holders per second
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic rates&lt;/strong&gt; – adjust APY on the fly based on market conditions
&lt;/li&gt;
&lt;li&gt;Fully on‑chain, permissionless, composable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now go build your own interest‑bearing token. Happy hacking! 🚀&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>100daysofsolana</category>
    </item>
    <item>
      <title>Understanding tokenomics of Solana</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Thu, 28 May 2026 06:51:24 +0000</pubDate>
      <link>https://dev.to/niranjannlc/understanding-tokenomics-of-solana-2p5o</link>
      <guid>https://dev.to/niranjannlc/understanding-tokenomics-of-solana-2p5o</guid>
      <description>&lt;p&gt;In recent days of #100daysofsolana , i learned worked with transfer-fee-enabled tokens, withheld fees, fee authorities, and Token-2022-specific behavior.&lt;/p&gt;

&lt;p&gt;During this , i specifically struggled with  creating a standard SPL token account instead of a Token-2022 token account, which result in transactions fail, accounts appear incompatible, and CLI commands behave unexpectedly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fezs4kbixnfu93rqh38td.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fezs4kbixnfu93rqh38td.png" alt="Failure " width="798" height="161"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From this struggle , i specifically learnt that : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fees are automatically deducted during transfers,&lt;/li&gt;
&lt;li&gt;fees accumulate in token accounts,&lt;/li&gt;
&lt;li&gt;withheld fees must later be withdrawn. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3tebsei23q4axrhb1ukq.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2F3tebsei23q4axrhb1ukq.png" alt="Withheld fees withdrawn illustrated " width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>100daysofsolana</category>
    </item>
    <item>
      <title>Solana Account Model — City Analogy</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Wed, 27 May 2026 07:18:52 +0000</pubDate>
      <link>https://dev.to/niranjannlc/solana-account-model-city-analogy-1lhp</link>
      <guid>https://dev.to/niranjannlc/solana-account-model-city-analogy-1lhp</guid>
      <description>&lt;h2&gt;
  
  
  Think of Solana as a city
&lt;/h2&gt;

&lt;p&gt;Every building in the city has the same basic structure: an address, a size, an owner, and contents inside. That is exactly what an account is — a building. The blockchain is the city map that records who owns what building and what is inside each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 5 fields — what every building has
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Analogy&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lamports&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;money inside the building&lt;/td&gt;
&lt;td&gt;how much SOL this account holds (1 SOL = 1 billion lamports)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;owner&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;who has the master key&lt;/td&gt;
&lt;td&gt;only this program can change what is inside — everyone else can look but not touch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;data&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;what is stored inside&lt;/td&gt;
&lt;td&gt;raw bytes — could be empty (a wallet) or full of state (token balance, game score)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;executable&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;is it a factory or a house?&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;false&lt;/code&gt; = stores things (wallet, data) · &lt;code&gt;true&lt;/code&gt; = runs code (a program)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rentEpoch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;building tax status&lt;/td&gt;
&lt;td&gt;pay 2 years rent upfront and you never pay again — that is rent exemption&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why are program and data separate buildings?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Ethereum way:&lt;/strong&gt; imagine a McDonald's where the kitchen (code) and the customer orders (data) are locked inside the same room. To change the menu, you demolish the whole building and rebuild it. Every new franchise needs its own separate building with its own separate kitchen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Solana way:&lt;/strong&gt; the kitchen (program account) is one permanent building in the city. It never stores any food orders inside — it is just the recipe book and the chef. Every customer order (data account) is a separate locker room next door, owned by the kitchen. Millions of lockers, one kitchen.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three building types in the city
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Wallet account&lt;/strong&gt; — Your house. You own it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;executable: false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;data: empty&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;owner: System Program&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Holds SOL. The System Program is like the city government — it owns all plain wallets but you control yours with your private key (signature).&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Program account&lt;/strong&gt; — A factory. Read-only.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;executable: true&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;data: BPF bytecode&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;owner: BPF Loader&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Pure logic. No state lives here. Once deployed it just sits there waiting to be called. Upgrading means redeploying the bytecode — the data accounts are untouched.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data account (PDA)&lt;/strong&gt; — A locker assigned to you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;executable: false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;data: your state&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;owner: the program&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Created by the program on your behalf. Stores your token balance, your game score, your profile — whatever the program needs to remember about you. You cannot open it without the program.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One-line rule to remember forever
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;strong&gt;owner&lt;/strong&gt; field is the master key. Only the program listed as owner can change the data inside or take lamports out. Anyone in the world can send SOL in or read the data — but only the owner can write.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your wallet is owned by the System Program. When you sign a transaction, you are telling the System Program "I authorise this" — and it acts on your behalf because your signature matches your address.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Walk me through a SOL transfer at the account level — which accounts change and which programs act on them.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>100daysofsolana</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>solana</category>
    </item>
    <item>
      <title>Solana Transactions: not just a “request/response” ,but “atomic on-chain state changes”</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Wed, 27 May 2026 05:28:51 +0000</pubDate>
      <link>https://dev.to/niranjannlc/solana-transactions-not-just-a-requestresponse-but-atomic-on-chain-state-changes-38pg</link>
      <guid>https://dev.to/niranjannlc/solana-transactions-not-just-a-requestresponse-but-atomic-on-chain-state-changes-38pg</guid>
      <description>&lt;p&gt;In web2 , our rest api call are confined with just request and response framework . In web3 , for this particular solana , our transaction goes through  this full commitment lifecycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;send() → Processed ✓ → Confirmed ✓ → Finalized ✓
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Processed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Validator received the transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Confirmed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2/3 of stake weight agrees&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Finalized&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Permanent — cannot be rolled back&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;sendAndConfirmTransaction()&lt;/code&gt; polls internally through all 3 states and resolves once finalized.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pay to &lt;em&gt;attempt&lt;/em&gt;, not just to &lt;em&gt;succeed&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Unlike of web2 , on which failed transaction incur nothing ,in web3 , we  pay to &lt;em&gt;attempt&lt;/em&gt;, not just to &lt;em&gt;succeed&lt;/em&gt;. The chain ran the instruction, hit the error, and charged the fee anyway.&lt;/p&gt;

&lt;p&gt;During my day 19 of 100 days of solona ,  I revealed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Status: Error processing Instruction 0 — custom program error: 0x1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;0x1&lt;/code&gt; = &lt;code&gt;InsufficientFunds&lt;/code&gt; on the System Program&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  What the failed tx showed
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftabvveqpaoz2nac5n3t2.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Ftabvveqpaoz2nac5n3t2.png" alt=" " width="799" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Value from my terminal&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Error code&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;custom program error: 0x1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fee charged&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;0.000005 SOL&lt;/code&gt; (still deducted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compute Units&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;150&lt;/code&gt; consumed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Balance change&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;1.468975 → 1.46897&lt;/code&gt; (fee only)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Log message&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Transfer: insufficient lamports 1468970000, need 500000000000&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Final Note : err.logs vs console.error
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;err.logs&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;console.error(err)&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Source&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Solana runtime (on-chain)&lt;/td&gt;
&lt;td&gt;Node.js&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tells you&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;WHY the chain rejected it&lt;/td&gt;
&lt;td&gt;WHERE your code broke&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Can be undefined?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — if tx never reached the chain&lt;/td&gt;
&lt;td&gt;No — always present&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Transfer: insufficient lamports…&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SendTransactionError: simulation failed…&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Recommendation :  Always use both:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;JS error:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;     &lt;span class="c1"&gt;// WHERE it broke&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Chain logs:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;       &lt;span class="c1"&gt;// WHY chain rejected&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This much upto my learning journey for now . Will be updating other blog soon too . &lt;/p&gt;

</description>
      <category>solana</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>100daysofsolana</category>
    </item>
    <item>
      <title>Policy Storyteller: Turning Nepali Bills into Human Stories with Gemma 4</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Mon, 25 May 2026 06:28:32 +0000</pubDate>
      <link>https://dev.to/niranjannlc/policy-storyteller-turning-nepali-bills-into-human-stories-with-gemma-4-5526</link>
      <guid>https://dev.to/niranjannlc/policy-storyteller-turning-nepali-bills-into-human-stories-with-gemma-4-5526</guid>
      <description>&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Policy Storyteller&lt;/strong&gt; helps Nepali citizens understand laws without a law degree.&lt;/p&gt;

&lt;p&gt;Pick a bill → get a &lt;strong&gt;plain-language brief&lt;/strong&gt;, &lt;strong&gt;three diverse personas&lt;/strong&gt; (Terai, hill, city — farmer, student, shopkeeper…), each with a &lt;strong&gt;day-in-the-life scenario&lt;/strong&gt; and &lt;strong&gt;what becomes riskier / safer&lt;/strong&gt; → vote on the story. English or नेपाली.&lt;/p&gt;

&lt;p&gt;Four bills built in: Social Media Act 2081, IT &amp;amp; Cyber Security 2082, School Education 2080, Privacy Act 2075.&lt;/p&gt;

&lt;p&gt;Not legal advice — &lt;strong&gt;digital equity&lt;/strong&gt; for low literacy and patchy 4G.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/NiranjanNlc/PolicyStoryTeller" rel="noopener noreferrer"&gt;https://github.com/NiranjanNlc/PolicyStoryTeller&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flow:&lt;/strong&gt; Choose bill → Generate story (~1–2 min) → Explore brief &amp;amp; personas → Vote. Stories cache in &lt;code&gt;localStorage&lt;/code&gt; per bill + language.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Gemma 4
&lt;/h2&gt;

&lt;p&gt;Gemma 4 does &lt;strong&gt;everything&lt;/strong&gt; — no hand-written summaries, no rules engine. A FastAPI backend chains seven focused calls per story:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Gemma 4 outputs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Brief&lt;/td&gt;
&lt;td&gt;JSON: summary, who is affected, key points&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Personas&lt;/td&gt;
&lt;td&gt;3 diverse Nepali composites&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scenarios&lt;/td&gt;
&lt;td&gt;2–3 sentences each, NPR &amp;amp; real places&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Risks&lt;/td&gt;
&lt;td&gt;JSON: riskier / safer lists&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Prompts force &lt;strong&gt;Nepal context&lt;/strong&gt; (Nagarpalika, NPR, Dashain, Terai/hill/mountain) and &lt;strong&gt;Devanagari Nepali&lt;/strong&gt; when selected. Pydantic validates JSON; one auto-retry if the model adds markdown fences.&lt;/p&gt;

&lt;p&gt;Via &lt;strong&gt;OpenRouter&lt;/strong&gt; (OpenAI-compatible API) — swap model id in &lt;code&gt;.env&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Model &amp;amp; Why
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gemma 4 small (2B/4B)&lt;/strong&gt; — on purpose.&lt;/p&gt;

&lt;p&gt;Civic users are on phones and free tiers. Each job is small JSON or a few sentences — not a 31B reasoning marathon. Seven sequential calls already take ~1–2 minutes; small Gemma keeps that affordable, fast enough, and good enough in Nepali. MoE/dense would be overkill; small Gemma is the tool that can run &lt;em&gt;in&lt;/em&gt; Nepal, not just &lt;em&gt;about&lt;/em&gt; Nepal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;React + Vite + Tailwind · FastAPI + Pydantic · OpenRouter · no DB (localStorage + file votes)&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="nb"&gt;cd &lt;/span&gt;backend &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; copy .env.example .env
uvicorn main:app &lt;span class="nt"&gt;--reload&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 8000
&lt;span class="nb"&gt;cd&lt;/span&gt; ../frontend &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Learned (quick)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Retry on bad JSON beats switching to a bigger model.&lt;/li&gt;
&lt;li&gt;Tell Gemma &lt;em&gt;who&lt;/em&gt; the reader is (“low legal literacy”) — Nepali output improves a lot.&lt;/li&gt;
&lt;li&gt;Run calls &lt;strong&gt;sequentially&lt;/strong&gt; on free tier or you hit 429 halfway through a story.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/NiranjanNlc/PolicyStoryTeller" rel="noopener noreferrer"&gt;https://github.com/NiranjanNlc/PolicyStoryTeller&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge&lt;/a&gt; — &lt;em&gt;Build With Gemma 4&lt;/em&gt; · Solo · MIT&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; Educational composites only — verify with official Nepal Government sources.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>NO no Account is not just a database , whose history is traced and logged .</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Mon, 04 May 2026 13:36:21 +0000</pubDate>
      <link>https://dev.to/niranjannlc/no-no-account-is-not-just-a-database-whose-history-is-traced-and-logged--2092</link>
      <guid>https://dev.to/niranjannlc/no-no-account-is-not-just-a-database-whose-history-is-traced-and-logged--2092</guid>
      <description>&lt;p&gt;In this second week of #100daysofsolana , i got got introduced with the concept of account . I learned it by contrasting with the database of web2 . &lt;br&gt;
However , i am aware that Solana's account model is not  replacement for web2 database, rather it's solving a different problem: storing state in a system where no single entity has control, reads are public, and writes require cryptographic authorization. &lt;br&gt;
On Solana, "every account is an open book the moment it exists". You can query any program address on the internet and instantly see its balance, owner, executable flag, and transaction history—no API key, no permission, no credentials. &lt;br&gt;
In a normal app, our code checks if a user is allowed to edit something. On Solana, the system itself blocks anyone except the account's owner from making changes. To update an account, we must prove you own it by signing the transaction.&lt;br&gt;
In a regular database, we can ask for related data with a JOIN. On Solana, accounts cannot query each other. If we  need connected information, we  fetch each account individually and combine them in your own code. This sounds old‑fashioned, but it's one reason Solana runs so fast.&lt;/p&gt;

</description>
      <category>100daysofsolona</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>First experince with programming in web3</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Sun, 26 Apr 2026 11:34:43 +0000</pubDate>
      <link>https://dev.to/niranjannlc/first-experince-with-programming-in-web3-5bkk</link>
      <guid>https://dev.to/niranjannlc/first-experince-with-programming-in-web3-5bkk</guid>
      <description>&lt;p&gt;Here , i  connect with the devnet of sol with the help of phanthom wallet from browser &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqfa8le4rqgsriu7dpb7.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fnqfa8le4rqgsriu7dpb7.png" alt=" " width="799" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>100daysofsolana</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learning of W1 of #100DaysOfSolana</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Sun, 26 Apr 2026 11:27:51 +0000</pubDate>
      <link>https://dev.to/niranjannlc/learning-of-w1-of-100daysofsolana-39fc</link>
      <guid>https://dev.to/niranjannlc/learning-of-w1-of-100daysofsolana-39fc</guid>
      <description>&lt;p&gt;I always have the thrill and wish for learning and experimenting with the web3 . Scattered tutorial and knowledge over different platform has not contributed significantly in  my knowledge building . &lt;br&gt;
So , i decides to enroll and go along with #100DaysOfSolana to bring some sort of structured knowledge in the sector of web3 . Till now , this journey gave me a true eureka moment for understanding different concepts and terminology that I’d heard before but never fully grasped. Let me share three breakthroughs that changed how I see Web3.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Public Key vs. Private Key – Not Just a Username and Password&lt;/strong&gt;&lt;br&gt;
The public key is what others see. They use it to send you crypto or verify that a transaction came from your wallet. In Web2 terms, it’s like a username. But here’s the nuance: Web3 is pseudonymous, not fully anonymous. Your public key is visible on the ledger, but your real-world identity isn’t attached unless you connect it yourself.&lt;/p&gt;

&lt;p&gt;The private key, on the other hand, is yours alone. You use it to sign transactions – proving you own the wallet without revealing the key itself. It’s similar to a Web2 password, but with one huge difference: there’s no “forgot password” option. Lose your private key, lose your funds forever. That’s why people write it down on paper or use hardware wallets. This clarity was my first big aha moment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Devnet – The Playground Before the Real Game&lt;/strong&gt;&lt;br&gt;
For a long time, I wondered: how can developers experiment with cryptocurrency when it has real value and trades live? That confusion vanished when I discovered Solana Devnet.&lt;/p&gt;

&lt;p&gt;On devnet, you can request fake SOL for free using a faucet. You can deploy smart contracts, send transactions, and make mistakes without losing real money. It’s a sandbox. Once your code works on devnet, you test again on testnet, and only then do you go to mainnet – the live blockchain. Now I understand that almost every serious blockchain project starts its life on a devnet or testnet. This made programming with crypto feel safe and exciting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Integers, Not Floats – Avoiding the Rounding Nightmare&lt;/strong&gt;&lt;br&gt;
Another question haunted me: why do blockchains use integers (like lamports for SOL or satoshis for Bitcoin) instead of floating-point numbers?&lt;/p&gt;

&lt;p&gt;The answer clicked when I thought about rounding errors. Different machines round floating-point numbers differently – even by tiny amounts. On a public ledger where thousands of nodes must agree on every balance, those tiny differences would break consensus. One node might see 0.1 + 0.2 = 0.30000000000000004, while another sees a slightly different value. Using integers (e.g., 300,000 lamports) guarantees every node calculates exactly the same result. This small design choice is actually a pillar of trust in blockchain.&lt;/p&gt;

&lt;p&gt;So , in solana we are using the things of lamports and sol, while the result are being shown in the sol , the underlying calculation all are performed in lamports . For conversion , 1 SOL is always equal to 1,000,000,000 (one billion) Lamports. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
These eureka moments didn’t come  easily . It was with the passion  curiosity , dareness to ask the silly question , contigency in the learning , learning from the mistake and resistace to break the thing along making it . &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>web3</category>
      <category>100daysofsolana</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Coffee, Code, and Junie: My Journey to 10x Productivity with JetBrains AI</title>
      <dc:creator>NIRANJAN LAMICHHANE</dc:creator>
      <pubDate>Tue, 03 Feb 2026 14:25:59 +0000</pubDate>
      <link>https://dev.to/niranjannlc/coffee-code-and-junie-my-journey-to-10x-productivity-with-jetbrains-ai-27m4</link>
      <guid>https://dev.to/niranjannlc/coffee-code-and-junie-my-journey-to-10x-productivity-with-jetbrains-ai-27m4</guid>
      <description>&lt;h3&gt;
  
  
  Dream of 10x Developer :
&lt;/h3&gt;

&lt;p&gt;I've always chased that mythical 10x developer status—that magical state where code flows like water, bugs vanish before they form, and architecture emerges perfectly from the chaos.But something was holding me back to achieve this . &lt;br&gt;
I'm an IntelliJ evangelist. The keyboard shortcuts are muscle memory, the UI feels like home, and Android Studio is basically family. But every time I tried AI coding assistants, I hit the same wall—they all lived in VS Code's world. The mental context switching was killing my flow state.&lt;/p&gt;

&lt;p&gt;At this time , the intelij ide announces this hackathon of the Sky limit , providing myself the free credit and opportunity to try out junie and ai assisted coding .Its  like a gift from the coding gods: free access to Junie, an AI assistant built right into my beloved IDE.&lt;/p&gt;

&lt;p&gt;Same time , i was  starting to learn python and data science too .  To get maximum advantage of junie , i install python plugin in intelij ide to give a try to python and data science . Later , i found that Jetbrains have similar product “ Pycharm “ for this purposes. &lt;br&gt;
    Enough about me , lets talk about what I built  with the help of junie . &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fycmeuq0agz5z0ofczt5h.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fycmeuq0agz5z0ofczt5h.png" alt="Homepage " width="800" height="430"&gt;&lt;/a&gt;&lt;br&gt;
I built ScrIM Coach, which  is an esports performance analysis tool that transforms raw League of Legends match data into actionable coaching insights. We  analyzes professional team performance using the GRID Esports API to identify strategic patterns, execution gaps, and draft weaknesses. We provide executive summary , detailed analysis , practice planning by analyzing the data to the coach . The coach can also print out the action plan from the insight we have constructed . &lt;/p&gt;

&lt;p&gt;The project is licenced under MIT license in following  &lt;a href="https://github.com/NiranjanNlc/CLOUD9-skylimit-hackathon" rel="noopener noreferrer"&gt;source :&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can try out at : &lt;a href="https://cloud9-skylimit-hackathon-1.onrender.com/" rel="noopener noreferrer"&gt;here &lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  My Favourite part :
&lt;/h3&gt;

&lt;p&gt;Favourite part of me was the BRAVE MODE. I give complete control over the junie to make changes to the project and its file . After providing prompt , i can have long sip of the coffee , read the hackathon details and submission requirement , while junie have completed the tasks . &lt;br&gt;
I'd write a prompt like 'Refactor this to follow clean architecture with proper separation of concerns,' take a long sip of coffee, watch Junie restructure 15 files simultaneously, and return to a codebase that was suddenly... beautiful. The best part? Nothing broke. Tests still passed. The UI still rendered&lt;/p&gt;

&lt;h3&gt;
  
  
  Important Contribution :
&lt;/h3&gt;

&lt;p&gt;The most important contribution junie make in my productivity is during the ui enhancement . Being the backend developer and android engineer previously , pixel perfect ui seems to be not my cup of tea. But using junie , i can not only draft , but also implement pixel perfect ui , in many cases , junie does it by itself , what we have to do is attach the screen shot of what went wrong and what is your desired output . &lt;/p&gt;

&lt;h3&gt;
  
  
  Impressive Refactoring  :
&lt;/h3&gt;

&lt;p&gt;The most powerful ability and impressive things about junie  for me is its ability to refactor without breaking the functionality and UI . I initially designed the working MVp with some trash architecture without following any pattern and standard . I refactor the whole of my mvp to adhere to solid principle and clean code architecture in the single prompt . Interestingly , nothing breaks at all  and i would be able to add new feature after that in more easier and scalable way. &lt;/p&gt;

&lt;h3&gt;
  
  
  UI Magic for Backend Developers:
&lt;/h3&gt;

&lt;p&gt;The most important contribution junie make in my productivity is during the ui enhancement . Being the backend developer and android engineer previously , pixel perfect ui seems to be not my cup of tea. But using junie , i can not only draft , but also implement pixel perfect ui , in many cases , junie does it by itself , what we have to do is attach the screen shot of what went wrong and what is your desired output . &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwqr0lvkcplw22ep58cu.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fbwqr0lvkcplw22ep58cu.png" alt="Anaysis output" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Flow State Achievement:
&lt;/h3&gt;

&lt;p&gt;My workflow was made more smoother and i have attained the flow state during my this journey of hackathon . Adding feature , enhancing functionality were just a prompt away  and its debug mode executed by itself makes it produce the code which is actually  working . &lt;/p&gt;

&lt;h3&gt;
  
  
  Most Misused Capability :
&lt;/h3&gt;

&lt;p&gt;Not only i used Junie , I also misused junie , especially in the work of version control . I ordered ( just not prompted) junie to commit the changes it has made with clear commit message and push it to the remote source . Similarly , i often ordered it to combine multiple git commit to the single one  and of course , it obey me like a good servant. &lt;/p&gt;

&lt;h3&gt;
  
  
  Wish it was there :
&lt;/h3&gt;

&lt;p&gt;I wish to make my changes live on my deployed site as soon as i make change in the codebase, because legends debug in production. If inteilij have MCP server support , it would have been few prompt away . Absence of this feature makes me little disappointed at last . &lt;/p&gt;

&lt;p&gt;If you're like me—comfortable in JetBrains' ecosystem but curious about AI assistance—take the leap. The hackathon may be over, but the learning isn't. Junie showed me that the future of development isn't about replacing developers; it's about amplifying our humanity through technology.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
