Kasa.
Backend engineering, system design, and the potholes in between.
LatestEngineering · 2026.10.10
Moving the Backend from Spring Boot to Rust: One Cutover and the Measured Numbers
EZLO's backend went from Java 21 to Rust in one cutover with contracts and data intact: memory 734 MiB to 32 MiB, startup 30 s to about 0.03 s, API latency about the same.
Read more →More posts
-
I Backtested a Round of Timing Strategies. None Beat Just Holding
I backtested timing and quant strategies across Taiwan stocks, US stocks, futures, and crypto, and after costs and daily-equity drawdowns none beat holding, while raising monthly contributions actually worked.
-
Mining a Month of Session Logs to Build Five Claude Code Mods
I had Claude read a month of session logs for requests I kept repeating and turned them into bands, status line items, and commands; the most useful, leftovers, tracks what Claude leaves behind.
-
Bitfinex Lending's Hidden Clock: A Batch Auction Every 20 Minutes
Bitfinex 2-day funding is really a batch auction clearing every 20 minutes; here's how I found it in the data, where my new quoting strategy earns in backtests, and the pitfalls of a three-step rollout.
-
The Simulator Was Always Profitable: An Honest Dry Run and Testing an AI Model's Predictive Power
I made an always-profitable dry run pay gas and take rejections; a 24-hour test then found no directional edge in the AI model, so I shut the project down under a preset rule.
-
Crawlers Only Saw a Spinner: Fixing Prerendering and Indexing on a Static Next.js Site
EZLO's prerendered HTML contained nothing but a spinner, and Google only recognized the English version. I switched to URL-based locale prerendering, then fixed two indexing problems caused by robots.txt.
-
Auto-Clicking muse Approval Cards: From Allow-All to a Trust List
My Chrome extension clicks Allow on muse.ai approval cards that stall overnight scheduled tasks, and once other people used it, it moved to a trust list with irreversible actions like posting handled separately.
-
The Reconciliation Alert Fired Twice: Missed and Double-Counted Interest When Bitfinex Positions Switch Sides
I check user earnings with a ratio of interest actually paid to booked accrual; it fired twice, once undercounting and once double-counting, both because Bitfinex splits one position across credits and loans.
-
Backtest Numbers Lie: The Pitfalls I Hit in Strategy Research
A pretty backtest doesn't prove a strategy works; these are the pitfalls I hit, from TradingView understating drawdown to missing random baselines, dirty data, short samples, and lookahead, and how I avoid each.
-
Code Review After the Rust Port: 15 Findings, 6 Carried Over from Java
Four lessons from a full code review after a Java-to-Rust port: transaction semantics copied from a misleading annotation, sqlx returning Ok on failed commits, disconnects killing handlers, and suspension sharing the lending flag.
-
Naked Candlestick Trading as Backtestable Rules: Out of Sample, It Lost to Random Entries
I turned a YouTuber's naked candlestick method into rules, backtested it on daily bars for over 1,000 Taiwan stocks against a random-timing control, and out of sample it lost by 2.62 standard deviations.
-
GPT as a Read-Only Reviewer for Claude Code: Adversarial Review With Pi
I wrapped Pi, connected to GPT models over an API, as a read-only reviewer Claude Code can call, and found out why permission rules can't stop file writes and how adversarial review converges.
-
Speeding Up Rust and Next.js CI on a 2 vCPU GitHub Runner
After moving the backend to Rust, the PR backend job went from 11.5 minutes to 1.5 and frontend checks from 81 seconds to 30, mostly through test databases, bcrypt, and caches that broke silently.
-
Why I Dollar-Cost Average Everything Into QQQ on IBKR
Why I dropped my 30% drawdown cap and now dollar-cost average monthly into QQQ on IBKR, covering the QQQ vs SPY history, the drawdown I accept, my rules for crashes, and long-term costs.
-
Letting Claude Triage Alerts Without Letting It Change Anything: Read-Only Triage Design and Pitfalls
When an alert fires, a Claude session with read-only tools hunts the root cause and posts to Discord; here's how I drew the permission boundary and two pitfalls: rewritten command paths and Sentry noise.
-
An AI Quoting On Chain Every 300ms: Measuring Gas Costs and Margin Accounting
Running an AI trading demo on Monad mainnet showed requoting every block costs ten times more gas than the spread earns; I also fixed a margin bug reverting 83% to 95% of orders.
-
One Unread Response Body Made Lighthouse Time Out Every Time
EZLO's mobile PageSpeed score was 46 and Lighthouse timed out on every run. The main cause was an unread body on anonymous refresh requests. After fixing it, public pages stopped checking login state entirely.
-
Using the CRAP Metric to Find the Functions That Most Need Tests
With mostly agent-written code, high line coverage couldn't show whether the gaps sat in the most complex functions; a CRAP threshold of 8 cleared 200-plus offending functions and turned up 72 issues to fix.
-
Wiring TradingView Strategy Alerts to Automated Orders on Binance
A BTC daily strategy from backtest to automated Binance orders: only daily had enough samples, tuning the backtest wrapper beat tuning the indicator, the relay syncs to target position, and stops sit on the exchange.
-
Does Lending Longer Pay More? Backtesting 30-Day and 120-Day Lending on Bitfinex
Long-tenor funding quotes far higher rates, but most loans repay within an hour; after fixing two inflating backtest bugs, here's the one lane that survived, how fragile it is, and the 120-day lock-up risk.
-
Clickable Bands in the Terminal: Reworking leftovers and What It Still Can't See
After shipping my Claude Code mods, I made the bands clickable within limits like uncolorable Buttons and hover misclicks, taught leftovers absolute paths and variable substitution, and listed what command matching still misses.
-
Content SEO for a New Domain: Check Search Volume First, Then Write Guides Around the Data
A new domain whose brand name is taken can only win long-tail traffic with guides. I ranked topics by OpenSEO search volume, checked each claim against primary sources, and loaded GA4 only on public pages.
-
From 1,000 to 10,000 USDT in Paper Trading: A Trend Strategy from Backtest to Shutdown
A trend strategy that backtested at 240x lost 10.7% in 2.5 days live; a hindsight-picked coin list had inflated it, and with point-in-time rankings, 10x in a year only happened from a bull-market start.
-
Account Security Follow-ups: 2FA Copy, a JWT Expiry Race, and Client-Side Password Encryption
EZLO can reach users' exchange API keys, so after launch I fixed three account security issues: checking security copy against the backend, parsing JWTs once to avoid an expiry race, and encrypting passwords before sending.
-
Publishing a Chrome Extension to the Web Store, Plus a One-Line Install Script
Getting Auto Approve for Muse through Chrome Web Store review, and a one-line install script for macOS, Linux, and Windows that keeps the steps to a minimum, since Chrome won't let programs install extensions.
-
Predict Rate Spikes and Hold Capital for Higher Rates? I Backtested It and Passed
Using perfect foresight as an upper-bound gate and then out-of-sample backtests, I tested holding capital for predicted lending-rate spikes: the ceiling was large, but a model using only current data kept about 10bp.
-
Writing My Own Module Dependency Scanner: An Architecture Map Plus Layering Rules in CI
My 18 backend packages had several dependency cycles tracked only by memory, so I wrote a compile-free scanner for a clickable architecture map and CI layering rules, then cleared 23 violations in one day.
-
Should You Change Strategy While Losing? Writing the Review Process as Code
I wrote 'reassess if losses persist' as preset triggers and a fixed decision order; the first automatic trigger caught two bugs in the review code, and none of 13 risk-reduction variants passed the preset bar.
-
A Full-Site Redesign: AI Scores Make a Bad Gate, So Swap Tokens First and Rework Layouts Later
EZLO swapped dark rounded cards for a square-cornered, paper-and-ink blueprint style. AI review scores work only as a regression list; swapping token values first reskinned 90% of screens in one PR.
-
How Many Ways Can a Number Input Go Wrong? Clearing Saves 0, Typing e Wipes It
Clearing the reserve field on my lending settings page silently saved 0; this covers string drafts, checking upper and lower bounds differently, the e key in type=number, and per-keystroke input jsdom can't test.
-
Running Two LINE Accounts on One iPhone With LiveContainer: Three Free Apple ID Pitfalls
How I run a second LINE account on one iPhone with LiveContainer and SideStore, and how I got past running out of free App IDs, SideStore login failures, and Shortcut refresh errors.
-
Guarding main and PROD in a Repo I Maintain Alone
Branch protection alone couldn't hold up with several agents opening PRs and a release commit after every merge, so I fixed the required checks and added a PROD deploy preflight and a merge script.
-
Running a Code Review on an Entire Frontend: The Four Most Instructive Kinds Among 70-Plus Findings
I ran a Claude Code review of EZLO's whole frontend and confirmed 70-plus issues. Here are the four most instructive kinds, the rule that every test must fail on the unfixed build, and cross-browser results.
-
Illustrating Guide Articles: Image Models for Illustrations, HTML for Anything with Text
EZLO's 16 guides were text only. Covers now come from an image model plus a compositing script, figures with text are HTML screenshots, and every number on them is checked against public data.
-
The Admin Side of a One-Person SaaS: Trade-offs in Permissions, Broadcasts, and Notification Channels
Once my lending platform had users and billing, I built an admin console and multi-channel notifications; this covers permissions, kill switches, broadcast transaction boundaries, Telegram binding, and recipient rules for targeted broadcasts.
-
A Monthly Bitfinex Lending Rate Report: Public Data for the Numbers, a Scheduled PR for Review
The rate report is calculated only from Bitfinex's public candles, so anyone can reproduce it. A Claude Code cloud routine opens a PR every month, but nothing merges until a person reviews it.
-
From Performance Fees to a Flat Annual Fee: Design Decisions Behind Subscription Billing and Promotions
EZLO switched from performance fees to subscriptions. Plan limits shipped before billing, promo bonuses freeze onto the invoice, the 30-day notice only gates passive charges, and suspension never touches users' own lending toggles.
-
From a FastAPI Script to a Spring Boot SaaS: Rebuilding My Bitfinex Auto-Lending Platform
How an auto-lending side project went from a "good enough to run" single-person script to a multi-module platform with idempotency, reconciliation, circuit breaking, and full monitoring.
Nothing else in this category yet.