01 — Professional project · Injective Labs
Helix DEX
Decentralized trading: spot and perpetual markets, trading bots, liquidity rewards and portfolio management.
- Vue
- NuxtServer-rendered Vue applications and modular layers.
- Web3
Overview
Helix is a decentralized exchange built on Injective, offering spot and perpetual markets, trading bots, liquidity rewards and portfolio management. It looks like a professional trading terminal, but every order, position and balance ultimately lives on-chain.
The problem
A trading interface is unforgiving. Prices, order books and positions change many times per second, users act on what they see, and a stale number is worse than no number. On a decentralized exchange that pressure is compounded: data arrives from indexers and streams rather than a single trusted backend, transactions must be signed by the user's wallet, and confirmations are asynchronous.
The interface has to stay fast and correct while juggling real-time streams, wallet state and many market types at once.
Engineering challenges
- Real-time correctness. Order books, trades and positions stream continuously. Connections drop, tabs sleep and messages can arrive out of order — the UI has to detect and recover from all of it without the user noticing.
- Many market shapes. Spot, perpetuals and derived products share most of the UI but differ in margin, funding and settlement logic.
- Wallet-driven flows. Every action is a signed transaction with its own lifecycle: preparing, awaiting signature, broadcasting, confirming, failing.
- Performance under load. High-frequency updates must not re-render the whole terminal.
Architecture
- Interface
- Trading terminalVue · Nuxt
- Portfolio
- Bots & rewards
- State
- Market storesnormalized, per market
- Account storesbalances · positions
- Services
- Stream managerreconnect · gap recovery
- Indexer clientqueries
- Wallet layersign · broadcast
- Network
- Injective indexer
- Injective chain
The interface never talks to the network directly. Framework-agnostic services own connections and protocols; stores hold normalized, per-market state; components subscribe to the slices they render.
Key decisions
Streams are a service, not a component concern
Streaming lives in a dedicated manager with explicit connection states, inactivity detection, exponential backoff and sequence-gap recovery. Components subscribe to data, never to sockets. This is the idea explored in StreamManager V2 and the Stream Recovery Playground.
Normalize by market
Market data is stored per market and per concern (book, trades, ticker), so a burst of trades in one market doesn't invalidate the rest of the terminal.
Model transaction lifecycles explicitly
Signing and broadcasting are long, failure-prone flows. Treating them as explicit states — rather than a tangle of booleans — keeps error handling and retry behavior predictable.
Patterns
- Service layer behind framework-specific stores
- Observer / subscription model for real-time data
- Explicit state modeling for transaction lifecycles
- Normalized state keyed by market
My contribution
As a frontend engineer at Injective Labs I worked on the trading interface and the shared infrastructure underneath it — real-time data handling, wallet-driven transaction flows and the TypeScript packages that the exchange and other ecosystem products share.