Orders.Exchange - Full Protocol DEX Run on BTC
  • Overview
    • What is Orders.Exchange
    • Why create Orders.Exchange?
  • Orderbook DEX
    • Overview
    • Technology & Theory
      • PSBT
      • 0-Sec Multi Transactions
      • Ask Orders
        • Technical flowchart for placing ASK orders
      • Bid Orders
        • Technical flowchart for placing BID orders
      • Nostr Proposal
        • NIP-100
    • Audit Report
    • Service Fee
    • Trade to Burn
  • Orders Swap & Liquidity Pools
    • Orders Swap
      • Overview
      • Technology & Theory
        • Decentralized Architecture
      • Service Fee
      • Swap to Burn
    • Orders Liquidity Pools
      • Overview
      • Technology & Theory
        • Threshold Multisignature
        • Cold-Hot Wallet Isolation
      • Stake to Earn
      • Service Fee Sharing
    • Audit Report
  • Orders Bridge
    • Overview
    • Technology & Theory
    • Audit Report
    • Service Fee
  • Minting is Liquidating
    • Minting is Liquidating
    • Principle Workflow
    • Stake to Earn
    • Service Fee
  • Tokenomics
    • $RDEX
  • Roadmap
    • Orders Roadmap
  • FAQ
    • How to Earn $RDEX?
    • Why does $RDEX have almost half of its tokens in one address, and does this pose a risk?
    • What is the buyback timing and frequency for $RDEX?
    • How does P-LP differ from regular LPs? Do I need to lock my assets?
    • Why are there different reward multipliers in P-LP? How should I choose which multiplier to go for?
    • Is the liquidity I provide to P-LP safe? How can its safety be assured?
    • Why does P-LP differentiate between uni-directional and bi-directional liquidity? What's the differe
    • How are funds transferred between the buyer's and seller's wallets, and do my tokens leave my wallet
    • From a technical perspective, what happens when canceling an already placed buy/sell order?
    • Is the liquidity pool for Orders fully decentralized, and how is it achieved?
    • The world's first Bitcoin-native network supported BID system: How it came into existence
    • How many $RDEX tokens are released daily, and how is it done?
    • After adding LP, how can I make it trade? I can't see this LP on my own trading page.
    • Can I know which P-LP I provided?
    • Why not open RDEX P-LP?
    • The transaction fees are currently high; is there a way to reduce them?
    • What's the difference between orders and other DEXs?
  • Risks & Disclaimer
    • Risks & Disclaimer
  • Team
    • Team Introduction
  • Resources
    • Orders Exchange
    • Twitter
    • Discord
    • Github
Powered by GitBook
On this page
  • Maker creates PSBT(X)
  • Taker creates PSBT(Y)
  1. Orderbook DEX
  2. Technology & Theory

Bid Orders

PreviousTechnical flowchart for placing ASK ordersNextTechnical flowchart for placing BID orders

Last updated 1 year ago

The construction process for BID orders is more complex than that for ASK orders. The earliest discussion of BID orders can be traced back to , but the initial proposed solution was not feasible.

To create a decentralized transaction based on PSBT, similar to ASK orders, it is necessary to introduce liquidity providers. Liquidity providers are needed to supply a kind of "guarantee" for the liquidity in order for the process to work.

Furthermore, completing a BID order involves two PSBT transactions: the first one is referred to as PSBT(X), and the second one is called PSBT(Y).

The specific process is as follows.

Maker creates PSBT(X)

  1. Maker requests the desired BRC20 tick and quantity from the platform.

  2. Platform Constructs PSBT(X)

Input consists of ordinals corresponding to the BRC20 tick and quantity, while the output is the market price (marketPrice) of the tick collected by the platform. The transaction is then signed with a single signature (SignHash_Single | ACP) and returned to the Maker.

  1. Maker Continues Building PSBT(X)

Upon receiving the PSBT(X) from the platform, the Maker wishes to purchase the tick at a price (buyPrice) lower than the market price (marketPrice). The Maker fills in the corresponding inputs and outputs and then signs the transaction using (SignHash_ALL | ACP). The Maker submits the signed PSBT(X) to the platform and waits for a Taker.

Taker creates PSBT(Y)

  1. Taker Views the Bid Order

The Taker, interested in completing the transaction, provides the corresponding BRC20 tick and quantity. They construct PSBT(Y) with the input being the ordinals corresponding to the BRC20 tick and quantity, and the output being the Taker's selling price (buyPrice) for that tick. The Taker then signs the transaction with a single signature (SignHash_Single | ACP) and returns it to the platform.

  1. Platform Continues Building PSBT(Y)

As a coordinator, the platform fills in the inputs and outputs for PSBT(Y). An additional output (mid) is reserved in the outputs, with its value being the price difference between marketPrice and buyPrice. This output (mid) is used to supplement the inputs of PSBT(X).

  1. Broadcasting

After completing both PSBT(Y) and PSBT(X), the transactions are broadcasted in sequence, first PSBT(Y) and then PSBT(X), to complete the BID transaction.

Technical flowchart for placing BID orders
Github