<?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: sasi</title>
    <description>The latest articles on DEV Community by sasi (@sasi_13316d9aacdc95ef0d00).</description>
    <link>https://dev.to/sasi_13316d9aacdc95ef0d00</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%2F3803229%2Ff3fa3ae8-c43e-4f88-967e-6ef1c4da91bc.jpg</url>
      <title>DEV Community: sasi</title>
      <link>https://dev.to/sasi_13316d9aacdc95ef0d00</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sasi_13316d9aacdc95ef0d00"/>
    <language>en</language>
    <item>
      <title>VeriAid — AI-Audited Micro-Philanthropy on Solana</title>
      <dc:creator>sasi</dc:creator>
      <pubDate>Sat, 05 Sep 2026 12:12:37 +0000</pubDate>
      <link>https://dev.to/sasi_13316d9aacdc95ef0d00/veriaid-ai-audited-micro-philanthropy-on-solana-4l7p</link>
      <guid>https://dev.to/sasi_13316d9aacdc95ef0d00/veriaid-ai-audited-micro-philanthropy-on-solana-4l7p</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-09-03"&gt;Weekend Challenge: Generosity Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;VeriAid&lt;/strong&gt; is a micro-philanthropy platform where &lt;strong&gt;Google Gemini&lt;/strong&gt; audits every campaign and &lt;strong&gt;Solana&lt;/strong&gt; settles every donation — built for the International Day of Charity.&lt;/p&gt;

&lt;p&gt;Two things stop people from giving small amounts to grassroots causes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;You can't tell if it's real.&lt;/strong&gt; Grassroots campaigns have no audit trail. Donors either give blindly or don't give at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small gifts don't survive the fees.&lt;/strong&gt; At 2.9% + $0.30, a $2 donation loses 17% before it lands. Micro-giving is economically impossible on card rails.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;VeriAid attacks both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemini campaign intake audit&lt;/strong&gt; — every submitted aid request is scored 0–99 for credibility by &lt;code&gt;gemini-2.5-flash&lt;/code&gt;, with an urgency classification, a budget-plausibility check against regional market prices, itemized findings, and named risk factors. The prompt is deliberately harsh: vague campaigns with no verifiable location or organizer land in the 30–49 band, and the score is shown to donors before they give.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Milestone-gated funds, not lump sums&lt;/strong&gt; — a campaign is split into milestones (&lt;code&gt;pending → funded → audited&lt;/code&gt;). To unlock the next one, the organizer submits a vendor receipt and deliverable notes, and Gemini audits the claimed expense against that milestone's stated scope before approving disbursement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solana micro-settlement&lt;/strong&gt; — donations go peer-to-peer from donor to organizer wallet on Devnet with a Memo Program instruction carrying the campaign ID and the donor's message. Fees are ~0.000005 SOL, so a 0.05 SOL gift arrives essentially whole.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-install evaluator wallet&lt;/strong&gt; — the app generates a persistent keypair in &lt;code&gt;localStorage&lt;/code&gt; and airdrops Devnet SOL on one click, so you can sign a real transaction without a browser extension.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generosity Copilot&lt;/strong&gt; — ask &lt;em&gt;"I have 0.2 SOL and want to fund clean water"&lt;/em&gt; and Gemini reads the live campaign registry and returns matched campaigns with their trust scores and one-click donate buttons.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;🔗 &lt;strong&gt;Live app:&lt;/strong&gt; &lt;a href="https://dev-to-weekend-challenge-generosity-edition-ballsh20t-koodam.vercel.app/" rel="noopener noreferrer"&gt;https://dev-to-weekend-challenge-generosity-edition-ballsh20t-koodam.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;60-second tour:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Look at the top bar&lt;/strong&gt; — your Devnet evaluator wallet is already provisioned. Hit &lt;strong&gt;+Faucet&lt;/strong&gt; for 1 SOL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click "AI Audit"&lt;/strong&gt; on &lt;em&gt;Maya's Urgent Pediatric Cardiac Surgery&lt;/em&gt; (99% trust) or &lt;em&gt;Kerala Monsoon Relief&lt;/em&gt; (96%) — you get the full Gemini report: trust score, urgency, budget sanity check, key findings, risk factors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click "Request Aid"&lt;/strong&gt; and submit a deliberately vague campaign ("need money for stuff"). Gemini will score it in the 30s and tell you exactly why. This is the fun part — the auditor actually pushes back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Donate 0.05 SOL&lt;/strong&gt; with a message of hope → transaction signs, confetti fires, and you get an explorer link.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Submit a receipt&lt;/strong&gt; inside a campaign's milestone and watch Gemini audit the expense against the deliverable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask the Copilot&lt;/strong&gt; for causes matching your budget.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The flow:&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;       [ Grassroots Aid Request ]
                   │
                   ▼
     ┌────────────────────────────┐
     │  Google Gemini 2.5 Flash   │ ──► Trust Score (0-99)
     │  Intake Verification Agent │ ──► Budget Sanity Check
     └────────────────────────────┘ ──► Urgency Classification
                   │
                   ▼ (Verified)
     ┌────────────────────────────┐
     │   VeriAid Registry Feed    │
     └────────────────────────────┘
                   │
                   ▼ (Donor Micro-Contribution)
     ┌────────────────────────────┐
     │       Solana Devnet        │ ──► Sub-second finality
     │   Peer-to-Peer + Memo      │ ──► Fees &amp;lt; $0.001
     └────────────────────────────┘ ──► On-chain donor message
                   │
                   ▼ (Milestone Completion)
     ┌────────────────────────────┐
     │  Gemini AI Receipt Auditor │ ──► Vendor &amp;amp; deliverable audit
     └────────────────────────────┘ ──► Disbursement authorization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/voiddata/dev-to-challenges/tree/main/weekend_challenge_generosity_edition" rel="noopener noreferrer"&gt;https://github.com/voiddata/dev-to-challenges/tree/main/weekend_challenge_generosity_edition&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/lib/gemini.ts            # 3 Gemini agents: intake audit, receipt audit, donor copilot
src/lib/solana.ts            # Devnet connection, sandbox keypair, airdrop, transfer + memo
src/lib/campaign-store.ts    # Campaign registry, donation recording, milestone state machine
src/lib/sample-data.ts       # 5 seeded campaigns across 5 aid categories
src/app/api/
  gemini/verify              # POST — audit a new campaign
  gemini/copilot             # POST — conversational campaign matching
  campaigns/[id]/donate      # POST — record an on-chain donation
  campaigns/[id]/audit-receipt  # POST — audit a milestone receipt
src/components/              # 13 components: cards, detail modal, donate, receipt audit, copilot, ledger
scripts/test-engine.ts       # End-to-end suite across store, Gemini, and Solana layers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next.js 14 App Router + TypeScript, Tailwind, &lt;code&gt;@google/genai&lt;/code&gt;, &lt;code&gt;@solana/web3.js&lt;/code&gt;. No database, no external backend — clone, &lt;code&gt;npm install&lt;/code&gt;, &lt;code&gt;npm run dev&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Gemini as an auditor, not a chatbot
&lt;/h3&gt;

&lt;p&gt;The interesting design decision was making Gemini &lt;strong&gt;adversarial toward its own users&lt;/strong&gt;. A trust score is worthless if everything scores 95%, so the intake prompt hands Gemini an explicit scoring rubric with anchored bands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateContent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;responseMimeType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&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;&lt;code&gt;responseMimeType: 'application/json'&lt;/code&gt; is what makes this production-viable — Gemini returns parseable structured output directly, no regex-scraping fenced code blocks. &lt;code&gt;temperature: 0.2&lt;/code&gt; keeps scores stable across identical submissions, which matters when a number is a trust signal to a donor.&lt;/p&gt;

&lt;p&gt;The rubric bands (0–29 fake, 30–49 vague, 50–64 gaps, 65–79 credible, 80–94 strong, 95–99 exceptional) were the fix for a real problem: with an unanchored "score 0–100" prompt, Gemini clustered everything at 85+ and flattered every campaign. Anchoring the bands with concrete failure criteria made it genuinely willing to fail a submission.&lt;/p&gt;

&lt;p&gt;Every parsed field is then clamped and defaulted server-side, so a malformed model response degrades into a low-confidence report instead of a crash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;trustScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;99&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;parsed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trustScore&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The receipt auditor is the same pattern pointed at a narrower question: does this vendor, amount, and description actually match the milestone's stated deliverable? It returns a confidence score plus a &lt;code&gt;flaggedDiscrepancies&lt;/code&gt; array, and &lt;code&gt;disbursementApproved&lt;/code&gt; gates the milestone transition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solana as the reason micro-giving works at all
&lt;/h3&gt;

&lt;p&gt;Solana isn't decoration here — it's the enabling constraint. The entire product premise (fund &lt;em&gt;one water filter&lt;/em&gt; for 0.05 SOL) only exists on a chain where fees round to zero.&lt;/p&gt;

&lt;p&gt;Donations carry a Memo Program v2 instruction, so the donor's message and campaign reference live on-chain alongside the transfer rather than in my database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transaction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Transaction&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;SystemProgram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transfer&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;fromPubkey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;fromKeypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;toPubkey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;recipientPubkey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;lamports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amountSol&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;LAMPORTS_PER_SOL&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;pubkey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;fromKeypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;isSigner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;isWritable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="na"&gt;programId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PublicKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`VeriAid Giving: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;memoText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&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;h3&gt;
  
  
  The friction I actually spent the most time on
&lt;/h3&gt;

&lt;p&gt;Wallet onboarding kills demos. Asking a judge to install Phantom, switch to Devnet, and find a faucet is three chances to lose them before they see anything.&lt;/p&gt;

&lt;p&gt;So the app provisions its own keypair in &lt;code&gt;localStorage&lt;/code&gt; on first load and wires a one-click faucet button next to the balance. Before every transfer it checks the on-chain balance and auto-airdrops if you're short. When the public Devnet faucet rate-limits (429s are common on hackathon weekends), the donation completes in a &lt;strong&gt;Sandbox Relayer&lt;/strong&gt; mode that records the gift locally and labels the receipt accordingly, so a rate-limited faucet doesn't dead-end the walkthrough. With a funded wallet, transfers are fully on-chain and explorer-verifiable.&lt;/p&gt;

&lt;p&gt;There's also a settings modal for bringing your own Gemini key at runtime, and every Gemini call falls back to a deterministic heuristic audit if no key is configured — so a fresh clone with an empty &lt;code&gt;.env&lt;/code&gt; still demos end to end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🌟 Best Use of Google AI
&lt;/h3&gt;

&lt;p&gt;Gemini is the product's trust layer, not a feature bolted on. Three distinct agents on &lt;code&gt;gemini-2.5-flash&lt;/code&gt; via &lt;code&gt;@google/genai&lt;/code&gt;, all using structured JSON output: an &lt;strong&gt;adversarial intake auditor&lt;/strong&gt; with an anchored scoring rubric that will fail a weak campaign, a &lt;strong&gt;receipt auditor&lt;/strong&gt; that gates real fund disbursement on expense-to-deliverable matching, and a &lt;strong&gt;donor copilot&lt;/strong&gt; that reasons over the live campaign registry. Remove Gemini and VeriAid is just another donation form.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚡ Best Use of Solana
&lt;/h3&gt;

&lt;p&gt;Solana is the precondition for the whole idea. Sub-penny fees are what make a 0.05 SOL gift viable when card rails would eat 17% of it, and sub-second finality is what makes the donate-and-see-it-land moment feel instant. Donations are non-custodial peer-to-peer transfers with on-chain memos, paired with a zero-install sandbox wallet that generates, funds, and signs in the browser in seconds.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Generosity scales when it's verifiable. VeriAid makes small giving both provable and worth doing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>solana</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
