> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askgina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LP skills

> Scan public pool data and apply numeric rebalancing rules that only produce proposals.

The LP skills ship in the `ask-gina-spot` plugin and are listed in the [skills catalog](https://docs.askgina.ai/agents/skills-catalog.md). They support LP work alongside Spot MCP, and neither one executes anything.

| Skill | What it does | Needs |
| - | - | - |
| `lp-pool-scan` | Ranks pools from public data by fee yield, estimated impermanent loss (IL), depth and slippage | Python 3.9+; no keys |
| `lp-rebalancing-playbook` | Applies numeric rules for re-range, harvest, compound, trim, exit and size caps | Live position and pool data |

To install them, follow [install for your host](https://docs.askgina.ai/agents/plugins-and-skills.md#install-for-your-host). Each skill has a `SKILL.md` with its full rules, flags and formulas in [askgina/plugins](https://github.com/askgina/plugins/tree/main/plugins/ask-gina-spot/skills). Use those files rather than copies of this page. The [LP agent workflow](https://docs.askgina.ai/spot-mcp/lp-agent-workflow.md) shows how the skills fit with the Spot MCP quote, execute and status tools.

## lp-pool-scan

The scanner only reads. It makes HTTP GET requests to public APIs and read calls to public Robinhood Chain, Base and Ethereum RPCs. It never signs, sends or simulates a transaction for execution, and it needs no wallet, keys or API keys. Do not wire it to a trading or wallet connector.

### Run it

```bash theme={null}
cd plugins/ask-gina-spot/skills/lp-pool-scan
python3 scripts/lp_pool_scan.py --universe top --out ./lp-scan-output
python3 scripts/lp_pool_scan.py --universe allowlist --allowlist my_pools.json --top 10
python3 scripts/lp_pool_scan.py --universe allowlist --format json --quiet
```

| Universe | Scope | Typical runtime |
| - | - | - |
| `allowlist` | Pools listed in a local allowlist file (default) | Short |
| `top` | Daily mode: top pools by 24h volume per chain, tokenized-stock pools, allowlist pools and pinned pools | About 10 to 20 minutes |
| `wide` | Allowlist, every tokenized-stock pool and the top pools above \$1M TVL per chain | About 45 minutes; resumable |

The daily report has two tables per chain (top pools by 24h volume, and tokenized-stock pools by fee cover) for Robinhood Chain, Base, Ethereum and Solana. `--chains base,eth` limits `top` and `wide` to a subset of `robinhood`, `base`, `eth` and `solana`. Set `$RH_RPC`, `$BASE_RPC` or `$ETH_RPC` to use your own RPC instead of the public default.

Exit code 0 means success, 1 a runtime error and 2 bad arguments or a missing allowlist file. Each rerun prints a one-line diff against the previous snapshot. `--render-only` re-scores and re-renders the latest snapshot without network access. See `SKILL.md` for every flag.

### Read the output

Reports are written under `reports/` and full snapshots under `snapshots/`. Each ranked row shows:

* **APR**: fee APR over 7 days, fees only, annualized and adjusted for the LP share after protocol fees. It uses current TVL, not average TVL.
* **Fees 7d, IL 7d and Net 7d**: 7-day figures as a percentage of TVL. IL is never annualized.
* **Cover**: Fees 7d divided by estimated IL 7d. Above 1x means fees covered the IL implied by realized volatility.
* **Break-even vs realized**: the 7-day price move at which IL equals fees, compared with the realized 7-day move.
* \*\*$1M slip / max fill**: price impact at $1M, or the largest fill a pool can absorb.
* **Flags**: risk flags such as `LOOKALIKE`, `HONEYPOT`, `dead_volume` or `rugcheck_danger`. Several flags exclude a pool from ranked tables; others lower its score.

A pool with no measurable IL is never ranked. Uniswap v4 hook or dynamic-fee pools without measurable IL appear in a separate **Needs review** list.

### Scope differs from Spot MCP support

The scanner's default `--dex-scope core` covers Uniswap v2, v3 and v4 on Robinhood Chain, Uniswap v3 and v4 on Base and Ethereum, and Raydium AMM, CPMM and CLMM on Solana. `--dex-scope all` adds other DEXes such as Orca and Meteora; Base stays Uniswap v3 and v4 only. Spot MCP LP operations support a narrower set: Uniswap v3 and v4 on Robinhood Chain, Base and Ethereum, and Raydium CLMM and CPMM on Solana. See the [LP support matrix](https://docs.askgina.ai/spot-mcp/liquidity-positions.md#capability-and-access).

A pool on any other protocol cannot be operated through Spot MCP, however well it ranks. That includes Uniswap v2, Raydium AMM, Orca and Meteora pools. Check the protocol in the **Pool** column before proposing an action.

### The scanner allowlist is a local file

`--allowlist` reads a local JSON file keyed by chain and protocol:

```json theme={null}
{
  "robinhood_chain_4663": { "uniswap-v3": ["<pool-address>"], "uniswap-v4": ["<pool-id>"] },
  "base_8453": { "uniswap-v3": ["<pool-address>"], "uniswap-v4": ["<pool-id>"] },
  "ethereum_1": { "uniswap-v3": ["<pool-address>"], "uniswap-v4": ["<pool-id>"] },
  "solana": { "raydium-clmm": ["<pool-address>"], "raydium-cpmm": ["<pool-address>"] }
}
```

This file only tells the scanner what to report. It is separate from the Spot MCP pool allowlists read with `getLpAllowlist` and `getSolanaLpAllowlist`, and editing it grants no permission to operate a pool. To keep both in step, see [allowlists end to end](https://docs.askgina.ai/spot-mcp/liquidity-positions.md#allowlists-end-to-end).

### Limits

* Depth ignores routing across pools, just-in-time liquidity and v4 hook logic. Orca and Meteora depth is not available.
* Tokenized-stock volume is structurally low on weekends; prefer 7-day figures.
* Lists from public APIs are sorted by activity, so a high-TVL pool with no recent activity can be missed.
* Scores are public-data estimates, not quotes or forecasts.

## lp-rebalancing-playbook

The playbook turns live position and pool data into proposals. Every rule produces a proposal, never an action. The owner approves each exact action in chat, and scheduled runs only flag and propose.

### Guardrails

* No execution, signing or fund movement without the owner's explicit in-chat approval of that exact action: pool, amounts, range, slippage and fees.
* One approval covers one action. A re-range plus a swap is two actions.
* Every proposal carries a live quote. If the quote expires, re-quote before asking again.
* Read live state before any number, and mark unknown values as n/a.
* When rules conflict, the priority is Exit, then Trim, then Re-range, then Harvest or Compound, then Add.

### Rules at a glance

| Rule | Proposes when (defaults) |
| - | - |
| Re-range | Out of range for 6 or more active hours, or drift of 0.8 or more for 24 active hours, and 7-day fees in the new range cover at least 2x the cost |
| Harvest | Uncollected fees net of cost are at least the greater of \$25 or 10x the collect cost, or other accrual thresholds in `SKILL.md` |
| Compound | Position in range with drift below 0.5, passes trim and exit checks, and stays under its size cap |
| Trim (50%) | Stable leg off peg by more than 0.5% for 1 hour, pool TVL down 40% in 7 days, IL above fees with fee cover below 1x, or a size cap breach |
| Full exit | Stable leg off peg by more than 2% for 1 hour, a token risk event, pool TVL down 70% in 7 days, or position value down 25% in 24h |
| Size caps | Position at or under 5% of pool TVL, 25% of the LP book per pool and 60% per chain, among others |

Re-range has a 72-hour cooldown per position. For session-bound assets such as tokenized stocks, only open-session hours count, and re-ranges wait for the market to reopen unless the position is out of range. Thresholds are defaults that the owner can override per position.

### Logging

The playbook keeps one row per proposal and a daily position log for blended APR. The [LP agent workflow](https://docs.askgina.ai/spot-mcp/lp-agent-workflow.md#log-every-proposal) lists the fields, decisions and Spot MCP identifiers to record.

The playbook is not financial advice and does not run a hosted strategy. [LP analytics](https://docs.askgina.ai/spot-mcp/lp-analytics.md) explains what Spot MCP measurements can and cannot establish.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.