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

# Liquidity Sentinel: Real-Time Liquidity Protection

> Liquidity Sentinel monitors DeFi pools, protocol reserves, and your positions to detect and respond to liquidity risk before it impacts your portfolio.

Liquidity risk is among the most overlooked dangers in DeFi — pool drains, impermanent loss accumulation, and sudden slippage spikes can erode positions faster than price movements alone. Liquidity Sentinel exists to close that gap. It continuously monitors the liquidity landscape across your active positions and the broader Solana DeFi ecosystem, alerting you to deteriorating conditions and — when configured — acting autonomously to protect your capital before damage is done.

## What Liquidity Sentinel Monitors

Liquidity Sentinel maintains continuous surveillance across five critical dimensions of liquidity health:

* **Pool TVL changes and liquidity depth** — tracking total value locked and available depth across monitored pools in real time. Sudden TVL drops are a leading indicator of instability.
* **Impermanent loss tracking for LP positions** — calculating and reporting your current impermanent loss across all active liquidity positions, updated continuously as relative prices shift.
* **Rug pull and liquidity drain early warning signals** — pattern-matching against known rug pull signatures: rapid large-wallet withdrawals, LP token unlocks, and abnormal removal velocity.
* **Protocol reserve health metrics** — monitoring the reserve ratios and collateral health of lending and liquidity protocols where your assets are deployed.
* **Slippage risk for large intended trades** — before any Execution Sentinel trade is submitted, Liquidity Sentinel models the expected slippage given current pool depth and flags trades that would move price materially.

## Liquidity Alerts

Liquidity Sentinel uses a three-tier alert system based on the severity and immediacy of detected risk:

| Tier | Label        | Description                                                                                                                                                                 |
| ---- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🔵   | **Info**     | Notable but non-urgent conditions — e.g., TVL declining gradually, impermanent loss approaching your soft threshold. Monitor and stay aware.                                |
| 🟡   | **Warning**  | Conditions requiring attention — e.g., pool depth dropping significantly, impermanent loss exceeding a configured level, slippage spiking on your pool. Consider action.    |
| 🔴   | **Critical** | Immediate risk detected — e.g., rapid liquidity drain consistent with rug signatures, protocol reserve ratio falling below safe levels, sudden pool concentration. Act now. |

Critical alerts are delivered simultaneously across all your configured notification channels: dashboard, push notification, and optional webhook.

## Automated Liquidity Protection

When configured, Liquidity Sentinel can move beyond alerting and take autonomous protective action on your behalf:

* **Automatically withdraw LP positions** if pool health drops below a defined threshold — removing your capital from a deteriorating pool without requiring manual intervention.
* **Reduce position size** when slippage risk increases beyond acceptable levels — partially exiting before conditions worsen.
* **Trigger emergency exits** on rug detection signals — immediate full withdrawal from flagged pools when drain patterns match high-confidence rug signatures.

Automated protections are configured per-position and per-pool. You define the thresholds; Liquidity Sentinel enforces them.

<Warning>
  Automated liquidity actions are irreversible once submitted on-chain. Set conservative thresholds and test with small positions first before enabling automation on significant capital.
</Warning>

## Integration with Execution Sentinel

Liquidity Sentinel functions as a mandatory risk gate for the Execution Sentinel. Before any trade or strategy is executed on-chain, Execution Sentinel requests a liquidity clearance from Liquidity Sentinel covering:

* **Pool depth adequacy** — is there sufficient liquidity to execute the intended trade within slippage tolerance?
* **Pool health status** — is the target pool showing any warning or critical signals?
* **Position exposure** — does executing this trade breach any configured exposure limits given current pool conditions?

If Liquidity Sentinel returns a **Warning** or **Critical** status on any of these checks, the Execution Sentinel will pause the trade and surface the specific risk flags for your review. Execution only proceeds on a clean clearance — this is by design, not configurable away.

See [Execution Sentinel](/sentinels/execution-sentinel) for a full walkthrough of the joint execution flow.

## Pool Health Metrics

Liquidity Sentinel uses the following key metrics to assess and score pool health:

| Metric                   | Description                                                                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **Depth Score**          | Available liquidity within ±2% of current price, normalized against historical average.                             |
| **TVL Velocity**         | Rate of TVL change over the last 1h, 4h, and 24h windows — rapid declines are weighted heavily.                     |
| **LP Concentration**     | Percentage of pool LP tokens held by the top 5 wallets. High concentration signals elevated rug risk.               |
| **Reserve Ratio**        | For lending protocols: collateral value versus outstanding debt. Below 110% triggers a Warning.                     |
| **IL Accumulation Rate** | Speed at which impermanent loss is growing for your LP positions given current price trajectory.                    |
| **Volume/TVL Ratio**     | Trading volume relative to pool size — extreme ratios in either direction can indicate manipulation or pool stress. |
