# Providing Liquidity

When a user tokenizes their yield, they may want access to a liquid form of the principal and yield immediately. To enable this, we use the DEX [Curve.finance](https://curve.fi/) to ensure a large amount of liquidity is always available to swap in/out of the associated PT.

{% hint style="info" %}
We're currently building something special for liquidity of Yield Tokens. Stay tuned! 👀
{% endhint %}

The liquidity on the Curve.finance pools comes from Liquidity Providers, who supply one or both sides of the pool with assets. By doing this, they can earn trading fees each time a swap is made on the Curve pool.

<figure><img src="/files/j2zWe3jE5fYqDO1uPieZ" alt=""><figcaption></figcaption></figure>

## Step by step

### 1. Find a PrincipalToken

See [Tokenizing Yield](/guides/tokenizing-yield.md) guide for more details.

### 2. Deposit

The easiest and quickest way to supply liquidity is to use our [Router](/technical-reference/contract-functions/router.md). The Spectra app for instance uses the router to execute all the depositing and liquidity provision in a single transaction.

See [Routing](/guides/routing.md) for more information on how to build such transactions.

<figure><img src="/files/bqZgYW67pq9zOlp3jZiC" alt=""><figcaption><p>An overview of zapping in with an IBT</p></figcaption></figure>

{% hint style="info" %}
The relevant allowance of the token must be approved for the [Router](/technical-reference/contract-functions/router.md) contract before depositing.
{% endhint %}

#### Alternative: Depositing directly via Curve

Alternatively, you can deposit directly into the associated Curve pools. However this is more difficult and may take longer as you calculate the optimal amount of IBT and PT to convert and deposit. See the official [Curve documentation here](https://resources.curve.fi/lp/depositing).


---

# 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://dev.spectra.finance/guides/providing-liquidity.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.
