# Prevent LP Price Manipulation

On Cardano, most liquidity pools remain thin, making LP token valuations vulnerable to price manipulation. At Danogo, we’ve developed a straightforward yet robust method that anchors LP valuations to true market prices and prevents LP price manipulation.

### 1. Traditional LP Valuation

For a pool of Token A and Token B, the traditional LP Valuation formula is:<br>

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

### 2. The Manipulation Problem in Thin Pools

In low liquidity pools, a large swap can skew the “reserve price” far away from the external market price. If an attacker dumps Token A into the pool, the pool’s A/B ratio changes, causing the total value of Pool from traditional LP valuation to diverge from reality.

As a result, LP tokens minted or burned at that moment end up over- or under-valued.

### 3. Danogo’s Corrected LP Pricing Method

#### 3.1. Dual-Route LP Price Calculation

To protect against pool manipulation, we use dual-route LP Price calculation by valuing on each side of the pool against the chosen reference asset (the asset in which you wish to express LP value—e.g., ADA).&#x20;

Under normal market conditions—when no one is pushing the pool’s ratio away from fair value, both sides are equal.

The LP value against token X:

* Side A valuation

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

* Side B valuation

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

The price on both sides should be nearly identical, however in practice, we allow a small tolerance ε (e.g., 0.5 %) so micro-slippage doesn’t trigger false alarms.&#x20;

#### 3.2. Detecting Manipulation

When large swaps can skew one reserve drastically, causing:

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

for some small threshold e. Such a divergence signals potential price manipulation on one side of the pool.

### 4. Protective Response

As soon as the two LP-price routes diverge beyond our threshold:

1. Mark the LP price as “unreliable”.
2. Block any new borrow or liquidation actions tied to those LP tokens to prevent an attacker from exploiting the temporary mispricing.
3. Pause until the pool rebalances (either through natural arbitrage or an admin-triggered rebalance), at which point the two LP-price calculations realign.

### 5. Outcome & Benefits

* Accurate valuation: We ensure LP tokens never trade at an inflated value driven by one-sided pool manipulation.
* Loan safety: By blocking borrow/liquidation under suspicious conditions, we protect lenders and borrowers from unfair liquidations.
* Market integrity: Once the pool returns to equilibrium, all operations resume seamlessly—preserving both uptime and user trust.<br>

With this dual-route pricing and automatic protective mechanism, Danogo delivers reliable LP valuations and a safer lending environment—even in Cardano’s thinnest pools.

\
\
\ <br>


---

# 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://docs.dano.finance/blogs/prevent-lp-price-manipulation.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.
