../Vastavikamaina_Token_Writeup

Vasthavikamaina Token Exploit

Overview

This exploit leverages a critical vulnerability in the addVasthavikamainaLiquidity function to manipulate AMM pool economics and extract profit without bearing the debt burden. The system creates three different machines (pools), but one of them, named “CowrieBO” (uniPair2), is set up with very little starting money; only 0.05 ETH. This makes it very easy to manipulate.

The Vulnerability

The addVasthavikamainaLiquidity function contains a fatal flaw:

Attack Steps

1. Initial Setup

2. Price Manipulation

3. Liquidity Amplification (Core Exploit)

factory.addVasthavikamainaLiquidity(VSTETH, lamboToken, 300 ether, 0);

4. Profit Extraction

Why This Works

  1. Debt Isolation: The 300 ETH debt belongs to the Uniswap pair, not us
  2. K-Value Manipulation: Adding massive liquidity at inflated prices creates favorable AMM constants
  3. Permanent Enhancement: Burned LP tokens mean the enhanced liquidity can’t be withdrawn
  4. Arbitrage Profit: Selling back tokens yields more ETH than originally invested due to the deeper, manipulated pool

Economic Impact

Target Pool

Pool 2 (CowrieBO) is optimal because: