-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(wip) protocol level details along with dynamic data markets
- Loading branch information
Showing
12 changed files
with
122 additions
and
7 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
docs/Protocol/Specifications/Snapshotter/implementations.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Data market specific implementations | ||
|
||
![Submodule architecture of snapshotter](/images/submodule_architecture.png) | ||
|
||
The Snapshotter Peer is designed with a modular and highly configurable architecture, allowing for easy customization and seamless integration with a diverse set of data markets. | ||
|
||
## Snapshotter Core | ||
|
||
This foundational component defines all the essential interfaces and handles a wide range of tasks, from listening to epoch release events to distributing tasks and managing snapshot submissions. Read more about it in the detailed section on its [components](/docs/Protocol/Specifications/Snapshotter/components.md). | ||
|
||
|
||
## Data market specific | ||
|
||
Use case specific logic of generating snapshots as well as other configuration are available as [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) which can be pulled in as desired. Presently you can find diverse use cases that serve customized datapoints and track activity for the following across multiple data source chains like Ethereum Mainnet, Polygon zkEVM, Polygon PoS etc. | ||
|
||
* DEXs like Uniswap v2, Quickswap | ||
* Bridges like bungee.exchange, Owlto finance | ||
|
||
The architecture has been designed to facilitate the seamless interchange of configuration and modules. Adapting the system to different use cases is as straightforward as changing a Git branch. | ||
|
||
### Configuration Files | ||
|
||
Configuration files, located in the `/config` directory are linked to [snapshotter-configs](https://github.com/PowerLoom/snapshotter-configs/) repo, play a pivotal role in defining project types, specifying paths for individual compute modules, and managing various project-related settings. | ||
|
||
|
||
### Compute Modules | ||
|
||
The heart of the system resides in the `snapshotter/modules` directory that's linked to [snapshotter-computes](https://github.com/PowerLoom/snapshotter-computes/), where the actual computation logic for each project type is defined. These modules drive the snapshot generation process for specific project types. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Snapshot composition | ||
|
||
The protocol state collects finalized snapshots for incremental epochs against contracts configured as data sources. These snapshots can be further composed with either one or a combination of the following strategies | ||
|
||
* primitives like map-reduce, summation, filter etc | ||
* a specific span of epochs to denote a time period, for eg, 24 hours | ||
* and anything else you can think of...! | ||
|
||
## Single project composition | ||
|
||
We can compose snapshots on top of base snapshots for a single contract. | ||
|
||
![single project composition](/images/single_project_composition.png) | ||
|
||
## Multiple projects composition | ||
|
||
As defined by the data sources configuration, the protocol state collects snapshots across multiple smart contracts which can be further composed according to the strategies outlined in the beginning of this page. | ||
|
||
![Multiple projects snapshots](/images/multi_projects_snapshots.png) | ||
|
||
## Higher order aggregations | ||
|
||
An example of this can be found in the [Uniswap V2 dashboard implementation](/docs/Build-with-Powerloom/UniswapV2%20Dashboard/index.md) where trade activity aggregation dataset is generated by | ||
|
||
* combining individual snapshots of trade volume and feees across multiple pair contracts | ||
* spanning a specific set of epochs that satisfy a time duration, for eg, 24 hours | ||
|
||
Since all snapshots are finalized on an epoch basis, you can weave together snapshots across multiple contracts and accurately derive complex data compositions without approximations. | ||
|
||
![Multiple projects composition](/images/multi_projects_composition.png) | ||
|
||
### Dependency graph | ||
|
||
All of this is controlled by the dependency graph as specified in the data market's configuration of data sources. | ||
|
||
![Data composition dependency graph](/images/DependencyDataComposition.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.