Bancor Exchange Trade Data

Bancor API Logo

Bancor API

Information
Network
Ethereum
Source type
DEX
Volume 24h
$ 0
Pairs available
343
Trades 24h
0
Exchange Information

What is Bancor?

Bancor is a decentralized liquidity network and protocol. It allows users to convert one token directly into another without the need for exchanges. Bancor was founded in 2017 by Eyal Hertzog, Guy Benartzi, and Galia Benartzi. The name "Bancor" is inspired by the proposed supranational currency from the 1940s. It aims to provide continuous liquidity and reduce price slippage in the decentralized finance (DeFi) ecosystem.

What are the benefits of using Bancor?

Bancor is a decentralized liquidity protocol built on the Ethereum blockchain. It offers several benefits that set it apart from its direct competitors in the decentralized finance (DeFi) space.

One of the key benefits of Bancor is its ability to provide continuous liquidity. Unlike traditional decentralized exchanges (DEXs) that rely on order books, Bancor uses an automated market maker (AMM) model. This means that users can trade directly against smart contracts, ensuring that liquidity is always available, even for less popular tokens. In comparison, other DEXs like Uniswap and Sushiswap rely on liquidity providers to create trading pairs, which may result in lower liquidity for certain tokens.

Another advantage of Bancor is its approach to impermanent loss mitigation. Impermanent loss occurs when liquidity providers face losses due to the divergence between the value of their deposited assets and the value of the same assets in the market. Bancor has introduced features like the v2.1 pools, Impermanent Loss Insurance, and single-sided exposure to reduce the impact of impermanent loss for liquidity providers. This sets it apart from other AMMs that do not offer such solutions.

Furthermore, Bancor allows for the creation of new liquidity pools with just a single token. This feature, known as single-sided liquidity provision, makes it easier for users to provide liquidity without needing both sides of a trading pair. In contrast, other AMMs often require users to provide equal amounts of two different tokens, which can be limiting for those who only have one token.

Overall, Bancor's continuous liquidity, impermanent loss mitigation, and single-sided liquidity provision make it a compelling option in the DeFi space, setting it apart from its direct competitors like Uniswap and Sushiswap.

How does Bancor work?

Bancor is a decentralized liquidity protocol that operates on the Ethereum blockchain. It utilizes an automated market maker (AMM) model to enable continuous liquidity for tokens.

At the core of Bancor's functioning is the concept of liquidity pools, which are decentralized reserves of tokens held by smart contracts. These pools are composed of two different tokens, referred to as the base token and the quote token.

The Bancor protocol uses a dynamic algorithm to determine the exchange rate between these tokens. The algorithm adjusts the price based on the ratio of the token balances in the pool. This means that as one token becomes more scarce, its price increases relative to the other token.

Users can also provide liquidity to these pools by depositing an equal value of both tokens. In return, they receive liquidity provider (LP) tokens that represent their share of the pool. These LP tokens can be later redeemed for their proportional share of the underlying assets and the fees generated by the pool.

One key feature of Bancor is its ability to provide liquidity for less liquid or newly launched tokens. By allowing tokens to be used as quote tokens, even if they don't have an existing market, Bancor enables immediate and continuous liquidity.

Bancor's underlying technology, the Ethereum blockchain, provides the necessary infrastructure for executing smart contracts and maintaining the integrity and immutability of transactions. The protocol is open-source, allowing anyone to build on top of it and create decentralized applications (dApps) that leverage its liquidity capabilities.

In summary, Bancor utilizes an AMM model on the Ethereum blockchain to provide continuous liquidity through liquidity pools. Its algorithm adjusts the token exchange rates based on their balances in the pool, and users can participate by providing liquidity and earning rewards.

How does DIA fetch Bancor trade data?

DIA utilizes a comprehensive approach to fetch trade data from various DeFi and NFT exchanges. The specific process differs depending on the type of exchange being referred to.

For centralized exchanges like Coinbase, Kraken, and Binance, DIA employs scrapers that directly collect trades from exchange databases 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 and real-time availability.

In the case of decentralized exchanges, DIA retrieves data from multiple blockchains by subscribing to swap events in liquidity pools. This approach allows for direct access to trading data from the blockchain itself, enhancing data accuracy. Notable decentralized exchange sources include Uniswap, curve.finance, and PancakeSwap.

When it comes to NFT marketplaces, DIA captures live trading data by monitoring the integrated marketplaces' smart contracts. The retrieval period typically ranges from 20 seconds to 1 minute, ensuring coverage of all NFT transactions happening in real-time. By focusing on the broader NFT market rather than relying on unreliable bids and offer data, DIA maintains data precision. Prominent NFT integrated exchange sources include Blur, X2Y2, OpenSea, and TofuNFT.

This comprehensive data management strategy enables DIA to provide highly accurate and customizable price feeds, ensuring that users have access to reliable and up-to-date trade data from both DeFi and NFT exchanges.

How build oracles with Bancor data?

DIA uses a two-step process to build price oracles using Bancor trade data, which varies depending on the type of exchange we are referring to.

For DeFi exchanges, DIA first applies data cleaning and outlier detection techniques to ensure the price estimation process is resilient against trades with prices that deviate from the current market price. This step involves removing data points and entire sets that lie outside an acceptable range relative to the interquartile range. By applying an Interquartile Range (IR) filter, DIA excludes outliers and only includes trades that fall into the "middle" quartiles for further processing.

Next, DIA applies trade-based price determination methodologies to compute a single USD price value for each asset. One such methodology is the Volume Weighted Average Price (VWAP), which considers the different volumes of trades. All trades from a queried time range are collected and weighted by their volume, and the weighted average price is calculated. Another methodology is the Moving Average with Interquartile Range Filter (MAIR), where trades are first ordered by timestamp, grouped into blocks, and then the weighted average price is determined for each block.

On the other hand, for NFT collections, the process of building price oracles is different. DIA determines the floor price of an NFT collection by processing the retrieved on-chain trade data in two steps. Firstly, the data is cleaned using filters to exclude market outliers and manipulation techniques. Secondly, a pricing methodology is applied to determine the final price point.

DIA offers various pricing methodologies for NFT collections, including the Floor Price, which provides the lowest sale price recorded on the blockchain during a given time window. Additionally, DIA offers the Moving Average of Floor Price, which returns the moving average of a collection's floor price, customizable based on parameters such as the length of the average and the size of the floor window. DIA also applies an interquartile range outlier detection filter to filter out malicious behavior such as wash trading.

In summary, DIA builds price oracles with Bancor trade data by applying data cleaning techniques, outlier detection filters, and trade-based price determination methodologies. The process differs for DeFi exchanges and NFT collections, with specific methodologies tailored to each use case.

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