> For the complete documentation index, see [llms.txt](https://pegasys.gitbook.io/pegasys-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pegasys.gitbook.io/pegasys-docs/yield/the-market.md).

# The Market

Just like in any market, the market for liquidity on the Lightning Network has both a supply and demand side. The supply side consists of Lightning Network users who have excess liquidity and are willing to open channels with other nodes to facilitate payment routing and, in return, earn fees. These users, often referred to as “liquidity providers”, play a crucial role in maintaining the efficiency and functionality of the network by ensuring that sufficient liquidity is available where needed.

Lightning channels are classified as either inbound or outbound:

* **Inbound Channels** represent the capacity to receive payments from other nodes. Inbound liquidity is crucial for users or services that expect to receive payments, as it ensures that other nodes can send funds to them.
* **Outbound Channels**, on the other hand, represent the ability of a node to send payments to other nodes. When a node has outbound liquidity, it means it can initiate transactions and transfer funds out to others on the network.

On the demand side, some users require liquidity in their channels to be able to send payments. These users need sufficient outbound liquidity in their channels to complete transactions. However, if a node expects to receive payments frequently, it must ensure adequate inbound liquidity. These users might operate businesses, run services, or engage in other activities that necessitate frequent inbound or outbound transactions on the Lightning Network. To ensure their channels have enough capacity, these users are willing to pay fees to liquidity providers in exchange for access to the required liquidity, be it inbound or outbound.

The interplay between these two sides creates a dynamic market where liquidity is continuously reallocated across the network in response to shifting demand patterns. The equilibrium price of liquidity—determined by the fees set by liquidity providers—reflects the underlying supply and demand conditions. The PegaSys protocol positions itself within this market by acting as a large-scale liquidity provider and payment router, aggregating funds from multiple depositors to maximize fee earnings and, consequently, yield generation for its users. By carefully managing both inbound and outbound channels, PegaSys ensures optimal allocation of liquidity to areas of highest demand, thereby enhancing the yield potential for depositors.


---

# 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://pegasys.gitbook.io/pegasys-docs/yield/the-market.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.
