Point to Point orders and Broadcast Orders on 0x protocol

Usman Fazil
Coinmonks
Published in
2 min readApr 26, 2018

--

If you don’t know about the General sequence of off chain order and on chain settlement of 0x protocol, read our previous article on it.”Diving Deep into 0x protocol”

Now let’s talk about Point to Point order and Broadcast Order through Relayer in detail.

Point to Point Order:

Through Point to Point Order, Maker and Taker can exchange their tokens directly. In Point to Point order Maker creates an order with a specific Taker in Mind, so the order can only be filled with that specific Taker’s address, making the order useless for everyone else.

Let’s have a look at Figure 1.2

( Figure 1.2)

Message format of Point to Point Order is explained in the Figure 1.3

(Figure 1.3)

Broadcast order through Relayer:

To create liquidity, there must be some publicly accessible order books where sellers can post their order and buyers fill those orders. Here Broadcast order solves this issue by allowing anyone to maintain an order book and charge a small fee for their services. Any person hosting and maintaining the order book is known as Relayer. Relayers never execute the trade like other exchanges, only Takers can execute their order.

(Figure 1.4)

To understand the working of Relayer let’s have a look at Figure 1.4 and discuss it step by step.

Step 1: Relayer provide a fee schedule (service fee) with the address on which it collects that fee.

Step 2: Maker creates an order and sets the value of feeA and feeB [1] according to relayer’s specifications, and then the Maker signs the address with his/her private key.

Step 3: After signing the order Maker send the order to Relayer.

Relayer receives the order and checks whether it fulfills its requirements(fee schedule), if not, the order is rejected. If yes, then then the relayer posts that order in his/her order book.

Step 4: Takers get an updated order book with a new order, that maker has made.

Step 5: Taker fills the Maker’s order by submitting it to the decentralised exchange smart contracts.

And then the Token Transfer is made.

[1] feeA = Tokens paid by Maker to the relayer for his/her services.

feeB = Tokens paid by Taker to the relayer for his/her services.

Thanks to Sidra Tariq for helping us on this article.

--

--

Usman Fazil
Coinmonks

Blockchain and crypto enthusiast, exploring the vast field of peer to peer communication. Check git here https://github.com/usmanfazil