# Contract

This section introduces the core smart contracts that power PumpSpace. Each contract plays a specific role in enabling token pair creation, liquidity provisioning, and token swaps.\
For detailed functionality and available methods, refer to the individual contract pages.

### 🏗️ Factory

Handles the creation and indexing of token pairs and liquidity pools.

{% content-ref url="/pages/sFJmyS1iMQGJnmjd9MHE" %}
[Factory](/docs/contract/factory.md)
{% endcontent-ref %}

### 🔁 Router

Serves as the main interface for users to interact with PumpSpace — enabling token swaps and liquidity management.

{% content-ref url="/pages/dXghVVR2NI1UmagzmCOv" %}
[Router](/docs/contract/router.md)
{% endcontent-ref %}

### 🔄 Pair

Represents a single liquidity pool for a token pair. It manages token reserves and executes swaps at the protocol level.

{% content-ref url="/pages/0lvy0gPw9nNRJEZzrzFP" %}
[Pair](/docs/contract/pair.md)
{% endcontent-ref %}


---

# Agent Instructions: 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:

```
GET https://pumpspace.gitbook.io/docs/contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
