Prevent LP Price Manipulation
Robust LP Pricing
Last updated
Robust LP Pricing
Last updated
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.
For a pool of Token A and Token B, the traditional LP Valuation formula is:
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.
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.
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.
As soon as the two LP-price routes diverge beyond our threshold:
Mark the LP price as “unreliable”.
Block any new borrow or liquidation actions tied to those LP tokens to prevent an attacker from exploiting the temporary mispricing.
Pause until the pool rebalances (either through natural arbitrage or an admin-triggered rebalance), at which point the two LP-price calculations realign.
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.