# Factory

Factory is the central coordinator of Torch Finance, responsible for deploying all contracts, including Vaults, Pools, and LP Accounts.

<figure><img src="/files/5KtZFPw0ndohP6q6sQRB" alt=""><figcaption></figcaption></figure>

Think of the Factory as the store manager of a supermarket, deciding which checkout counters (Vaults) should be set up, which cash registers (Pools) need to be activated to handle discounts and exchanges, and arranging for delivery services (LP Accounts) to gather all purchases and deliver them to the user in one trip, ensuring faster and more efficient transactions.

* When a new asset enters the system, the Factory deploys a new Vault (checkout counter) to manage and store the asset, ensuring it has a dedicated space for handling.
* If a new liquidity pool is needed, the Factory sets up the corresponding Pool (cash register), responsible for asset swaps, discount calculations, and transaction processing.
* For different user needs, the Factory creates dedicated LP Accounts (delivery service), which wait until all purchases are complete before making a single, efficient delivery to the user, ensuring smoother and more streamlined transactions.

Whether deploying new liquidity pools or LP Accounts, **the Factory swiftly allocates and deploys resources, keeping the Torch system running smoothly and ensuring seamless coordination between components.**


---

# 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://doc.torch.finance/dex/getting-started/architecture/core-components/factory.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.
