Mole Network
Mole Network is an intrachain, cross-chain, and cross-network communication system that lets developers capture, manipulate, and store event data in a number of ways. It can act as an oracle, indexer, cross-chain bridge, and more.
What it is, exactly
Consumers
Mole Network lets users who need data from one or more on and off-chain sources get that data, transform it in whatever way they want, and send that transformed data to a destination which can be on-chain and (soon to be) off-chain. Let's call these user types Consumers.
Consumers create an ETL (Extract, Transform, Load) spec which describes what data sources to pull from, what functions to run that data through, and which destinations the output should be sent to. Data sources and destinations will include an expanding list of items, as the system is flexible enough for new items to be added easily.
Data sources can be events emitted on any EVM chain, as well as any web2 API endpoint.
Destinations can be any contract on any EVM chain. In the future, this could expand to anything that can receive a network request, including web2 endpoints, and non-EVM chains.
Data Reporters
Data Reporters fulfill Consumers' ETL specifications by providing network capacity via the MoleNet CLI
.
Incentives
Data Reporters do not do this work for free, especially since writing data on-chain costs gas. In order to incentivize Data Reporters to report their data, Consumers will fund their ETL Specs with tips that the Data Reporters will receive for fulfilling their data requests.
Conversely, Data Reporters will be incentivized to publish correct data by needing to stake some amount of tokens in order to be allowed to report. If another reporter thinks someone is being duplicitous, they can report them; triggering a dispute mechanism where the party at fault will lose their stake and the counter party will be rewarded for keeping the system in check.
The Vision
Oracle? Bridge? Keeper?
Mole Network is neither, all, and more. We're intentionally thinking about Mole Network as a flexible communication layer between arbitrary sources and destinations. As the project grows, we're excited to see what other use cases our community comes up with.
Governance and ownership
We fully believe in the power of decentralization, and we intend Mole Network to be owned by our users. Both Data Reporters and Consumers will be granted ownership based on how much they use the system, which will allow them to decide the future of the protocol.
Roadmap
Alpha
We are here. Much of the functionality this project needs is in progress, but we hope the idea is clear and the vision is present. Currently, things we know must be done are:
Assessing additional ways to reduce data manipulation such as requiring multiple reporters to submit a value before the data is written.
Creating the token mechanism by which Data Reporters become eligible to report.
Assessing the current ETL Spec format for any risks that it could pose to data reporters.
Creating a repository of ETL Specs so that Data Reporters can find jobs for them to run.
Beta
During beta, we'll be taking user feedback and incorporating it into the platform. We'll also be setting up the governance structure that will eventually make Mole Network a community-led project.
Launch
Launch is when we're community-run. What that means will be up those who make the governance body. For instance, this could mean turning off upgradability for and having Mole Network be a fully decentralized application. However this manifests, community ownership is the eventual goal for the network.
The Technical TL;DR:
At this time, there are three technical components that make the system work:
The MoleNet CLI
The CLI is a tool utilized by Data Reporters to provide network capacity to MoleNet. The CLI enables Data Reporters to fulfill ETL Specs provided by Consumers.
ETL Specs
ETL Specs are a piece of code which defines the sources, transformations, and destinations that a Consumer would like to be run so that they can get the data they need. Specs are currently standalone JavaScript modules, but this is likely to change in the future as MoleNet moves through and beyond Alpha (re: security/scalability concerns).
Scribe contracts
For data whose destination is on-chain, the data is sent to a Scribe contract. The Scribe receives transformed data, as well as the contract address it should be headed to, and the function which should receive the data. It's up to the Consumer to ensure that function handles receiving the data in the appropriate way.
A work in progress by Dan Cortes & Mitch Anderson