DeFi Data Overview (Labs)
Decentralized Finance (DeFi) is a rapidly emerging ecosystem of applications and protocols used for trading, lending, and various other financial services. Rather than relying on centralized intermediaries, these protocols utilize permissionless blockchains such as Ethereum to conduct the majority of their activities and transactions on-chain.
Our decentralized exchange (DEX) market data is collected directly from the blockchain and harmonized to match the format of our centralized exchange market data. Each liquidity pool contract is represented as a distinct market, with many pairs being traded across multiple liquidity pools with alternative fee structures.
Market coverage can be found by querying our
/catalog-all/marketsAPI endpoints. Decentralized exchanges can be identified as any market where the
experimentalparameter is set to
Currently we offer coverage of 3 DEX protocols:
Spot Market Count
In addition to returning standard metadata such as the market's base and quote asset, DEX market entries in the catalog also contain several DeFi-specific fields:
contract_address: The smart contract address of the liquidity pool contract.
fee: The fee percentage charged for each swap. Fees are distributed pro-rata to the pool's liquidity providers.
base_address: The address of the ERC-20 token contract associated with the base asset.
quote_address: The address of the ERC-20 token contract associated with the quote asset.
Many of our data types are available at the market level. For decentralized exchanges, we define a market as a specific liquidity pool contract deployed on a specific decentralized exchange, like
sushiswap_v1_eth-srm-weth-spot. The data types listed below are available for each DEX liquidity pool:
In addition to returning standard metadata such as the trade's size and price, DEX market entries in the catalog also contain several DeFi-specific fields:
block_hash: The unique hash of the block containing the swap transaction.
block_height: The height of the block containing the swap transaction.
txid: The transaction hash associated with the swap.
initiator: The Ethereum address which submitted the transaction, as a result of which the swap occurred.
sender: The Ethereum address that invoked the liquidity pool smart contract's function for swapping.
beneficiary: The Ethereum address credited with the output tokens upon the completion of a swap.
Coin Metrics calculates several metrics for exchange-asset pairs such as
uniswap_v2_eth-wbtc. The exchange coverage can be found by querying our
Data available at the exchange-asset level is available through the
/timeseries/exchange-asset-metricsAPI endpoint and specific metrics are described in the pages linked in this section:
Coin Metrics calculates several metrics for decentralized exchanges such as
sushiswap_v1_eth. The exchange coverage can be found by querying our
Data available at the exchange level is available through the
/timeseries/exchange-metricsAPI endpoint and specific metrics are described in the pages linked in this section: