> For the complete documentation index, see [llms.txt](https://orders-exchange.gitbook.io/orders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://orders-exchange.gitbook.io/orders/orderbook-dex/technology-and-theory/psbt.md).

# PSBT

## What is PSBT(Partially Signed Bitcoin Transaction)?

The Partially Signed Bitcoin Transaction (PSBT) is a standard format designed to simplify the handling of Bitcoin transactions that have not yet been finalized. PSBTs were first introduced in Bitcoin Improvement Proposal (BIP) 174, aiming to resolve the complexities associated with constructing and signing multi-input, multi-output transactions. Essentially, a PSBT is a transaction that has some (or potentially all) of its inputs partially signed, but not completely finalized and broadcast to the Bitcoin network.

The core value of PSBT lies in its ability to offer an efficient and secure collaborative process for transaction construction, especially in cases where multiple signatures are required. By employing PSBT, the entities involved in the transaction can work on signing it independently and in an incremental manner, without needing to disclose sensitive data to each other.

By adopting PSBT, software wallets, hardware wallets, and other Bitcoin applications can improve their compatibility and interoperability, providing a seamless experience for end-users. This is particularly beneficial when dealing with complex transaction scenarios, where the process of constructing and signing the transaction can be partitioned into multiple stages, ensuring increased flexibility and security.

## The Role of PSBT in Orders Exchange:

* **Security of Fund Transfers**

PSBT provides an off-chain safety mechanism for the asset exchange process. The PSBT created by a user when placing a sell order is in a semi-finished state and can only be confirmed on the blockchain when the user's requirements are met. Even if the PSBT circulates in public, it cannot be arbitrarily modified or exploited unless the transaction initiator's conditions are satisfied. Moreover, users can invalidate the PSBT at any time by sending the assets signed in the PSBT back to their own wallet, further enhancing asset security.

* **Efficiency of Fund Transfers**

The design of PSBT can greatly enhance the efficiency of fund transfers. Transactions can circulate securely off-chain until the trading conditions are met. This allows the transaction to be widely propagated and matched before it is actually executed, greatly improving the efficiency and speed of the transactions.

* **Assistance to Orders Pool**

By leveraging PSBT and multi-signature technology, Orders Exchange can implement a fully trustless BRC20 liquidity pool. The liquidity provided by users is, in fact, a PSBT single-signed asset pair, with its output pointing to a multi-signature address shared by the user and the exchange. This design ensures the exchange cannot directly cash out the PSBT and take the user's assets, thereby securing the assets of liquidity providers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://orders-exchange.gitbook.io/orders/orderbook-dex/technology-and-theory/psbt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
