helical_engine_web3
PATENT PENDING > Application No: 63/952,240 (USPTO)
Filing Date: December 31, 2025
Inventor: Deepak T. Mohan
The Helical Protocol is a Layer 0 validation primitive designed to eliminate Computational Denial of Service (cDoS) attacks on decentralized ledgers.
Unlike the Ethereum Virtual Machine (EVM), which uses a "Reactive Security" model (Execute-then-Bill), Helical employs Stateless Structural Validation. It utilizes a specialized Executive Control Module (ECM) to perform static analysis on the Abstract Syntax Tree (AST) of a transaction before memory is allocated.
- Executive Control Module (ECM): Validates code topology ($O(N)$) instead of execution steps ($O(K)$).
-
Efficiency Sequencer: A "Knapsack Optimization" engine that orders transactions by Efficiency Density (
$Fee / Complexity$ ) rather than raw gas price. - Speculative JIT: A pipeline that Just-In-Time compiles verified transactions during mempool residency, utilizing idle CPU cycles to maximize throughput.
Standard blockchains suffer from the "Halting Problem Gap." Validators must expend resources to determine if a transaction is malicious. A wealthy attacker can flood the network with infinite loops, forcing nodes to waste electricity processing junk.
Helical shifts the paradigm:
- Input: Smart Contract Bytecode + Complexity Stake.
-
Process: 1. Parse AST to calculate Cyclomatic Complexity (
$\chi$ ) and Recursion Depth ($\delta$ ). 2. VerifyStake >= Cost(Structure). 3. If Valid: JIT Compile & Queue. 4. If Invalid: Atomic Rejection (Zero Net Loss).
This repository contains a Python reference implementation of the core logic claimed in the patent.
- Python 3.8+
The helical_demo.py script simulates a mempool under attack by a "Rich Hacker" (High Fee, Bad Code) vs. a "Smart Optimizer" (Low Fee, Good Code).
# Clone the repository
git clone [https://github.com/your-username/helical-protocol.git](https://github.com/your-username/helical-engine-web3.git)
# Navigate to directory
cd helical-engine-web3
# Run the demo
python helical_demo.py