Skip to main content

Backup Liquidity Provider (LP)

OFA operators have the option of specifying a backup LP when sending orders to DFlow.

What Is a Backup LP?

Order flow sources create auctions to access market maker liquidity but it is possible market maker liquidity is absent. DFlow is the first layer of liquidity and a backup LP acts as a fallback option when no market maker quote exists. For example, if an order flow source did not create a DOGE-USDC auction and a customer sends an order to buy $1000 of DOGE with USDC, there will be no market maker quote.

In practice, the backup LP feature makes integrating with DFlow a seamless and flexible process because order flow sources can continue to use their existing LPs as a backup option.

When Is an Order Routed to Backup LP?

An order can be routed to a backup LP with or without an existing OFA. In the current model, when a DFlow market maker quote exists for an order, the order will be prioritized and sent to the market maker. If not, a backup LP will be used.

Case 1: Order Not Routed Via Auction

Order flow source did not create an OFA and therefore cannot access best-execution market maker liquidity.

  • No matching auction: a match exists when an order adheres to an auction's parameters. For example, a match exists if a customer places an order to buy $1000 DOGE with USDC on Ethereum and there's a DOGE-USDC auction on Ethereum for order sizes between $0 and $2500. This assumes the Notional Size and Delivery Period of the auction are also valid

Case 2: Order Routed Via Auction

Order flow source created an OFA but can not access market maker liquidity for following known reasons.

  • Auction matching order exists but no winning market maker: DFlow OFAs are permissionless and it's possible certain OFAs are unattractive to market makers and receive no bids (similar to how certain DEX liquidity pools have low liquidity). A more common case for this happening is when an OFA is first deployed as the first epoch of every OFA will never have a winning market maker. This is a core DFlow OFA design feature, which is market makers always bid for future order flow.

  • Auction matching order exists but winning market maker does not create a quote: in rare cases, the market market may be unable to provide a quote due to network failures.

An Example: How to Use Backup LP?

An order is either routed via an OFA or directly to a backup LP. A backup LP can be invoked when routing via an auction.

A backup LP has a use case irrespective of whether an OFA exists. If an auction exists, a backup LP serves as fallback liquidity in case there's no winning market maker (i.e. auction doesn't receive any bids) and liquidity is still needed. This ensures all orders can be filled.

Using backup LP for auction epoch 0

By auction design, the first epoch of a new auction will never have a winning market market so to deliver orders immediately after an auction is deployed, a backup LP must be set up. The order flow source can also choose not to deliver orders and wait for market maker bids.

If no auction exists, a backup LP can be used as the primary liquidity source. In practice, an order flow source may set aside certain token pairs (e.g. low liquidity token pairs) to only use a backup LP.

Backup LP

Backup LP Use Case

A backup LP defaults all existing and new auctions to use the backup LP as fallback liquidity. A global backup LP can also be used to fill swap orders that don't match an auction.

Backup LP