Diffusion Exchange Trade Data

Diffusion API Logo

Diffusion API

Information
Network
Evmos
Source type
DEX
Volume 24h
$ 93.483
Pairs available
468
Trades 24h
42
Exchange Information

What is Diffusion?

Diffusion is a data oracle network that aims to provide accurate and reliable data to blockchain applications. It was founded in 2021 by DIA, a company that specializes in blockchain oracles and APIs. Diffusion's purpose is to act as a trustworthy source of external data for smart contracts and decentralized applications. The name "Diffusion" signifies the spreading and dissemination of verified data across the blockchain ecosystem.

What are the benefits of using Diffusion?

Diffusion offers several benefits compared to its direct competitors. Firstly, Diffusion provides real-time data streaming, allowing developers to efficiently transmit large volumes of data across various platforms. This ensures that the information is delivered quickly and accurately, enhancing the overall user experience.

Secondly, Diffusion offers comprehensive security features. It employs a robust encryption mechanism to protect data from unauthorized access or tampering. This ensures the integrity and confidentiality of the information transmitted via the Diffusion network.

Another advantage of Diffusion is its scalability. It can effectively handle high loads of data and scale with the increasing demands of applications, making it suitable for both small-scale projects and large-scale enterprise applications.

Furthermore, Diffusion supports seamless integration with existing systems and frameworks. It provides a range of APIs and SDKs that simplify the development process and allow developers to leverage the power of Diffusion within their applications.

Compared to its competitors, Diffusion stands out with its advanced caching capabilities. This enables efficient data management and reduces the need for redundant data transfers.

In summary, Diffusion offers real-time data streaming, robust security features, scalability, seamless integration, and advanced caching capabilities. These benefits distinguish Diffusion from its direct competitors, making it a compelling choice for developers in need of reliable and efficient data transmission.

How does Diffusion work?

Diffusion is a decentralized market data oracle solution built on the Ethereum blockchain. As a blockchain oracle, Diffusion securely provides real-time data from external sources to smart contracts. It acts as a bridge between the off-chain world and the on-chain smart contracts.

The underlying technology behind Diffusion stems from the use of decentralized nodes known as oracles. These oracles fetch and verify data from various off-chain sources, such as financial markets and APIs. The process involves multiple nodes, ensuring the accuracy and reliability of the data provided.

To ensure the integrity of the data, Diffusion uses a consensus algorithm known as "proof of reputation." This algorithm verifies the reputation of each oracle based on their past performance and reliability. Oracles with a higher reputation have a greater influence on the consensus process, resulting in more accurate and trustworthy data.

Once the data is verified, it is made available on the Ethereum blockchain through Diffusion's price feed. Smart contracts can then access this data to make informed decisions and execute actions based on real-time market conditions.

The decentralized nature of Diffusion ensures that the data it provides is resistant to manipulation, censorship, and single points of failure. It enhances the security and transparency of blockchain applications that rely on external data sources.

In summary, Diffusion is a blockchain oracle solution that securely fetches and verifies real-time market data from external sources. It utilizes decentralized oracles and a reputation-based consensus algorithm to provide accurate and reliable data to smart contracts on the Ethereum blockchain.

How does DIA fetch Diffusion trade data?

DIA fetches trade data from Diffusion by employing a comprehensive approach to data management for creating price feeds. The process varies depending on the type of exchange being referred to.

For centralized exchanges like Coinbase, Kraken, and Binance, DIA utilizes scrapers that directly collect trades from the exchange databases. This is done using Rest APIs or WebSocket APIs. The frequency of data collection varies from 1 to 7 seconds, depending on the exchange. By retrieving data as close to the source as possible, DIA ensures high precision.

In the case of decentralized exchanges, such as Uniswap, curve.finance, and PancakeSwap, DIA collects data from various blockchains. It achieves this by subscribing to swap events in liquidity pools. This approach allows DIA to retrieve trading data directly from the blockchain itself, enhancing data accuracy.

When it comes to NFT marketplaces, DIA captures live trading data by monitoring the smart contracts of integrated marketplaces. The retrieval period typically ranges from 20 seconds to 1 minute. This ensures that DIA covers all NFT transactions happening in real-time on these marketplaces, providing accurate and up-to-date data. Notable NFT integrated exchange sources include Blur, X2Y2, OpenSea, and TofuNFT.

Overall, DIA's process of scraping trade data from Diffusion involves utilizing various techniques, such as direct database scraping, blockchain event subscription, and monitoring of smart contracts. These strategies enable DIA to provide highly accurate and customizable price feeds for a wide range of exchanges, both centralized and decentralized, as well as NFT marketplaces.

How build oracles with Diffusion data?

DIA uses a two-step process to compute trade data from Diffusion and build price feed oracles. The specific methodology differs depending on the type of exchange we are referring to (DeFi or NFT).

For DeFi exchanges, DIA starts by cleaning the data to remove any outliers or irregularities that could skew the price estimation. This involves detecting and excluding trades that deviate significantly from the median market price. To achieve this, DIA applies an Interquartile Range (IR) filter, which identifies and removes data points that fall outside an acceptable range relative to the interquartile range.

Once the data is cleaned, DIA applies price determination methodologies to compute a single USD price value for each asset. One example is the Volume Weighted Average Price (VWAP), which considers the different volumes of trades. This methodology calculates the weighted average price by multiplying the normalized volume of each trade by its executed price and dividing them by the sum of all volumes.

For NFT exchanges, DIA's process is different. The trade data retrieved from the blockchain is first processed using cleansing filters to exclude outliers and manipulation techniques. Then, a pricing methodology is applied to determine the final price point. The simplest methodology is the Floor Price, which provides the lowest sale price of an NFT collection within a given time window. However, this methodology is susceptible to manipulation, so DIA offers advanced techniques like the Moving Average of Floor Price. This methodology calculates the moving average of a collection's floor price, taking into account customizable parameters such as the length of the average and the size of the floor window.

In summary, DIA's process of computing trade data from Diffusion and building price feed oracles involves data cleaning, outlier detection, and the application of specific price determination methodologies tailored to the type of exchange (DeFi or NFT).

How does DIA source price oracle data?

Instead of distributing pre-calculated data feeds, DIA covers the whole data journey from individual trade collection, and computation to the last mile of the feed delivery.

Granular trade data collection
DIA retrieves token and NFT tradign data from 100+ exchanges. This enables DIA to build the most precise and customizable price feed oracles.
Instant, direct sourcing
DIA utilizes RPCs and WebSockets to subscribe to swap events and gather trading data from both DEX liquidity pools and CEX databases, allowing for real-time data collection.
Learn more about data sourcing