Prevent LP Price Manipulation

Robust LP Pricing

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:

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).

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

  • Side B valuation

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.

3.2. Detecting Manipulation

When large swaps can skew one reserve drastically, causing:

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.

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.

Last updated