
Tanx DEX: Engineering High-Throughput Trading with Starknet ZK-Rollups
Built a hyper-efficient decentralized exchange achieving 10,000+ TPS and 95% gas fee reduction via ZK-Rollup technology.
THWORKS architected and launched Tanx DEX, a high-performance decentralized exchange leveraging Starknet’s ZK-Rollup technology to solve the Ethereum scalability trilemma. By offloading execution to Layer-2 and utilizing validity proofs, the platform delivers CEX-like speed with the trustless security of DeFi, featuring optimized smart contracts and seamless cross-chain swap integrations.
The Challenge
Retail traders were being priced out of decentralized finance due to Ethereum's volatile Layer-1 gas fees, which often exceeded the value of small trades. Furthermore, existing DEXs suffered from 'latency slippage,' where slow block times led to unfavorable trade execution prices. Tanx needed a solution that combined near-instant finality with sub-penny transaction costs without compromising on self-custody.
In the 2026 DeFi landscape, liquidity is fragmented across multiple chains. For Tanx to succeed as a primary trading hub, it required not only local scalability on Starknet but also a robust cross-chain bridge architecture to pull liquidity from Ethereum, Arbitrum, and Polygon seamlessly.
Our Solution
We implemented a modular architecture utilizing Cairo-based smart contracts on Starknet. This design uses ZK-STARKs (Zero-Knowledge Scalable Transparent Arguments of Knowledge) to batch thousands of transactions into a single validity proof that is settled on Ethereum Mainnet.
Our team focused on 'Gas-Optimized Logic Flow.' By rewriting standard AMM (Automated Market Maker) algorithms specifically for the Cairo VM, we minimized the computational 'steps' required for a swap, which directly translated to lower costs for the end-user. We also integrated high-performance Cross-Chain Swap APIs to enable one-click asset migration.
Key Technical Decisions
Recursive Proof Aggregation: Implemented recursive ZK-proving to further lower the cost of L1 settlement per transaction as volume scales.
Account Abstraction (native to Starknet): Enabled 'Paymaster' features where users can pay gas fees in the token they are swapping (e.g., USDT) rather than requiring ETH.
Custom Oracle Integration: Built a low-latency price feed connector to prevent front-running and MEV (Maximal Extractable Value) exploitation.
Results
Before
Users paying $15-$50 in gas for a single swap on Ethereum L1 with wait times of up to 5 minutes for confirmation.
After
Users swapping assets for less than $0.05 with sub-2-second confirmation times, enjoying a seamless CEX-style experience.
Technology Stack
"THWORKS delivered a trading engine that feels impossible. We are seeing transaction speeds that rival centralized exchanges, but our users never lose control of their keys. Their expertise in ZK-Rollups is second to none."
Frequently Asked Questions
Common questions about this project and our approach.
Tanx uses ZK-Rollups to bundle thousands of trades into a single proof. The cost of verifying that proof on the Ethereum Mainnet is shared across all those thousands of trades, bringing the individual cost down to pennies.
Scale Your Web3 Project
Let's discuss how we can engineer the same level of technical excellence for your project.
Scale Your Web3 Project