This project involved forking and customizing the existing open-source codebase of Perpetual Futures DEX to serve as the first production version of DexToro. The goal was not to create a direct clone, but to establish a fully controlled codebase built on top of proven open-source primitives. That allowed us to iterate quickly while preparing to extend functionality beyond what original codebase offered at the time.
Main Components
Front-end: Trading application built on an open-source UI and integrated with Synthetix Perps V2 for perpetual futures execution. I adapted the codebase for our roadmap and customized the design.
Subgraph: Subgraph on Optimism used to query markets, positions, fills, funding rates, and historical stats, serving as the platform’s backend data layer.
Smart Wallet Engine: A set of smart contracts providing account abstraction and margin management on top of Synthetix Perps V2.
Utility Token: Token with staking and volume-based rewards distribution, directly tied to platform activity.
Built on top of Synthetix Protocol
Synthetix is the core on-chain protocol powering the platform’s perpetual futures trading. It provides decentralized liquidity and execution through its Perps V2 engine, which is widely used across the ecosystem for building non-custodial derivatives products. Instead of relying on order books or AMMs, Synthetix uses a pooled-liquidity model: trades are executed against the global debt pool backed by SNX stakers, allowing deep liquidity and low slippage without market makers.
The protocol exposes a clean set of smart contracts for opening, closing, and managing perpetual futures positions with configurable parameters such as funding rates, open interest caps, and market-specific risk settings. All price feeds are secured through Pyth Network oracles, ensuring consistent on-chain pricing for every market.
Synthetix has a mature and well-established ecosystem on Optimism, including traders, stakers, integrators, and interfaces like Kwenta, Polynomial, Lyra, Decentrex, and others. Its modular design enables external applications to integrate Perps V2 permissionlessly, using the protocol’s liquidity while building entirely custom UIs, token models, or margin systems—exactly the approach taken in this project.
In the context of this platform, Synthetix served as the execution layer:
all trades, fills, funding calculations, and market parameters were sourced directly from the Perps V2 contracts, while the surrounding components (front-end, subgraph, smart wallet engine, and token system) formed the product layer on top.