
Published
2026-02-01
Author
Mach5 Engineering
Share
From go-ethereum Fork to Production L1: Building NEXTSmartChain

Building a custom blockchain sounds ambitious until you realize it's mostly infrastructure engineering. NEXTSmartChain is our production L1 — a custom EVM-compatible blockchain with DAG-based consensus, a custom block explorer, and GraphQL indexing. Here's how we built it.
Why Build a Custom Chain?
Generic L1s and L2s serve generic use cases. But when you need:
- Custom consensus parameters tuned for your transaction profile
- Specialized smart contract precompiles for domain-specific operations
- Full control over upgrade schedules without governance politics
- Private or permissioned features on an otherwise public chain
…then a custom chain makes sense. For NEXT.exchange's tokenized equity infrastructure, we needed all four.
Starting Point: go-ethereum
We didn't write a blockchain from scratch. We forked go-ethereum (Geth), which gave us:
- Battle-tested EVM execution
- Solidity compatibility
- JSON-RPC API
- Peer-to-peer networking
But Geth's default Proof-of-Stake consensus didn't fit our throughput requirements. So we replaced it.
DAG-Based Lachesis Consensus
We integrated the Lachesis consensus algorithm, which uses a Directed Acyclic Graph (DAG) instead of a linear chain. The advantages:
Asynchronous Block Production
In traditional blockchains, validators take turns producing blocks. In Lachesis, validators produce "events" independently and asynchronously. These events are woven into a DAG, and consensus is reached through a virtual voting mechanism.
Higher Throughput
Because block production is asynchronous, the network doesn't wait for a single proposer. Multiple validators produce events simultaneously, resulting in higher effective throughput.
Finality
Lachesis achieves near-instant finality. Once an event is confirmed by 2/3+ of validators through the DAG, it's final. No waiting for 32 blocks.
The Block Explorer: A PWA
Every blockchain needs a block explorer. We built ours as a Progressive Web App (PWA) for several reasons:
- Offline capability: Validators in remote locations can cache recent blocks
- Mobile-first: The explorer works identically on desktop and mobile
- Installable: Operators can install it as a native-feeling app
- Real-time updates: WebSocket subscriptions for new blocks and transactions
GraphQL Indexing API
The standard JSON-RPC API is sufficient for simple queries, but for complex data needs (transaction history, token transfers, account analytics), you need an indexer. We built a GraphQL API that:
- Indexes all transactions, events, and state changes in real-time
- Supports complex queries with filtering, pagination, and aggregation
- Provides subscription support for real-time data feeds
- Handles historical data queries efficiently
Smart Contract Infrastructure
With EVM compatibility, we could deploy standard Solidity contracts:
- ERC-20 token contracts for the native token and utility tokens
- ERC-3643 security tokens for regulatory-compliant tokenized equity
- Governance contracts for on-chain voting and parameter changes
- Bridge contracts for cross-chain asset transfers
Lessons Learned
1. Consensus Is the Easy Part
Integrating Lachesis took about 3 weeks. Building the surrounding infrastructure — explorer, indexer, deployment tools, monitoring — took 3 months.
2. DevOps Is Blockchain Engineering
A blockchain is only as reliable as its deployment infrastructure. We invested heavily in:
- Ansible playbooks for validator deployment
- Prometheus + Grafana for chain monitoring
- Automated alerting for consensus failures and network partitions
3. Documentation Is a Product
An undocumented blockchain is an unusable blockchain. We created comprehensive docs for:
- Validator setup and operation
- Smart contract deployment
- API reference (both JSON-RPC and GraphQL)
- Network parameters and configuration
The Result
NEXTSmartChain has been operational in production, processing transactions and hosting tokenized assets. It's the foundation layer for NEXT.exchange's SME token marketplace.
Need custom blockchain infrastructure? Let's build it.