Flip orders on the Kuru orderbook work the same as a normal order in a taker’s perspective, maintaining price-time priority. However, these are conditional orders which allow makers to use the funds credited from an order to place another order on the other side (i.e, buy vs sell).
The structure of an order looks like this :
Note:
Flip orders are distinguished from regular orders on the condition flip price ≠ 0
.
The lifecycle of a flip order looks like this :
1
and there are no other makers making on this market. Let us assume that the size of this order is 100.1
, the remaining size of the order would be 50. Quote eligible for size of 50, i.e, $p * 50$ is credited to the taker.1
at price $p_f$. Both the orders are attached to each other with the flip ID
parameter. The new order at price $p_f$ is order 2
.1
, the filled size of 25 is added to order 2
, and 25 is subtracted from 1
.We get two major unlocks from this :