📖
Bella "Tuner" - A Uniswap V3 Simulator
  • Getting Started
    • Overview
    • How "Tuner" Library Works?
    • Installing "Tuner"
    • Quick Start
  • Configuration
    • Configuration
  • Guides
    • (Basic)For anyone who is interested in the Uniswap v3 model
      • Building a client instance
      • About Core Pool Config
      • Getting a Core Pool instance
      • Interacting with Core Pool
    • (Typical)For a quant developer who works on a real pool on mainnet
      • Fetching all the data of a certain pool from Ethereum
      • Getting a pool instance with the data fetched
      • Loading and streaming events into a pool
    • (Advanced)For a better user experience as a state machine
      • PoolState & Transition
      • Post-processor
      • Forking & Retracing
      • Persisting & Recovering
      • SimulatorRoadmapManager
  • Performance
    • Performance
  • Examples
    • Uniswap-v3-Events-Downloader
    • Uniswap-v3-Strategy-Backtest
    • Uniswap-v3-Risk-Analysis(will be available soon)
  • Contributing
    • Contributing
Powered by GitBook
On this page
  • Top-Level: SimulatorClient
  • Low-Level:
  1. Getting Started

How "Tuner" Library Works?

PreviousOverviewNextInstalling "Tuner"

Last updated 3 years ago

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

|__ 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:

This is a convenient way to 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

Uniswap-V3-Core logic
SimulatorClient
get you started