omgnetwork / research

43 stars 2 forks source link

Utilizing relayers for order matching #20

Closed kasima closed 5 years ago

smartcontracts commented 6 years ago

Background

Relayers are an interesting construction that permit order matching in a centralized manner. The basic idea is that users will send special order transactions to relayers. These special transactions work such that they can be executed if they're matched with another order transaction.

For example, Alice signs an order transaction selling 1 ETH and buying 1 BTC. Bob signs a transaction selling 1 BTC and buying 1 ETH. Both send the transactions to a relayer. The relayer then matches the two transactions and broadcasts it to the child chain.

Currently, these transactions still need to be confirmed by the two parties. This leaves the system open to reneging if either parties decides they don't want to transact. It's possible for the relayer to blacklist any users that have failed to sign a confirmation.

Relayers will look a lot like 0x relayers, so I think there are some potential lessons learned from 0x. Some research should be done on 0x's Open Orderbook vs Matching models.

Research Questions

Resources

On Radar and Relayers 0x Protocol Wiki: Open Orderbook 0x Protocol Wiki: Matching