Skip to content

Case study · Wow Internet Labz, July 2025 to November 2026

Decentralized exchange

Keeping a decentralized exchange's blockchain alive, upgraded and secure, from the orderbook up to the node.

Tejas Gaware5 min readJuly 2025 to November 2026
The exchange's trading screen, with a price chart, the live orderbook, other markets, open orders and the buy and sell forms
The trading screen, redrawn: chart, orderbook and order forms, with every trade settling on the chain.

At a glance

  • 1,000

    errors worked through in the node upgrade

  • 68

    commits to the exchange's node

  • 8

    pull requests

My commits to the exchange's node, per month68 total
  1. 5Sep
  2. 17Oct
  3. Nov
  4. Dec
  5. 2Jan
  6. 10Feb
  7. Mar
  8. 15Apr
  9. 3May
  10. 4Jun
  11. 1Jul
  12. 10Aug
  13. 1Sep

20252026

  • Rust
  • Substrate
  • Hyperbridge
  • ISMP
  • Try runtime
  • GraphQL
  • PostgreSQL
  • TimescaleDB
  • AWS
  • GitHub Actions

This is a decentralized exchange built as its own blockchain on Substrate. It promises the speed of a centralized exchange with a real orderbook, while users keep custody of their own keys. I worked on it at Wow Internet Labz from July 2025 to November 2026, on the blockchain node itself and on the orderbook that runs on top of it.

This is that story, told in order from the first day.

July to August 2025

A thousand errors

The node was running on old versions of Substrate and its dependencies, and it needed a major upgrade before anything else could happen. Upgrading a blockchain node isn’t a version bump: every API that changed between releases breaks somewhere in the code. When I started on it in July, the upgraded node produced around 1,000 errors. I worked through them one by one until the whole thing built again.

September 2025

Producing blocks again

On 8 September the upgraded node went into a fresh repository as my first commit (about 102,000 lines). From there I refactored the service and chain specification modules, upgraded the dependencies at the root and node level, cleared out warnings and bumped the spec version to match the new configuration.

That work landed as my first pull request, “Node producing blocks with custom specification” (#1), merged on 18 September: the upgraded node was producing blocks again.

October 2025

Making upgrades safe

A blockchain can’t be redeployed like a web app. Every change ships as a runtime upgrade to a live network, so you need to test it against real chain state first. That’s what Substrate’s try runtime tool is for, and it was broken. I fixed it (#2, merged 13 October), which gave the team a way to dry run every future migration.

The rest of the month went into stability. I added memory tracking to the RPC server (jsonrpsee), the liquidity mining, snapshot and trading pair pallets to find where memory was going, and sorted out dependency conflicts in rust_decimal and the SCALE codec (#4, merged 30 October).

January to February 2026

Wiring in Hyperbridge

Moving assets between blockchains is where a lot of exchanges get hacked, usually because a bridge trusts a small group of relayers or a multisig to say “yes, this deposit really happened”. Hyperbridge takes a different approach: it’s infrastructure for connecting blockchains that verifies messages between them with cryptographic proofs, using the ISMP protocol, so nobody has to be trusted in the middle.

The exchange planned to run its deposits and withdrawals through it, and I configured the runtime to talk to Hyperbridge: the ISMP settings, the host state machine and coprocessor, the aggregator URL and the network’s SS58 address prefix.

The Hyperbridge homepage: Interoperability done right, with chain logos connected through the Hyperbridge core
Hyperbridge: infrastructure for connecting blockchains, built on cryptographic proofs rather than trusted relayers.

Alongside that I reorganized the runtime’s pallets, fixed how quote prices were calculated for the native token, and temporarily switched off two pallets that clashed over a 256 bit integer type. It all merged as #5 on 20 February.

April 2026

The big migration

April was my busiest month (15 commits), and most of it was one change: asset IDs had to grow from 32 bit to 128 bit integers. That touches storage everywhere, so I wrote the migrations to move existing data safely, including the token gateway’s local assets and storage keys, then fixed the mock runtimes and integration tests that broke along the way.

I also removed the parachain (Cumulus) crates the mainnet node no longer needed, fixed benchmarking and regenerated the pallet weights, cleaned up every compiler warning, and in May enabled RocksDB support and fixed a snapshot bug in the validator.

June to July 2026

Hyper fungible tokens

The exchange replaced its token gateway with a new hyper fungible token (HFT) pallet. I integrated it and removed the token gateway it replaced, along with the Hyperbridge pallets (#6, merged 4 June), then wrote a migration to clear out stale ISMP requests. In July I fixed the HFT pallet’s decimal conversion, so token amounts scale correctly in both directions between Ethereum’s ERC20 token format and the exchange’s own.

August 2026

The security audit

The chain went through a security audit, and I worked through the fixes across the runtime, the orderbook settlement pallet and the bridge pallet: critical issues first, then high severity ones. I kept a running fix log so the team could track what was done and what remained open.

To make the upcoming mainnet upgrade safer, I also disconnected the pallets that were no longer in use and prepared a new runtime version for it.

September 2026

Clearing the way to mainnet

Before a runtime upgrade goes live on mainnet, it has to be right the first time. In #14 I fixed six findings that would have blocked or endangered that upgrade, guarded older migrations so they can’t run again and do damage on future upgrades, and tightened permissions, with unit tests for the checks the try runtime tool can’t exercise.

In #15 I made the node easier to run: .deb and .rpm packages that install it as a proper system service, and a release pipeline where pushing a version tag builds the binary and both packages, publishes checksums and opens a draft release for a human to approve. Every GitHub Action is pinned to an exact commit, with the least privilege it needs.

Alongside the node

The orderbook

The orderbook is the part traders actually feel: it matches buy and sell orders at exchange speed and settles them on the chain. It isn’t one program but several services working together, and none of it came with documentation. I worked out how the pieces fit by reading the code, and got the whole system running again end to end. Along the way I replaced the Amazon Timestream package in its Rust code with a TimescaleDB one, moving its time series storage onto TimescaleDB.

Explore

Have a project or a role in mind?

I'm open to full time, contract and part time work. Let's talk.

© 2026 Tejas Vijay Gaware