# Every layer costs money. Add it only when it is needed

A greenfield team at Wallet in Telegram started in two weeks on plain guidelines and architecture tests, and the product grew to 30M+ monthly active users. The architecture choices, and what growth asked of the parts I owned.

By Arslan Rakhmatullin, Nov 9, 2026. https://arslanr.com/posts/simple-until-it-has-to-grow/

The finding: A greenfield team running in 2 weeks; the product grew past 30M monthly active users.

In 2021 I joined Wallet in Telegram early, as one senior engineer among about 30, without formal authority. The rules I wrote got a greenfield team running in two weeks; the product shipped in six months and grew past 30M monthly active users. It was a wallet inside Telegram with complex business rules: custody, KYC tiers, limits per tier, sanctions screening. I argued for keeping the architecture simple and adding a layer only when a real need showed up. Every layer costs money to build, run and understand.

## Rules the build checks

I wrote the guidelines, the project structure and a set of architecture tests that check the boundaries on every build. Kotlin added compile-time type safety. That is what let the team start in two weeks.

Domain-driven design, event-driven services and CQRS came in too, in stages, with explicit service boundaries.

## P2P and anti-fraud at up to 3,000 requests a second

That growth was the work of many people. What I can speak to is what growth asked of the parts I owned or worked on, P2P transfers and anti-fraud, on services handling 10–30M Kafka events a day and 1,000–3,000 requests a second at peak.

Caching went where reads were hot: profiles and balances cache-aside, price feeds with short lifetimes, anti-fraud counters and temporary block lists in Redis. When a viral launch on the platform brought ten times the usual traffic, the bottlenecks were in user management, and that is where the work went.

Anti-fraud, built with the compliance team, is a rule engine and a store of facts about users and transactions, with one way to plug in a new rule or a new source of facts. Most of the rules I wrote myself.

## What to copy

- **Make the rules executable.** Architecture tests check the constraints on every build.
- **Add a pattern when the domain asks for it.** Explicit boundaries, and the heavier patterns in stages.
- **Let traffic pick the next layer.** Cache what is read, scale what is hot, and leave the rest plain.
