tenthirtyone / unimon

Monitor Uniswap for price changes between DAI, WETH and USDC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UniMonitor

This class monitors the price of WETH -> DAI, WETH -> USDC, and DAI -> USDC on the Ethereum mainnet. It can calculate the potential arbitrage opportunities and slippage amount for a given amount (1 WETH in this example). It will update on every new block.

Installation

Clone this repository or download the code Run npm install to install the required dependencies Create a .env file in the root directory of the project and add the following line, replacing YOUR_INFURA_KEY with your Infura API key: makefile Copy code INFURA_KEY=YOUR_INFURA_KEY Run npm start to start the UniMonitor

Usage

I use nodemon to hot reload

$ nodemon src/index.ts

but you can also just use ts-node

$ ts-node src/index.ts

About

Monitor Uniswap for price changes between DAI, WETH and USDC


Languages

Language:TypeScript 100.0%