Flare Studio Logo
Analytics Dashboard

Flare Data Connector (FDC) Overview

The bridge between traditional web data and blockchain smart contracts. Bring any API data onto the Flare network with cryptographic proof.

What is FDC?

The Simple Explanation

Think of FDC as a trusted messenger that can fetch data from any website or API and deliver it to your smart contracts with a cryptographic proof that the data is authentic.

It's like having a notary public for internet data - it verifies that the information came from the source you requested and hasn't been tampered with.

Real-World Analogy

Imagine you want to build a DeFi app that uses stock prices from Yahoo Finance.

With FDC, you can tell it: "Go get me Apple's current stock price from Yahoo Finance" and it will bring back the price along with proof that it really came from Yahoo.

How FDC Works: The Magic Behind the Scenes

1

Your Request

Your smart contract asks FDC to fetch specific data from a web API. You specify the URL, the data you want, and how to extract it.

2

FDC Fetches Data

FDC calls the API, gets the response, and creates a cryptographic proof (attestation) that proves the data came from that specific source at that specific time.

3

Verified Delivery

The data and its proof are delivered to your smart contract. Your contract can verify the proof to ensure the data is authentic before using it.

📊 FDC Data Flow Diagram

Diagram showing FDC data flow from API to smart contract

Why FDC is Revolutionary

Any API, Any Data

Connect to REST APIs, JSON endpoints, or common web services. Stock prices, weather data, sports scores, and more. If it is available online, FDC can bring it on chain in a trusted way.

Cryptographic Proof

Every piece of data comes with a verifiable attestation. This removes blind trust and makes it possible to prove that your data is authentic using mathematics.

Fresh Data When Needed

Fetch updated information when your contract requires it. This keeps your smart contracts connected to data that changes often.

Cost Effective

Pay only for the data you use. There is no need to run your own oracles or manage separate infrastructure for every data source.

Decentralized

Multiple independent attestation providers reduce the chance of failure. Your data remains reliable and available even if one provider has issues.

Developer Friendly

Simple integration into your smart contracts. Clear documentation and flexible options make it easy to start building with FDC.

What Can You Build with FDC?

Real-World Applications

  • DeFi Protocols using real stock prices or forex rates
  • Insurance dApps that pay out based on weather data or flight status
  • Gaming & NFTs with real-world event integration
  • Prediction Markets based on sports outcomes or election results

Innovative Ideas

  • Supply Chain tracking with real shipping API data
  • Social Media integrations for on-chain reputation
  • IoT Devices reporting sensor data to smart contracts
  • Your Imagination - any web data can become blockchain data!

FDC in Action: Simple Example

Here's a basic example of how you might use FDC to get cryptocurrency prices from an external API:

Loading...

Understanding This Example

Lines 1-8: We define the FDC interface so our contract knows how to talk to it

Lines 10-17: Our contract stores the FDC address and sets up the owner

Lines 19-26: We ask FDC to fetch Bitcoin price from CoinGecko API

Lines 29-33: FDC calls this function back with the verified price data

FDC vs Traditional Oracles

FeatureFlare Data ConnectorTraditional Oracles
Data SourcesAny web API or endpointPre-defined data feeds only
Setup TimeMinutes to integrate new APIsDays or weeks for new feeds
CostPay-per-use modelSubscription fees
FlexibilityFull control over data parsingLimited to provider's format
VerificationCryptographic attestationsTrust in oracle provider

Extra Explanations

Attestation Provider

An attestation provider is a trusted service on Flare that collects data from the real world or other blockchains, then sends that data on chain. It helps smart contracts use information outside their own network.

Cryptographic Proof

A cryptographic proof is a math based way to prove something is true without showing every detail. It keeps information secure and verifiable.

API Rate Limits

Some services only allow a limited number of requests within a short time. Sending too many requests may cause slow responses or temporary blocks. Always handle errors and add retries in your code.

Continue Your FDC Journey