Limit Order Feature Poll

I’m working on building limit order feature and I need your opinions.
There are two options to implement it:

2nd Layer Orderbook + Relayers

This model keeps the orderbook on 2nd layer chain such as Solana and have relayers fetch orders from there. Solana is run by a limited set of validators due to the nature of POS.


  • You don’t need to pay for gas to place/cancel an order.
  • Placing/cancelling an order gets done in a few seconds.


  • You still need to pay for gas when settling an order.
  • It is possible that validators of Solana revert the history of the blockchain if it’s more profitable, even though its chance is very small.

Fully Decentralized Orderbook

This model fully decentralizes the orderbook on chain.


  • Once your order is placed on chain, no one can revert it or manipulate it.
  • Your orders and funds are safely protected by the hashing power of Ethereum, one of the biggest blockchains.


  • Each time you place an order, you need to wait for 15 seconds and pay for gas, which quite expensive at this moment.
  • It even requires another 15 seconds of waiting and paying for gas when you want to cancel an order.

What’s your preference?

  • 2nd Layer Orderbook + Relayers
  • Fully Decentralized Orderbook

0 voters

1 Like

I’d opt for both :stuck_out_tongue: If we can have the contract take direct orders as well as orders as signed messages. Then those messages could be put anywhere. On L2, on DOGEcoin, on a centralized server… you would probably still have to cancel on-chain. You would want those messages in as many places as possible. I understand from your design that anyone will be able to execute orders, so as long as they somehow get their hands on the signed message and it’s profitable, they will be executed on-chain by someone. Cancellations would probably still have to be done on-chain. Also, in your current design you lock up the funds. I would not require the funds to be locked, anyone checking the orders can verify if the funds are available, you could even provide a helper function for this. This way if you use the funds for something else, your order is effectively cancelled. But ultimately, this is your project, so go whichever way you think best :smiley:


So you’re adding the book in addition to AMM? Will the resting orders, submitted by the user, be crossed against AMM?
I think etherdelta et al showed exactly how sensitive the viability of LOBs to the gas price.

If you can figure out how AMM can submit its liquidity to a LOB, Sam will pay you a grant (if it’s not taken already).

Of course, both options would be preferred, like boringcrypto says.

1 Like

I’m pretty sure small orders will not be executed during high gas prices. No matter which way you slice it, not much you can do about that. Your order will be executed when the price covers the order + gas + a tiny bit profit. The only way around this is to have lower gas costs, which are unlikely anytime soon on ETH.

1 Like