Advantages of the Ethex on-chain order book

Dan Walton
Ethex
Published in
4 min readJul 6, 2018

EtherDelta has been a big inspiration for DApps and decentralized trading. Just a few days ago, EtherDelta crossed 10 million transactions on their smart contract. This is a great demonstration of the Ethereum network. Trading on this contract makes up almost 4% of the transactions on Ethereum mainnet. It’s one of the most active contracts in the Ethereum network.

Congratulations EtherDelta!

EtherDelta has shown that distributed trading is a killer app for blockchains. Not only do blockchains allow us to verifiably send funds, but now you can swap funds in a trustless way. It’s practical and popular use case.

Like many other projects, Ethex has been inspired by this new and proven application of blockchains. The source to EtherDelta’s contract and activity can be seen here.

When creating Ethex, our goal was to improve upon distributed trading. We made the decision to publish our order book on the blockchain. This means that when someone makes an offer to buy or sell, that offer must be announced on the blockchain for all to see.

Buyers and sellers using Ethex

EtherDelta and other decentralized systems use a deposit, off chain offer, withdraw workflow to enable trading. Ethex uses a direct make order, take order workflow. This gives us the following advantages.

On-chain order books do not require relayer or server

If you download the Ethex software you can use it to trade, provided you can access any Ethereum node, including your own! We provide an optimized Ethereum node, however it isn’t required for you to use Ethex. Off-chain systems require relayer servers which take some effort to run and represent a point of failure in the system.

Direct, wallet to wallet trading. No servers required.

On-chain order books are more difficult to manipulate

When offers are off-chain, traders can deposit funds and make it look like tokens are traded at any price they like. Because Ethex uses on-chain offers, orders are always published to every Etherem node. You can’t make exclusive or private deals.

On-chain order books are fast, efficent and easy to use.

Because you do not need to deposit your funds before you can trade, you can buy tokens with a single transaction directly to your wallet. This means less waiting and paying for the blockchain gas. To buy a token on an off-chain trading system, you have to pay and wait three times. To buy a token on-chain, it’s a single transaction. It’s a myth that on-chain order books are expensive. You just have to have the right protocol. Selling tokens is as efficient as you can get. Provided you have allowed them, selling tokens at Ethex is also one transaction.

To emphasize this point, consider this recent trade on Ethex. Someone bought $484 worth ZRX and spent 4 gwei or 11 cents on a single transaction. Other decentralized exchanges make you do 3 transactions, thats more waiting and more gas. Gas prices on most trades are going to be less than exchange fees. A typical 0.3% fee on a $484 trade is $1.45. The gas on a transaction on the Ethex contract is going to be much lower than that.

On-chain order books have less frivolous offers and cannot spoof offers

Because making an offer requires paying gas traders won’t make tons of pointless offers. With off-chain systems, these offers can jam up trading software and cause issues. Likewise you cannot make offers without committing funds.

On-chain order books can prevent front running.

Front running occurs when someone on the trading platform knows you are going to trade before anyone else, and takes advantage of it. By publishing to the blockchain, every trader has an equal opportunity to take an offer. Only miners through major effort could front run, or gain an advantage in a trade.

Global trade improved using blockchains

Decentralized trading has massive improvements to centralized trading. For the first time in history, two traders can swap assets algorithmically and confidently. Protocols like 0x and EtherDelta are great implementations of this idea and are welcome solutions to many of the centralized trading problems. However, Ethex has a fully on-chain approach that has some real advantages that put the blockchain to use.

--

--