Universal Data Feeds
The architectural flow for UDF can be divided into the following stages:
Data collection and processing
Data Collection and Processing
The primary role of Transmitter Agents is to establish and maintain a robust data pipeline on the Entangle blockchain, ensuring that incoming data is accurately processed and prepared for further use within the system.
Functions of Transmitter Agents
Transmitter Agents are responsible for the following tasks:
Data Collection:
Source: Fetch raw transactional data from various Centralized Exchanges (CEXes).
Storage: Store the collected data in local databases for further processing.
Data Preprocessing:
Aggregation: Aggregate trades by predefined time intervals to organize the data.
VWAP Calculation: Compute the Volume Weighted Average Price (VWAP) based on the aggregated data. This step is crucial for ensuring that the data is prepared and standardized before it is incorporated into the Data Feeds protocol.
Data Classification:
Deterministic Data:
This type of data is inherently reliable and does not require additional processing. It is directly stored on-chain due to its consensus-based acceptance.
Floating Data:
This data is volatile and lacks a definitive value. It requires preprocessing, such as aggregation and calculation, before it can be finalized and stored on the blockchain.
Importance in the Data Feeds Protocol
The preprocessing stage carried out by Transmitter Agents is essential for the integrity and accuracy of the data used within the Entangle blockchain. By transforming raw, unstructured data into a standardized format, Transmitter Agents enable smooth and efficient data flow, facilitating reliable blockchain operations.
The processed VWAP values and other derived metrics are then utilized in the subsequent stages of the Data Feeds protocol, playing a crucial role in the overall data pipeline.
Data Finalization
A specialized smart contract aggregates and finalizes data by processing votes from Transmitter Agents.
Process Workflow
Vote Collection:
The contract collects all votes submitted by Transmitter Agents for the current round.
Each vote represents a potential final value based on the data processed by the Transmitter Agents.
Vote Filtering: Filter votes within an accepted deviation range to ensure validity.
Final Value Determination: The final price value is determined using the median of the valid votes from the Transmitter Agents.
Incorporation of Additional Calculations: Depending on the specific use case, the finalization stage may involve additional calculations, such as aggregation and other mathematical operations, to refine the final value.
Rewardable Votes:
Votes that contribute to the final value are marked as rewardable.
Transmitter Agents who submitted these valid votes are entitled to receive rewards through a staking system, incentivizing accurate data reporting and participation in the network.
Data Distribution
After data finalization, a sequence of actions ensures that any necessary price revisions are made and disseminated to external systems.
Process Steps
Data Finalization Detection:
Transmitter Agents detect the
Data Finalized
event and assess the need for a price revision.
Price Revision:
If a revision is needed, Transmitter Agents submit new price votes to the Master smart contract.
The Master contract validates the votes, ensures consensus, and triggers an
Update
event.
Off-Chain Execution:
An off-chain Executor agent captures the
price update proposalApproved
event from the Master contract.The Executor sends the updated price data to an external blockchain via the EndPoint smart contract, which delivers it to the designated dApp.
This process maintains data integrity, reliability, and timeliness within the Entangle blockchain, supporting accurate data feeds for decentralized applications.
Last updated