Vicuna Finance lost $700K due to LP token oracle manipulation that ignored invariant-based pricing
price_lp = price_token1 * amount_token1 + price_token0 * amount_token0
instead of fair pricing that accounts for the underlying pool’s constant product formula.
Exploitation Steps:
$S
market and the stablecoin market - draining approximately $700K in total. The fundamental issue was that the oracle treated LP tokens like regular assets without considering that their value should reflect extractable value, not just the sum of underlying token values.
ph.forkTxPre()
to get the oracle price before any callsph.forkCallPost()
to see how each call changed the oracle price