How Renegade Leverages Stylus For Their Onchain ZK Dark Pool
What is Renegade?
Renegade is a new type of decentralized exchange (DEX), an onchain dark pool, bringing better trade execution to decentralized finance (DeFi) markets.
In traditional finance, dark pools enable large institutional investors to trade assets with high privacy for minimal market impact. Renegade brings dark pools onchain through its decentralized crossing network, facilitating direct matching between buyers and sellers. Orders on Renegade are pegged to the real-time midpoint of the Binance bid-ask spread, ensuring optimal execution without the involvement of market makers.
The platform seeks to address critical issues in onchain trading, such as front-running, copy trading, and MEV, which have limited DeFi’s market penetration. By offering high-quality, private, and gas-efficient trade execution, Renegade is working to attract large institutional traders to decentralized venues, making it a key player in improving the DeFi ecosystem.
What is Stylus?
Stylus allows developers to write smart contracts in languages that compile to WASM—such as Rust, C, and C++—while remaining fully interoperable with the EVM. Introduced to Arbitrum main nets on September 3rd, the Stylus Rust SDK and CLI allow developers to start building today.
Case study
The Opportunity: Adding Privacy to DeFi
Despite a decade of decentralized exchange development, only 5-10% of crypto trading happens onchain, with most cryptocurrency holders choosing to remain on centralized exchanges. Although onchain trading offers transparency, security, and verifiability in a way centralized trading does not, it comes with its host of issues, including market inefficiencies, front-running, copy trading, and inferior liquidity compared to centralized exchanges.
The Solution: Stylus and Renegade’s Crossing Network
Renegade has been looking for an optimal environment for its onchain trading platform, previously experimenting on other blockchain ecosystems before finally landing on Arbitrum.
The challenge for the Renegade team primarily lay in finding a system that could handle the computational complexity of verifying zero-knowledge proofs without incurring prohibitive gas costs.
The team initially began building their product on the Solana blockchain, but soon realized that they needed to pivot and explore other options. They spent around 10 months working with Starkware, going through iterations of building out ZK verifiers, before finally turning to Stylus.
“Stylus is the only technology that made sense to build Renegade at the end of the day,” Chris Bender, the founder of Renegade, said. “It’s really hard to find a tool that could drive gas numbers as low as Stylus does.”
According to Renegade, choosing Stylus came down to three key factors:
- Gas Cost Savings: Renegade chose Stylus primarily due to its gas efficiency, which could achieve settlements for around 30 cents, Andrew Kirillov, founding engineer at Renegade, said. In comparison, similar computations on Ethereum Layer 1 would be two orders of magnitude higher. Stylus also outperformed other Layer 2 solutions based on benchmarks that Renegade tested for underlying operations. Stylus’ WASM-based pricing mechanism allowed for a significant reduction in gas costs, making it the most cost-effective choice.
- Seamless Development Experience: Stylus offered significant advantages in terms of development efficiency. Renegade's offchain infrastructure, written in Rust for cryptographic computations and zero-knowledge proofs, could be seamlessly reused onchain. This eliminated the need to re-implement the same cryptography in Solidity, saving significant development time and effort. Reusing the Rust code base also allowed for faster audits and more robust security since the offchain and onchain components shared the same secure code paths.
- Robust Ecosystem: Beyond the technical advantages, Renegade benefited from building on Arbitrum, which offers a robust ecosystem with significant market momentum and scalability. Arbitrum’s well-developed infrastructure and network effects provided the ideal environment for Renegade to scale its private, trustless exchange efficiently. “We love the fact that Arbitrum has already invested a lot in DeFi innovation, and we certainly love the fact that Arbitrum is an L2, and all assets on it can be bridged to L1 trustlessly,” Bender said.
By integrating Stylus, Renegade has developed a high-performance, gas-efficient crossing network that provides traders with superior execution quality, privacy, and verifiability.
Setting a New Standard for Onchain Liquidity
With Stylus at the core of its infrastructure, Renegade has set a new benchmark for DeFi execution quality. The dark pool’s ability to peg trades to the Binance midpoint without market maker intervention has made Renegade an attractive venue for high-volume traders. Stylus has played a crucial role in making this system scalable, gas-efficient, and aligned with the needs of both privacy-conscious and liquidity-seeking traders.
This collaboration has not only advanced Renegade’s mission to bring better execution to DeFi but also showcased the power of Stylus in enabling sophisticated financial applications onchain.
Source : Arbitrum, and the Ecosystem - Oct 23, 2024