A collection of TypeScript utilities for MEV (Maximal Extractable Value) research and DeFi protocol monitoring on EVM-compatible blockchains.
This toolkit provides real-time monitoring capabilities for blockchain events critical to MEV research, including:
- Price feed updates from Chainlink-style oracle aggregators
- Liquidation events from lending protocols (Aave-fork compatible)
- Mempool analysis for pending transactions
- Historical event querying for protocol research
Monitors AnswerUpdated events from Chainlink-compatible price feed aggregators in real-time.
Use Case: Track when oracle prices are updated on-chain to identify potential MEV opportunities or validate price feed behavior.
cd "Aggregator AnswerUpdated Listener"
npm install
npm startMulti-chain liquidation event monitor supporting Fantom, Metis, and Optimism networks. Listens for LiquidationCall events from Aave-fork lending pools (Granary Finance, Geist, etc.).
Use Case: Real-time monitoring of liquidation activity across multiple DeFi protocols for research or alerting purposes.
cd "Event Listener"
npm install
npm startMonitors pending transactions in the mempool targeting specific aggregator contracts. Decodes transaction data to extract price updates before they are confirmed.
Use Case: Analyze pending oracle updates to understand MEV searcher behavior and front-running dynamics.
cd "Mempool listener"
npm install
npm startQueries historical LiquidationCall events from lending pool contracts using batch block queries.
Use Case: Research historical liquidation patterns, analyze protocol health, or backtest MEV strategies.
cd "Historical Event Logger"
npm install
npm start- Node.js (v14 or higher)
- npm or yarn
- RPC endpoints for target networks (e.g., QuikNode, Alchemy, Infura)
Each module uses environment variables for configuration. Create a .env file in the root of each module or export variables in your shell:
# Fantom Network
export FANTOM_RPC_URL="https://your-fantom-rpc-endpoint"
export FANTOM_WS_RPC_URL="wss://your-fantom-websocket-endpoint"
# Optimism Network
export OPTIMISM_RPC_URL="https://your-optimism-rpc-endpoint"
# Metis Network (public endpoint available)
export METIS_RPC_URL="https://andromeda.metis.io/?owner=1088"
# Contract Addresses (optional - defaults provided)
export AGGREGATOR_ADDRESS="0x..."
export LENDING_POOL_ADDRESS="0x..."
export START_BLOCK="53000000"MEV-Tools/
├── Aggregator AnswerUpdated Listener/
│ ├── src/
│ │ └── listen.ts # Price feed event listener
│ ├── contracts/abis/ # Chainlink aggregator ABIs
│ └── package.json
├── Event Listener/
│ ├── src/
│ │ └── listen.ts # Multi-chain liquidation monitor
│ ├── contracts/abis/ # Lending pool ABIs
│ └── package.json
├── Mempool listener/
│ ├── src/
│ │ └── listen.ts # Pending transaction analyzer
│ ├── contracts/abis/ # Aggregator ABIs
│ └── package.json
├── Historical Event Logger/
│ ├── src/
│ │ └── logEvents.ts # Historical event query tool
│ ├── contracts/abis/ # Lending pool ABIs
│ └── package.json
└── README.md
- ethers.js (v5.5.4) - Ethereum library for blockchain interaction
- ts-node - TypeScript execution environment
- TypeScript - Type-safe JavaScript
| Protocol | Network | Contract Type |
|---|---|---|
| Chainlink Aggregators | Fantom | Price Feeds |
| Granary Finance | Fantom, Metis, Optimism | Lending Pool |
| Geist Finance | Fantom | Lending Pool |
AnswerUpdated(int256 current, uint256 roundId, uint256 updatedAt)- Oracle price updatesLiquidationCall(address collateralAsset, address debtAsset, address user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken)- Lending liquidations
This project is for educational and research purposes.
Built for MEV research and DeFi protocol analysis.