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

# Liquidity Providing

## Liquidity mode

Liquidity Mode is the HawkFi Laboratory mode for LP strategy simulation.\
\
Paste a pool address, select a time window, configure a strategy, run the backtest, and study the result before deploying real capital.

## Metrics of Liquidity Mode

### Result Metrics

The Result Metrics of HawkFi Laboratory summarize performance and risk.

| Metric       | What it means                                                                    |
| ------------ | -------------------------------------------------------------------------------- |
| Net PnL      | The simulated HawkFi strategy PnL for the selected window.                       |
| Manual LP    | The passive 69 spot bins for the same pool and window.                           |
| Pair HODL    | The result from holding the pool pair instead of running the simulated strategy. |
| Fees         | Fees earned by the simulated strategy.                                           |
| Max Drawdown | The largest peak decline during the backtest.                                    |

{% hint style="info" %}
Use `Percentage` or `Absolute` to switch how results are displayed.
{% endhint %}

### Equity Curve Metrics

The Equity Curve of HawkFi Laboratory shows how performance changed over time.

<table><thead><tr><th width="170">Line</th><th>What it means</th></tr></thead><tbody><tr><td>Simulated PnL</td><td>The performance of the HawkFi model or custom setup being simulated.</td></tr><tr><td>Manual PnL</td><td>The passive LP benchmark over the same pool and window.</td></tr><tr><td>Pair HODL PnL</td><td>The result from holding the pool pair instead of running a strategy.</td></tr><tr><td>Single token HODL</td><td>The result from holding one side of the pair, when available.</td></tr><tr><td>Cumulative Fees</td><td>The fees accumulated by the simulated setup, when enabled.</td></tr></tbody></table>

Use this chart to see when outperformance appeared, when drawdown happened, and whether the final result came from a steady edge or a late move.

### Price & Range Chart

Price & Range chart of HawkFi Laboratory shows pool price relative to the simulated strategy range.

| Line or label | What it shows                                                            |
| ------------- | ------------------------------------------------------------------------ |
| Price         | The pool price through the backtest window.                              |
| Range high    | The upper maximum range of the simulated range.                          |
| Range low     | The lower minimum range of the simulated range.                          |
| Rebalance     | Markers showing where the strategy rebalanced, when rebalances occurred. |
| Rebalances    | The total number of rebalances during the simulation.                    |

Use this panel to understand whether the strategy stayed positioned around price or spent too much time away from the active market.

### TVL Breakdown

TVL Breakdown of HawkFi Laboratory shows the simulated token composition over time.

| <p>Example for a simulated</p><p>(SOL-USDC pool)</p> | What it means                                            |
| ---------------------------------------------------- | -------------------------------------------------------- |
| SOL TVL                                              | The simulated SOL value held by the position over time.  |
| USDC TVL                                             | The simulated USDC value held by the position over time. |

Use TVL Breakdown to inspect how inventory shifted through the range. A strategy can earn fees while ending with a different token mix, so this chart gives more context than PnL alone.

### Simulation summary

Under the charts, Laboratory shows a compact summary.

| Field          | What it means                                                                    |
| -------------- | -------------------------------------------------------------------------------- |
| Window         | The exact historical period used for the backtest.                               |
| Time in Range  | The percentage of the selected window where the simulated position was in range. |
| Rebalances     | The number of times the strategy rebalanced during the simulation.               |
| Liquidity Mode | The internal simulation mode used to process liquidity behavior.                 |

### Liquidity Replay Animation

Liquidity Replay Animation lets you inspect the simulated position frame by frame.

| Field      | What it means                                        |
| ---------- | ---------------------------------------------------- |
| Frame      | The current replay frame out of the full simulation. |
| Timestamp  | The historical time represented by the frame.        |
| Active Bin | The active DLMM bin at that moment.                  |
| Range      | The simulated position range at that moment.         |
| Price      | The pool price at that moment.                       |
| Event      | The current replay event count or state.             |

The replay bars show token distribution across bins. Use this panel when you want to understand how the strategy behaved inside the range instead of only reading final PnL.

## How to run a Liquidity Mode backtest

Use this simplified walkthrough to experiment with a DLMM liquidity setup in HawkFi Laboratory.

{% stepper %}
{% step %}

#### Select Liquidity Mode

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

Use the `Mode` selector and choose `Liquidity`.
{% endstep %}

{% step %}

#### Paste a pool address

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

Paste the DLMM pool address into `Pool Address`.

When the pool loads, Laboratory displays the pair, base fee, and bin step. In the SOL USDC screenshot, the pool reflects:

| Pool detail   | Example shown |
| ------------- | ------------- |
| Pair          | SOL USDC      |
| Base fee      | 0.04%         |
| Bin step      | 4             |
| {% endstep %} |               |

{% step %}

#### Set Start and End

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

Use `Start` and `End` to choose the historical backtest window.

The selected period controls which pool data Laboratory uses for the simulation.

The date picker lets you select the calendar date and time. Use this when you want to test a specific market period, such as a launch window, drawdown, recovery, or recent pool behavior.
{% endstep %}

{% step %}

#### Set Initial USDC

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

Use `Initial USDC` to set the starting quote amount.

For SOL quote pools, this is the amount of TVL in USDC used in the simulated position.\
\
For SOL quote pools, this is the amount of TVL in USDC used in the simulated position.\
\
For other quote pools, this is the amount of TVL in USDC used in the simulated position.
{% endstep %}

{% step %}

#### Optimize!

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

Click `Optimize` when you want Laboratory to search for stronger strategy configurations across the selected pool, time window, and deposit amount.

Under `Strategy actions`, `Save Model` appears before `Optimize`.

There are two Optimize options

| Optimize options | What it means                                                                                            |
| ---------------- | -------------------------------------------------------------------------------------------------------- |
| Light            | It optimizes across 62 curated strategies proven to perform well on SOL/USDC. Finishes in a few seconds. |
| Deep             | Optimizes across \~212 strategies. Takes noticeably longer but searches a much wider space.              |
| {% endstep %}    |                                                                                                          |

{% step %}

#### Optional: Configure Strategy

<figure><img src="/files/0dTq6DeJghO1Djufm7LW" alt=""><figcaption></figcaption></figure>

Click `Configure` to select or customize the liquidity setup.

You can either create a custom setup from scratch or start from an existing HawkFi model.

{% stepper %}
{% step %}

### Option 1: Create from scratch

<figure><img src="/files/4Mi0Sx7nFJ1DRO03Kf0F" alt=""><figcaption></figcaption></figure>

Use `Create from scratch` when you want to build the setup manually.

<table><thead><tr><th width="190">Setting</th><th>What it controls</th></tr></thead><tbody><tr><td>Initial Deposit Preferences</td><td>Choose the starting liquidity shape, such as Spot, Curve, Bid-ask, or Hybrid.</td></tr><tr><td>Single-sided quote token</td><td>Start the position using only the quote token, when enabled.</td></tr><tr><td>Position Width Basis</td><td>Choose whether the range width is set by bin count or price percentage.</td></tr><tr><td>Below the Price / Above the Price</td><td>Set how many bins the position uses below and above the current price.</td></tr><tr><td>Total Number of Bins</td><td>The total simulated position width.</td></tr></tbody></table>
{% endstep %}

{% step %}

### Option 2: Customize an existing model

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

Use `Customize an existing model` when you want to start from a HawkFi model, then adjust it for the pool and market window you are experimenting with.

Want to learn more about HawkFi Models? See [HawkFi Models here.](/whitepaper/models-and-automations-library/hawkfi-models.md)
{% endstep %}
{% endstepper %}
{% endstep %}

{% step %}

#### Run Backtest

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

Click `Run Backtest`.

Laboratory simulates the selected strategy over the selected pool and time window.

<figure><img src="/files/0jZX7lWW2jhrz4mO0Xyy" alt=""><figcaption></figcaption></figure>

`Execute Strategy` appears below the `Initial USDC` and `Strategy actions` row. Run and review the backtest before using it to deploy the setup.
{% endstep %}
{% endstepper %}

## Liquidity Mode tips

* Compare strategies using the same pool, same window, and same deposit.
* Read Net PnL beside Manual LP and Pair HODL.
* Check Max Drawdown before judging a backtest as good.
* Use Price and Range to see whether the range matched the market.
* Use TVL Breakdown to understand inventory changes.
* Use Liquidity Replay to inspect how the position behaved through time.

### More Questions?

* Join our Discord for questions and discussion: <https://discord.com/invite/hawkfi>
