Hourglass: Under the Hood

A deeper dive.

Minute Markets: A New Primitive

For decades now, traditional finance has been dominated by RFQ and order-book based marketplaces. These offer a multitude of benefits over DeFi’s current landscape of automated market maker (AMM) based exchange protocols, including more responsive liquidity and superior capital efficiency (and thereby lower costs to traders).

Unfortunately for traders, Ethereum has offered a technically hostile environment for order books since its inception. The main issues here are slow block time and high gas costs. At Hourglass, we developed three core strategies to overcome these challenges:

  1. Unified Pricing: Hourglass employs pricing logic that operates independently of the original order. Each “pair” of stables on Hourglass has a prespecified price oracle. By doing away with traditional limit order based price discovery, the amount of orders placed and canceled is drastically reduced and market makers can safely offer quotes much closer to spot.

  2. Recycling Maker Orders: Writing new orders is expensive. By allowing maker orders to pair again once filled, Hourglass greatly reduces the number of orders placed while also solving MEV by making queue position permanent.

  3. Batched Settlement: Batching simplifies escrow risk, enhances capital efficiency, reduces the number of cross chain calls, provides checkpoints for rollbacks (improving safety), simplifies asset pricing, raises the rate of internal pairing, and increases predictability for makers.

These strategies culminated in Hourglass’ atomic unit: the Minute Market. Minute Markets are individual on chain order books that use a prespecified oracle to support a distinct asset pair, such as USDT-DAI. By networking “Minute Markets”, Hourglass is able to offer highly efficient cross chain swaps. The basic functionality is straightforward: takers place an order and Hourglass matches this order with another taker order or one of our liquidity providers. The exact funds required are swapped on chain at the time of transaction at the oracle specified market price.

This new primitive unlocks greater bridging security, flexibility, and cost structure, and we are looking toward a future where Hourglass serves as a seamless, plug-and-play liquidity solution for any application needing to incorporate cross-chain value transfer. In this future, developers can leave the liquidity problem to Hourglass and focus on innovating in other areas of the bridging stack.

Trade Lifecycle

  1. Alice places an order seeking to convert 100 units of Asset Y into Asset X.

  2. Bob places an order to trade 100 units of Asset X for 100 units of Asset Y.

  3. If Assets X and Y are on a different blockchains, the orders are passed to the destination blockchain via layer0

    1. Otherwise, the matching occurs locally.

  4. Every 5 minutes, orders are paired.

    1. If there is a taker order from X to Y, this is paired with Alice’s order

    2. If there is no taker order but there is a maker order, Alice is paired with the market maker.

    3. The maker has 15 minutes to fund Alice’s trade. If the maker fails to fund Alice’s trade, they forfeit their collateral and lose their position in the queue.

  5. Once matched, the smart contracts confirm that both sides are funded, authorizing the release of funds on the opposing chain.

Last updated