KM

Koustav Manna

webdev·blockchain·ai/ml
off
on

Thread 03 — Others

Systems, markets
& chains.

The rest of the stack I care about — scalable system design, low-latency trading systems, and Ethereum smart contracts. The hard, performance-critical corners.

System DesignHFTBlockchainDistributedLow-Latency
Focus
System Design
Trading
Low-Latency / HFT
Chain
Ethereum / EVM
Langs
C++ · Solidity

Three threads

System Design

Designing systems that scale — partitioning, caching, and the consistency trade-offs behind them.

  • Horizontal scaling & sharding
  • Caching + CDN strategy
  • Message queues (Kafka)
  • CAP & consistency trade-offs

HFT / Low-Latency

Trading systems where microseconds matter — from the order book down to cache lines.

  • Limit order book & matching
  • Lock-free data structures
  • Market-data ingestion
  • Backtesting & risk checks

Blockchain

Smart contracts and DeFi protocols on Ethereum and EVM-compatible chains.

  • Gas-optimized Solidity
  • Reentrancy-safe patterns
  • DeFi (AMMs, vaults)
  • Foundry fuzz testing

Toolkit

System Design
Distributed SystemsCachingKafkaRedisLoad BalancingSharding
HFT / Latency
C++Order BooksBacktestingMarket DataWebSocketsLock-Free
Blockchain
SolidityFoundryEthereumDeFiWeb3OpenZeppelin
Infra
DockerPostgresgRPCLinuxPrometheus

Smart contracts

Gas-optimized Solidity.

SimpleStaking.sol
Solidity
1// SPDX-License-Identifier: MIT
2pragma solidity ^0.8.20;
3 
4import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
5import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
6import "@openzeppelin/contracts/access/Ownable.sol";
7 
8/// @title SimpleStaking - stake tokens, earn rewards
9contract SimpleStaking is ReentrancyGuard, Ownable {
10 IERC20 public immutable stakingToken;
11 uint256 public rewardRate = 100; // per block
12 
13 mapping(address => uint256) public stakedBalance;
14 mapping(address => uint256) public lastClaimBlock;
15 
16 event Staked(address indexed user, uint256 amount);
17 
18 constructor(address _token) Ownable(msg.sender) {
19 stakingToken = IERC20(_token);
20 }
21 
22 function stake(uint256 amount) external nonReentrant {
23 require(amount > 0, "Amount must be > 0");
24 _claimRewards();
25 stakingToken.transferFrom(msg.sender, address(this), amount);
26 stakedBalance[msg.sender] += amount;
27 emit Staked(msg.sender, amount);
28 }
29 
30 function pendingRewards(address user) public view returns (uint256) {
31 uint256 blocks = block.number - lastClaimBlock[user];
32 return (stakedBalance[user] * rewardRate * blocks) / 1e18;
33 }
34}

Selected work

4 projects
01★ featured

Low-Latency Order Book

A limit-order-book matching engine in C++ with lock-free queues and nanosecond-scale microbenchmarks.

C++Lock-FreeOrder BookBenchmarks
02

Distributed Rate Limiter

Sharded token-bucket rate limiter on Redis with sliding windows and graceful degradation under load.

RedisSystem DesignGoSharding
03

Market Data Pipeline

Real-time market-data ingestion over WebSockets with normalization and a replayable event log.

WebSocketsKafkaPythonTime-Series
04

DeFi Yield Aggregator

Gas-optimized yield router that rebalances across Aave and Compound to maximize depositor APY.

SolidityFoundryAaveEthers.js

Focus

Distributed Systems

Sharding, replication, consensus, CAP trade-offs.

Low-Latency

Lock-free structures, cache-aware code, kernel bypass.

Smart Contracts

Gas-optimized, reentrancy-safe Solidity with fuzz tests.

Observability

Metrics, tracing, and SLOs with Prometheus + Grafana.