Blog — page 12
Technical writing on Web3, AI, Bitcoin, and building software. Written by Uvin Vindula.
170 articles
The Real Cost of AI Integration in 2026
A transparent breakdown of what AI integration actually costs in 2026 — from API spend and development hours to infrastructure and ongoing maintenance. Based on real projects I've shipped, including the EuroParts Lanka AI Part Finder. No vague estimates. Real numbers from $15K to $50K engagements.
Reentrancy Attacks Explained: How They Work and How to Prevent Them
A complete breakdown of reentrancy attacks in smart contracts — from the 2016 DAO hack to modern cross-function and read-only reentrancy variants. Includes working vulnerable code, a full attack contract, defense patterns (Checks-Effects-Interactions and ReentrancyGuard), and Foundry fuzz tests.
Upgradeable Smart Contracts: Proxy Patterns Explained
A deep dive into upgradeable smart contract patterns — Transparent Proxy, UUPS, and Beacon Proxy — with real Solidity code, storage layout rules, and honest guidance on when upgradeability adds risk instead of value. Based on production deployments for clients who need post-deployment flexibility.
Implementing Semantic Search in Next.js with Supabase pgvector
A complete implementation guide for building semantic search with pgvector in Supabase. Covers embedding generation, vector storage, hybrid search combining vector and full-text queries, and a production-ready Next.js API route with a React search component. Real code from real projects.
Next.js API Route Design Patterns for Production
Battle-tested Next.js API route design patterns from real production apps. Covers Route Handlers with Zod validation, authentication middleware, structured error handling, rate limiting, cursor-based pagination, file uploads, webhook endpoints, and a complete production API checklist.
Building a Staking Protocol with Reward Distribution
A complete guide to building a gas-efficient staking protocol with reward distribution using the reward index pattern. Covers Solidity implementation, compound staking, multi-token rewards, security considerations, and Foundry testing — based on real DeFi client work.
Vector Databases Explained: Pinecone vs Weaviate vs pgvector
A practical comparison of Pinecone, Weaviate, and pgvector from someone who has shipped production systems on all three. Spoiler: pgvector wins for most teams because it is already in your database.
Smart Contract Security Checklist: 25 Things to Check Before Mainnet
A comprehensive smart contract security checklist covering 25 critical vulnerabilities to audit before deploying to mainnet — with real vulnerable code examples, Foundry fuzz tests, and fixes. From reentrancy and access control to flash loan attacks and gas optimization.
The Complete Guide to OpenZeppelin Contracts
OpenZeppelin Contracts is the library I install before writing a single line of Solidity. This guide covers every contract family I use in production: ERC-20, ERC-721, ERC-1155 token standards, AccessControl for role-based permissions, ReentrancyGuard for security, Governor for on-chain governance, and the UUPS proxy pattern for upgradeability. You will learn how to extend OpenZeppelin contracts properly, when to override versus compose, and the exact patterns I follow across mainnet deployments on Ethereum, Arbitrum, and Base. Practical Solidity code, no theory padding.
Building an AI Chatbot That Actually Works
Most AI chatbots are glorified search bars that hallucinate. Here's how to build one that actually works — with proper context management, streaming responses, conversation memory, and guardrails that prevent your chatbot from confidently lying to customers. Based on real production experience building the EuroParts Lanka AI Part Finder with Claude API, Next.js, and TypeScript. Includes complete code examples, architecture decisions, and a production checklist.
Bitcoin Halving Explained: What It Means and What Happens Next
The Bitcoin halving is one of the most important events in cryptocurrency — yet most people do not actually understand what it is or why it matters. Every 210,000 blocks, the reward that miners receive for validating transactions is cut in half. This is not a decision made by a committee. It is code. It was written into Bitcoin's protocol by Satoshi Nakamoto in 2008 and it will continue executing until roughly the year 2140. In this article, I break down the halving mechanism in plain English, walk through every historical halving with real price data, explain the supply economics that make Bitcoin fundamentally different from fiat currency, and share my perspective as someone who has been educating people about Bitcoin across Sri Lanka and the UK since 2020.
Web3 Authentication: Wallet-Based Login for Modern Apps
A practical guide to implementing wallet-based authentication using wagmi, RainbowKit, and Sign-In with Ethereum (SIWE). Covers session management, backend verification, multi-chain support, and the UX patterns that actually get users through the login flow without confusion.