# Uniswap V3 Pool Simulator ## Project Goal This project's goal is to help smart contract engineers develop an understanding and intuition of how Uniswap V3 pools work. It's intended to be a complement to the [whitepaper](https://uniswap.org/whitepaper-v3.pdf). Target audience: someone who is 1) reading the Uniswap V3 whitepaper, or would be interested in reading it, and 2) has written basic solidity code before. ## Why it Matters It's a virtuous cycle: helping engineers understand how Uniswap V3 works means more people will build on top of it. ## Links * [Uniswap V3 Simulator](http://uniswap-v3-simulator.omarish.com) * [omarish/uniswap-v3-simulator](http://github.com/omarish/uniswap-v3-simulator) ## Feature: Tick Calculator on V3 Simulator As it is right now in [9dcc28c9](https://github.com/omarish/uniswap-v3-simulator/commit/9dcc28c96ac21d751d88f9c3e65f0d500b3e1da0), the simulator does not yet support trading simulation. Let's add an action that fires when a trade goes through. Maybe something like: ```typescript type TradeParams = { sender: string, token0: number, token1: number, // other trade params we might need } const trade = createAction<TradeParams>('TRADE') ``` We'd also want to make some changes to reducers: * Add an attribute to the [default state](https://github.com/omarish/uniswap-v3-simulator/blob/master/src/redux/reducers.ts#L100) of the ticksReducer that tracks the current tick. * Add a listener to the ticksReducer for the trade event that updates the tick upon trades. * Add something to the `globalReducer` that takes into account `feeGrowthGlobal`, and to the `positionsReducer` as well. ## Other Feature Ideas * Make it work on `testnet` * Keyboard shortcuts (right now you have to do everything w/mouse) Feel free to propose other features.