MEV Analysis API Test
Setup Required: Add these to your .env.local file:ALCHEMY_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY_HERE
FLASHBOTS_PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE
FLASHBOTS_RELAY_URL=https://relay.flashbots.net (optional)
Enter any Ethereum transaction hash to analyze its MEV potential
MEV Score Factors
High MEV Potential (7-10):
- High transaction value (>100 ETH)
- Complex contract interactions
- High gas usage (>100k gas)
- Premium gas price (2x+ base fee)
Low MEV Potential (0-3):
- Simple value transfers
- Low transaction value
- Standard gas usage
- Normal gas pricing
API Usage
Single transaction analysis:
GET /api/mev?txHash=0xYOUR_TX_HASHBatch analysis (up to 10 transactions):
POST /api/mev
{ "txHashes": ["0xhash1", "0xhash2", ...] }Returns: { mevScore: number, recommendedGasPrice: string, metadata: Object }