How "Tuner" Library Works?
The overall design of the simulator consists of several components (rough dependency graph shown below), this does NOT necessarily 100% reflect how everything is implemented, but to give you an intuitive understanding of the relationships between the components and their corresponding purposes:
SimulatorClient
- The high-level and easiest way to use the simulator
|__ ConfigurableCorePool
- To give CorePool
snapshot and roadmap capabilities
|__ CorePool
- The re-implementation of Uniswap-V3-Core logic
|__ MainnetDataDownloader
- The download-and-update utility to retrieve mainnet events
|__ EventDBManager
- To persist mainnet event data using SQLite
|__ SimulatorRoadMapManager
- To take snapshots and do state-change roadmap tracking
|__ SimulationDataManager
- To persist snapshots and roadmaps using SQLite
There are 2 abstraction layers of the library:
Top-Level: SimulatorClient
SimulatorClient
This is a convenient way to get you started immediately. We have wrapped the underlying logic of data downloading, data pre-processing, and simulated Uniswap V3 pool together instantiation together, so you don't have to deal with the details.
Low-Level:
If you want more flexible ways to run your own simulation scenarios and have more granular control, you can wire things up manually as you like, by directly interacting with the below classes:
ConfigurableCorePool
MainnetDataDownloader
SimulatorRoadMapManager
Last updated