It’s obvious (or it should be) that decentralization has many benefits, but we believe in using an off-chain approach where necessary to improve the user experience without compromising on security. To achieve our goal of providing the best and most secure trading experience, we’ve transformed our architecture, utilizing the Trade Execution Coordinator pattern.

What does a trade execution coordinator do?

The term ‘Trade Execution Coordinator’ (TEC for short) was first coined by Will Warren in the blog series “Front-running, Griefing and the Perils of Virtual Settlement”. Briefly, a TEC is any mechanism that controls the flow of orders in a decentralized trading system. By “bottlenecking” the flow of trades, some trusted party can make decisions about what trades are valid and which ones are not. We’ve implemented a server-side version of this architecture.

In short, when a trader wants to fill one or more orders, they send a signed request to our server. If the trade is approved, our server executes the trade on the trader’s behalf. From a trader’s perspective, the trader is still signing the same fill order data — the big difference is that they’re delegating the broadcasting of the transaction to ERC dEX. This is the mechanism that allows us to ensure orderly execution of trades as they come in.

Let’s discuss the main benefits to traders…

Better maintained order books

We now have a bullet-proof solution to the perennial “stale orderbook”. Our new execution engine allows us to track order changes with a high degree of accuracy. The old way of primarily monitoring the blockchain for changes was a somewhat error prone exercise.

Improved fee structure

We no longer charge maker fees. Taker fees will remain the same: 20 bps, or 0.2% of the taker volume. Secondly, the taker fees will be collected in the quote currency only. We currently offer WETH or DAI as quote currencies.

As always, fees will be collected upon execution of the trade.

No front running and no order collisions

Since orders are passed through our servers before being filled, we can place them in a queue and process trades on a first come, first serve basis. The old method required that transaction that settled on the blockchain first won the order. Traders could adjust the gas price to outpace the settlement of a pending order. Order collisions are also no longer possible due to this server-side queueing system.

Free order cancellations

Orders no longer need to be canceled on-chain. In order for any order open on ERC dEX to be filled, it must be approved by ERC dEX. As a result, cancellations can be done completely off-chain, enabling free and instant removal of orders.

This is especially beneficial for market making strategies that require frequent cancel and replace actions.

Gas payments for trading are abstracted

Instead of requiring gas to be paid directly by our traders, we will pay it ourselves and incorporate it into the fees as a “network fee”. We estimate the optimum gas needed to settle the transaction in a timely manner based on network traffic. This should provide a more consistent trading experience and will mean traders will not need to keep unwrapped ETH in their wallet for trading, as fees are paid out in the quote currency.

Unfortunately, we have not been able to abstract the wrapping of ETH. In order to trade on our platform, traders will still be required to wrap ETH — converting it to WETH — if they want to trade in WETH-quoted markets. This will require traders to pay gas (in ETH) for the transaction on the blockchain.

Authorizing tokens for trading also requires gas payment in ETH.