Algorithmic complexity
Hunt O(n²) and redundant passes — filter().includes(), nested loops, sort-then-slice. Reach for Map/Set lookups, partial sorts, and single-pass reductions. Profiling the loop before optimizing it.
Senior Backend Engineer building production agentic AI systems and stablecoin payment infrastructure. At Avvio, a US neobank, I architected a 36-module NestJS backend spanning EVM, Solana, and Bitcoin with 7 fiat rails across 5 currencies — verified by 335 passing unit tests. Every service ships with server-side security invariants, idempotency keys at every execution boundary, and cron-driven reconciliation that converges state after failures. Before that: multi-agent LLM backends on Google ADK, MCP, and Vertex AI at a Singapore AI lab, and enterprise-scale RAG at Jio.
Two systems I run in production, simulated here: a distributed transaction saga with compensating rollback, and a self-healing reconciliation daemon. Run them and watch the state machines converge — this is the engineering behind every bullet point on this page.
Distributed-systems fundamentals first — agentic AI and stablecoin infrastructure on top. Every item below has run in production.
Patterns I audit my own code against before anything ships. Each one has caught a real bug in production — this is the difference between code that runs and code that survives.
Hunt O(n²) and redundant passes — filter().includes(), nested loops, sort-then-slice. Reach for Map/Set lookups, partial sorts, and single-pass reductions. Profiling the loop before optimizing it.
Kill sequential awaits that should be Promise.all / asyncio.gather. Bound parallelism with semaphores and pools. Replace sync I/O in async contexts. Backpressure every queue before it back-floods the producer.
Memoize expensive computations, TTL every cache entry, evict LRU. Multi-level read path: in-memory → Redis → DB. SWR on the client, Cache-Control + ETag on the wire. Never cache time- or session-scoped data.
Timeouts on every external call (AbortController / client timeouts). Exponential backoff + jitter on transient failures. Circuit breakers around every dependency. Empty catch is a bug; graceful degradation beats hard failure.
Eager-load to kill N+1, SELECT only the columns you need, index the columns you filter and join on. Bulk operations (bulkCreate, executemany) over per-row writes. Connection pools sized to concurrency, never per-request.
Structured JSON logs with a correlation ID propagated end-to-end. No console.log in hot paths. Pre-aggregated metrics in loops. Distributed traces on every request. The question is never "is it slow?" — it's "where, for whom, since when?"
Stablecoin payments infrastructure from scratch at a US neobank, agentic AI at a Singapore lab, and enterprise-scale ML at Jio. Same engineering standards at every scale.
AvvioPaymentLinkV2 Solidity contract on Base L2 — dual escrow flows (request & send links), keccak256-hashed claim secrets, CREATE2 deterministic deployment via Hardhat, with OpenZeppelin ReentrancyGuard, Pausable, and SafeERC20.@username transfer router that auto-selects the lowest-fee chain (EVM vs. Solana) for multi-chain USDC.The interview question every senior role asks — answered with production systems. Each tile follows the same arc: the problem, the constraint that made it hard, the design decision, and the outcome.
Problem: any deposit flow that accepts a destination address from the client is one compromised app away from redirecting user funds. Constraint: three chains, multiple on-ramp providers, one invariant. Decision: destination addresses are always resolved server-side from the internal Wallet table (Turnkey MPC sub-org accounts) — the client never supplies one. Outcome: the entire class of redirect-deposit attacks is structurally impossible, not merely validated against.
User → Wallet
Problem: a Solana paymaster signs user transactions — and any instruction referencing its key can debit it. Constraint: instruction blocklists always lag new attack vectors. Decision: a strict structural validator — the paymaster must sit at account index 0, address lookup tables are rejected (they hide accounts), and no instruction may reference the paymaster key at all. Outcome: every drain vector (SystemProgram.transfer, createAccount, SPL, CPI) is blocked by a three-rule invariant instead of an ever-growing blocklist.
Problem: on-ramp providers (Coinbase, MoonPay, Swapped) each fail differently — errors, unsupported countries, below-minimum amounts. Constraint: one flaky provider must never take down the deposit screen. Decision: parallel quote fetching with fail-open semantics — a failing provider is dropped, not fatal — cheapest-fee sort, USDC→USDT stablecoin fallback, and session tokens minted at commit time so they cannot expire mid-comparison. Outcome: users always see the best available quote, with a "minimum amount" floor instead of a dead end.
Problem: clients stop polling, pods restart, and cross-chain transfers get stranded mid-flight. Constraint: in-memory retry loops die with the process. Decision: durable, lease-based reconciliation queues driven by cron — deterministic idempotency keys, guarded state transitions (PENDING/EXECUTING-only writes), and chain-RPC finality checks. Fragmented balances consolidate across chains before high-value sends. Outcome: abandoned transfers converge to a terminal state with zero manual intervention — the exact pattern simulated in the terminal above.
I use Claude Code, Cursor, and Kimi Code as primary development interfaces — the workflow modern startups now hire for explicitly. The multiplier comes from the harness around the agent, not the agent alone: specs before prompts, review gates on every merge, and tests that verify the output.
Architecture, interfaces, and invariants are designed before any agent writes code. The agent implements against a written spec — module boundaries, DTO contracts, error semantics — so generated code lands inside a deliberate design, never instead of one.
Repo rules, custom MCP tools, and per-module documentation give agents the context to produce code that matches house conventions. The 36-module Avvio backend maintains agent-readable docs per module — the same docs that onboard human engineers.
Nothing merges on the agent's word. Every change passes human review, the full unit-test suite (335 green at Avvio), and lint/build gates in CI. Security-sensitive paths — paymaster validation, PSBT output guards, webhook verification — get line-by-line manual review.
Cursor for IDE-native refactors and navigation-heavy edits; Claude Code for multi-file backend migrations and long-horizon tasks; Kimi Code for high-volume implementation against tight specs. Knowing when not to use an agent is part of the skill.
The result is throughput without debt: a 36-module payments backend across 3 chains and 7 fiat rails, shipped by a small founding team on startup timelines — with the test coverage and security invariants of a much larger organization.
I build agentic systems (MCP servers, multi-agent orchestration, eval harnesses) and I build with agentic tools daily. Each side sharpens the other — production agent reliability patterns come directly from operating these tools under real constraints.
Available for technical evaluation, founding roles, and architecture reviews. Email is fastest; LinkedIn for the long-form context.
Open to architecting and shipping one production-grade service, smart contract, or AI agent integration as a no-obligation technical evaluation (1–2 weeks) before any formal commitment. Pick a real feature from your backlog — I will deliver it with production-grade system design, tests, and documentation, so you can judge execution speed and code quality directly.