Blog — page 10
Technical writing on Web3, AI, Bitcoin, and building software. Written by Uvin Vindula.
150 articles
How to Build a Multi-Sig Wallet Smart Contract
A complete guide to building a production-grade multi-signature wallet smart contract in Solidity — from architecture and approval flows to execution logic and owner management. Includes a full working contract, Foundry test scenarios, and honest guidance on when to use Gnosis Safe instead of rolling your own.
Building AI-Powered Search for E-commerce Applications
How I built AI search systems that understand what customers actually mean — not just what they type. From EuroParts Lanka where customers describe car problems in plain language to FreshMart where shoppers search by recipe instead of ingredient. Semantic search, hybrid ranking, and the architecture that makes it work at production scale.
Automated Market Makers Explained: How AMMs Actually Work
A deep dive into automated market makers — the constant product formula, concentrated liquidity, impermanent loss with real numbers, and a Solidity AMM implementation from scratch.
wagmi and viem: The Modern Web3 Frontend Stack
A hands-on guide to building Web3 frontends with wagmi and viem — why I switched from ethers.js, how to set up wallet connections with RainbowKit, read and write contract data with full type safety, handle multi-chain configurations, and the real patterns I use on every client dApp. Based on production projects shipping on Ethereum, Arbitrum, Base, and Optimism.
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.