How IDEX works — One-off state hop with on-chain settlement

Alex Wearn
Oct 9, 2017 · 3 min read

Blockchains have introduced an unparalleled level of security for digital asset transfers, but the inherent latency makes them unsuitable for high-performance exchanges. Proposed enhancements, such as state channels, will help address the issues of low transaction speed and throughput. Participants send cryptographically signed authorizations back and forth, updating the state of who owns what off-chain, and eventually settle the channel with one transaction that is written into the blockchain. This design allows for real-time transactions and higher throughput, however these improvements come with a loss of security as waiting to write the final state on-chain opens up the participants to attack vectors.

What if you could have both the speed of state channels and the security of blockchain settlement? IDEX provides this by carefully coordinating communication between two separate databases creating a process we call the state hop.

  1. The IDEX infrastructure handles the off-chain messaging and state updates. Users can trade instantly and indefinitely while behind the scenes their authorized transactions are prepared for dispatch to the Ethereum network.
  2. The Ethereum network processes the transactions as they are received, ensuring the state of the IDEX smart contract reflects all trades that occurred in the IDEX database

Depositing on IDEX opens a new channel hub. Each trade is equivalent to making one transaction and then immediately closing it. IDEX verifies the transaction’s authenticity and updates the off-chain state while the authorized transaction is prepared for dispatch to the Ethereum network for final judgement and processing by the IDEX contract. Traders can make as many trades as they want off-chain but cannot close the channel hub (withdraw their funds) until the Ethereum state is finalized (all pending trades have mined). This design enables real-time trading while preserving all of the transparency and security of blockchain settlement.

Image for post
Image for post
Image for post
Image for post

The UX improvement is dramatic and gives traders the following benefits:

  1. Buy and sell continuously without waiting for previous trades to mine
  2. Fill many orders at once, allowing for true market orders
  3. Be protected from front-running thanks to trade ordering in the transaction queue
  4. Never waste gas on a matched order, eliminating the need to overpay on Ethereum network fees

The IDEX architecture scales indefinitely and continues to function even if the transaction volume temporarily exceeds the processing capabilities of the Ethereum network, allowing for the transaction queue to clear when network activity dies down. This architecture will add value even on a POS-sharded network where syncing communication between shards introduces additional latency. When ethereum scales, IDEX will bring the best part of state channels, the transaction speed, and the full security of writing all events into the public network.

IDEX is currently live on the mainnet with support for over 200 tokens: start trading immediately! Stay tuned and join the discussion on Telegram, sign-up for our newsletter, visit us on Bitcointalk, or follow us on Twitter to learn more about Aurora IDEX and our IDEX market making rewards program.

Thanks to Phil Wearn and Ray Pulver for reviewing drafts of this post.


Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store