| id | TIP-1030 |
|---|---|
| title | Allow same-tick flip orders |
| description | Relaxes the placeFlip validation to allow flipTick to equal tick, enabling flip orders that flip to the same price. |
| authors | Dan Robinson |
| status | Draft |
| related | TIP-1002 |
| protocolVersion | T5 |
| supersedes | TIP-1002 |
Relaxes the placeFlip validation to allow flipTick == tick, enabling flip orders that flip to the same price. This supersedes TIP-1002, extracting the "allow same-tick flip orders" portion without the "prevent crossed orders" change.
Currently, placeFlip requires flipTick to be strictly on the opposite side of tick (e.g., for a bid, flipTick > tick). This prevents use cases like instant token convertibility, where someone wants to place flip orders on both sides at the same tick to create a stable two-sided market that automatically replenishes when orders are filled.
The placeFlip validation is relaxed to allow flipTick == tick:
- Current behavior: For bids,
flipTick > tickrequired; for asks,flipTick < tickrequired - New behavior: For bids,
flipTick >= tickrequired; for asks,flipTick <= tickrequired
No new events.
No new errors.
- Locked books: Same-tick flip orders can result in
best_bid_tick == best_ask_tick. This forecloses any future upgrade that would forbid bids and asks from resting at the same tick, since same-tick flip orders legitimately create that state. - MEV: Tighter flip orders (where
flipTickis closer to or equal totick) increase the likelihood of certain kinds of MEV, such as backrunning, since the new opposite-side order appears at a better price for the backrunner.
- Flip orders with
flipTick == tickare accepted and behave like any other flip order - Flip orders with
flipTickstrictly on the wrong side oftickare still rejected