Search
 Coin Explorers
Search
 Coin Explorers

Portfolio

Markets

Project Reviews

Founder Stories

Features

Guides

News

Videos

Let’s stay in touch:

News

Choosing Paradex’s Relayer Model – Paradex – Medium

We started Paradex with a high-level goal: Design a trading platform that looks and feels as close as possible to the best centralized exchanges, but is non-custodial.

Nov 30, 2017 · 5 min read
  • Share on X
  • Share on Facebook
  • Share on Linkedin
Choosing Paradex’s Relayer Model – Paradex – Medium

Choosing Paradex’s Relayer Model An overview of our system design decisions We started Paradex with a high-level goal: Design a trading platform that looks and feels as close as possible to the best centralized exchanges, preserves the workflow and best-practices of traditional trading, but is non-custodial. At the core of an exchange, we believe these are the must-have features: High-performance matching engine with true limit orders and price/time priorityProtections against front-runningStrong settlement guarantees The two principal strategies for 0x relayers are the Open Orderbook Model and the Matching Model. The Open Orderbook Model is the more conceptually simple approach of the two. It involves accepting an order with an unassigned taker and then making that order available to anyone who chooses to sign and take it.With the Matching Model, the relayer rejects all orders where the taker is not an address controlled by the exchange. When the exchange sees two orders with matching parameters, it takes both of them simultaneously in a single atomic transaction. The effect is that party A trades with the relayer, who then immediately trades back out of that position with party B.The first and most important decision we had to make for Paradex was which of those two strategies to choose, and we did so by comparing them in light of our goals of preserving the best trading experience. Matching Engine This is an area we saw for clear and substantial improvements over the status quo in decentralized exchanges. In most cases, the user experience for a make is separate from a take — you can either sign a transaction that puts an order on the books, or you can sign an order that takes orders off the books. This runs contrary to traditional trading, where orders can result in both makes and takes: you eat orders up to your limit, then place the unfilled balance on the book as a make.Furthermore, we believe that interactions with your signer should be rare and measured; we never want to present you with a large list of transactions to sign to achieve your desired action. A limit order should require a single signing interaction from the user.The Matching Model gives us this flexibility and a user experience more inline with traditional trading mechanics. Since Paradex is responsible for finding overlaps in orders, we can match and fill orders as many times as we need, all while requiring only a single signature. Front-running Mitigation The transparency that blockchains bring is great, but that transparency brings its own set of tradeoffs and side-effects that can cause serious problems and friction in trading environments. One of the most problematic of those side effects is front-running. The basic idea is to listen to the pending transaction pool for trades that are waiting to be mined, and then react to it by cutting in line by paying slightly higher gas price to give your transaction the higher priority. Existing decentralized exchanges have been notoriously trivial to front-run; you can see it happening constantly on EtherDelta, where even bots compete to out-front-run one another.Relayers implementing the Open Orderbook Model are vulnerable to this class of attack. The Matching Model improves this situation, as it is impossible for an attacker to front-run a fill due to the relayer being the only party authorized to process the fill. Strong Settlement Guarantees Settlement failure most commonly happens when multiple parties try to take the same order at the same time, creating a race condition for who gets filled. Open Orderbook relayers can mitigate this by a small degree by listening to the pending transaction pool and removing orders that others are trying to fill. However, even with aggressive order pruning, those relayers will be unable to fully prevent order tickets you’re in the process of filling out from becoming invalidated by a pending fill elsewhere before you’re able to complete your workflow. The unfortunate nature of this problem is that settlement failures will likely increase as the relayer/liquidity pool grows in popularity.The Matching Model mitigates this by removing the primary race condition from order matching. It will never attempt to match an order it knows is already filled or pending settlement; the moment we’re able to match your order, we move it off the book.With that said, the Matching Model alone doesn’t guarantee settlement 100%. Good relayers will keep their order book in sync with what’s happening on chain, but there still may be race conditions—either accidental or malicious—involving last second account changes that cause settlement to fail. Tracking and limiting settlement failures will be one of our most important metrics, and we’ll be continually iterating and rolling out improvements, as well as working to help improve the underlying 0x protocol, as we work toward absolute settlement reliability. Challenges of the Matching Model The main way that Paradex achieves a tighter trading experience is by always being the taker, and as a result, Paradex can not by default participate in the shared global liquidity pool that many in the 0x community are enthusiastic about.One of the worst things that can happen to an exchange is for users to show up to empty shelves, and we take operating a liquid exchange very seriously. That said, we don’t have enough confidence that it’d be possible to deliver the trading experience that our users and partners require and expect while using a shared order book and the Open Orderbook Model. We plan to be aggressive about bootstrapping liquidity on Paradex through strategic partnerships and by enabling automated arbitrage between Paradex and other exchanges.We feel that one of the interesting features of 0x is that while the order books may not always be shared, the settlement still occurs at the exact same place. Given how low the barrier to entry to using a decentralized exchange is, coupled with the fact that relayers (including Paradex) will largely adhere to the standard relayer API, we expect prices and spreads to be tight across all exchanges.We appreciate the collaborative spirit of the 0x team and community. The flexibility and convenience this protocol affords has led to an amazing surge in relayers all bringing their own ideas and experiments to the table. We’re immensely proud of what we’ve built and we can’t wait to show you.


  • Share on X
  • Share on Facebook
  • Share on Linkedin

Related News

Bitcoin has officially entered the Guinness World Records for a number of entries, the first of which is being recognized as the First Decentralized Cryptocurrency
News

Bitcoin has officially entered the Guinness World Records for a number of entries, the first of which is being recognized as the First Decentralized Cryptocurrency

Bitcoin now has multiple entries in the Guinness Book of World Records, including most valuable and the first decentralized cryptocurrency.

Oct 19, 2022

740 Million in Bitcoin exits exchanges, the biggest outflow since June's BTC price crash
News

740 Million in Bitcoin exits exchanges, the biggest outflow since June's BTC price crash

The technical outlook, however, remains bearish for Bitcoin, with the price eyeing a run-down toward $14,000 in Q4/2022.

Oct 18, 2022

Bitcoin Wins the Guinness World Record for First Decentralized Cryptocurrency
News

Bitcoin Wins the Guinness World Record for First Decentralized Cryptocurrency

Bitcoin has been honored as the oldest and most valuable crypto, while El Salvador is recognized as the first country to adopt it as legal tender. 

Oct 18, 2022

 Coin Explorers

PortfolioMarketsProject ReviewsFounder StoriesFeaturesGuidesNewsVideosTerms & ConditionsPrivacy Policy

Powered by

 Coin Explorers

Copyright © 2025 - All Rights Reserved