Skip to content

Commit

Permalink
Added first draft for pooler
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoderpanda committed Nov 22, 2023
1 parent c126892 commit ca5460c
Showing 1 changed file with 40 additions and 12 deletions.
52 changes: 40 additions & 12 deletions docs/Build-with-Powerloom/UniswapV2 Dashboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,46 @@ sidebar_position: 0

## Pooler - UniswapV2 Data Market

Pooler is a Uniswap specific implementation of what is known as a 'snapshotter' in the PowerLoom Protocol ecosystem. It synchronizes with other snapshotter peers over a smart contract running on the present version of the PowerLoom Protocol testnet.

It follows an architecture that is driven by state transitions which makes it easy to understand and modify.

This present release ultimately provide access to rich aggregates that can power a Uniswap v2 dashboard with the following data points:
### Introduction to Pooler: Technical Documentation

- Total Value Locked (TVL)
- Trade Volume, Liquidity reserves, Fees earned
- grouped by
- Pair contracts
- Individual tokens participating in pair contract
- aggregated over time periods
- 24 hours
- 7 days
- Transactions containing `Swap`, `Mint`, and `Burn` events
**What is Pooler?**

Pooler is a Uniswap-specific implementation within the PowerLoom Protocol ecosystem, designed as a snapshotter. It functions by synchronizing with other snapshotter peers over a smart contract on the PowerLoom Protocol testnet. This architecture, guided by state transitions, is both easily comprehensible and modifiable.

:::tip
**Pooler in a Nutshell**
Forex, the foreign exchange market, involves currency trading and is known for its high liquidity and 24/7 operation. Pooler, in a parallel sense, operates continuously, capturing snapshots of Uniswap trades. Like Forex traders who analyze currency fluctuations to make profits, Pooler users can analyze trade volumes, liquidity reserves, and other metrics to understand market trends and potential profits in the Uniswap market.

In essence, Pooler is to Uniswap what Forex platforms are to currency trading – a tool for real-time tracking and analysis, facilitating better understanding and potentially profitable decision-making in the dynamic world of cryptocurrency trading.
:::


**Core Features:**

- **Data Point Synchronization:** Pooler calculates, updates, and synchronizes each data point with other snapshotter peers. This synchronization is based on epoch IDs, representing a collection of blocks on data source blockchains like Ethereum Mainnet, Polygon Mainnet, etc.

- **Decentralized Nature:** The decentralized approach of Pooler means datasets are stored on IPFS/Filecoin, leveraging decentralized storage networks to their fullest.

- **Versatile Use Cases:** Pooler supports various applications, from dashboards offering aggregate data points to trading strategies and bots. It also allows loading of historical data from past epochs, indexes, and aggregates.

**Getting Started with Pooler:**

Setting up Pooler involves a distributed system with several components. The simplest way to get started is through Docker-based setup from the [deploy repository](https://github.com/PowerLoom/deploy). For developers, a more hands-on approach involves manual configuration steps outlined in the Pooler documentation, followed by instructions from the deploy repository.

**Key Components of Pooler:**

1. **Epoch Generation:** Manages block height ranges on the data source blockchain.
2. **Preloading:** Crucial for fetching low-level data like block details and transaction receipts.
3. **Base Snapshot Generation:** Involves creating basic data models from state observations and event logs.
4. **Snapshot Finalization and Aggregation:** Ensures data consistency and builds higher-order data points.
5. **Major Components:** Includes System Event Detector, Process Hub Core, Processor Distributor, Delegation Workers, Callback Workers, RPC Helper, and Core API.

**API and Dashboard:**

The Core API is a crucial element, allowing access to finalized protocol states on the anchor chain’s smart contract. Pooler’s functionality can be observed in action through the Uniswap v2 dashboards, like [uniswapv2.powerloom.io](https://uniswapv2.powerloom.io/), powered by the Pooler foundation's API.

**Development and Extension:**

Pooler’s design enables extensions and custom use case implementations. It offers a detailed guide for extending its capabilities, particularly with Uniswap v2 data points. Developers can add new configurations and data models as needed, ensuring Pooler’s adaptability to various requirements.

0 comments on commit ca5460c

Please sign in to comment.