DepChain — Permissioned Blockchain

Java
Solidity
docker
Docker

A highly-dependable permissioned blockchain implementing Basic HotStuff BFT consensus over UDP, EVM smart-contract execution, and an ERC-20 token with frontrunning-resistant approvals.

DepChain is an end-to-end permissioned blockchain system I built for the Highly Dependable Systems course at IST. The system tolerates f = ⌊(n-1)/3⌋ Byzantine replicas while still settling transactions and executing arbitrary smart contracts.

What I built

Consensus layer (Basic HotStuff over UDP)

I implemented the Basic HotStuff Byzantine Fault Tolerance algorithm from scratch on top of unreliable networks:

Transaction processing engine

On top of consensus I built a full transaction engine:

IST Coin (frontrunning-resistant ERC-20)

I designed and shipped an ERC-20 token whose approve() function is redesigned to prevent the classic Approval Frontrunning attack — a known problem with naive ERC-20 implementations where an attacker can front-run a balance change to an allowance.

Test surface

The project ships with 45 JUnit 5 tests covering:

Why it matters

Building DepChain meant doing distributed-systems engineering across the whole stack: cryptography, networking, consensus, virtual-machine integration, and adversarial testing. The result is a system that’s not just “it compiles” but actually demonstrably tolerant to crashes and Byzantine peers under fault injection.