Swan Network
English
  • Getting Started
    • Overview
    • Protocol Stack
      • Cross-chain Consensus Layer
      • Peer-to-peer (P2P) Network
      • Payment Channels
      • Service Discovery
      • Data Marketplace
      • Indexing and Caching Marketplace
      • Web3 Task Auction
      • Storage Layer
      • Computing Layer
      • CDN Layer
      • Economic System
        • Grants
        • Computing Jobs
        • Universal Basic Income (UBI)
        • Swan Provider Income
      • Token
      • Governance
        • Treasure DAO
      • Glossary
    • Contact Us
      • Social Accounts & Communities
      • Business Partnerships
    • FAQ
  • QuickStarts
    • Dive into QuickStarts
      • Swan Chain: Developing Smart Contracts with Go
  • Swan Storage Market
    • Overview
      • Swan Auction System
      • Reputation System
    • Key functionalities
      • Task Management
        • Create a New Task
        • Navigate Tasks
        • Update Tasks
        • Assign Tasks
      • My Profile
        • Register as a storage provider
      • Find Storage Providers
        • Storage Provider Details
      • Extend DataCap Terms Service
  • Swan IPFS Storage
    • Overview
      • Flink
    • Swan IPFS Storage User Guide
      • Networks
      • Setup MetaMask
    • Developer Quickstart
      • SDK
        • js MCS SDK
          • Prerequisites
          • Get Started
          • Bucket Storage
          • Onchain Storage
          • SDK JS Installation Tutorial Video
        • python MCS SDK
          • Quickstart
          • Bucket Storage
          • Onchain Storage
          • SDK Python Installation Tutorial Video
      • Additional Resources
    • Best Practice
      • Use Swan IPFS Storage as Platform Storage Solution
        • Single Organization Design
        • Multiple Organization Design
    • FAQ
  • Swan Provider
    • Overview
    • Features
    • Tutorial
      • Prerequisites
      • Installation
      • Configure and Run
      • Swan Provider Tutorial Video
    • FAQ
      • 1. Change the linked Email
      • 2. Check Storage Provider connectivity/stability
      • 3. How to stop accepting "auto-bid" deals?
      • 4. `aria2_download_dir` vs. `aria2_candidate_dirs`
      • 5. How to configure "import deals from Swan Provider" when Boostd is running normally
      • 6. A rejection msg always appears during the deal-importing process
      • 7. How to check if aria2 is running?
      • 8. No response from Swan Platform?
      • 9. Why Storage Provider status shows offline?
      • 10. How to check the Task Status?
      • 11. How to configure the Storage Provider Market?
      • 12. How to set the "ask price"?
      • 13.aria2_download_dir VS. aria2_candidate_dirs
      • 14. How to control the number of deals imported?
  • Swan Client
    • Overview
    • Basic Concepts
    • Tutorial
      • Filecoin Deal Sender
        • Installation
        • Configuration
        • Prerequisites
        • Generate CAR Files
        • Meta-CAR
        • Upload CAR Files to IPFS
        • Create a Task
      • Blockchain RPC Service
        • Deploy RPC Service
        • RPC Command Service
      • Swan Client Tutorial Video
    • FAQ
      • How to prepare data?
  • FS3
    • Overview
    • Setup your FS3
      • Prerequisites
      • Install FS3
      • FS3 Set up Video
    • FS3 User Guide
    • FS3 User Guide (Cloud Version)
  • Lagrange DAO
    • Overview
  • Development Resource
    • Swan Token Contract
      • Acquire Testnet USDC and MATIC tokens
    • Swan API
    • Swan IPFS Storage API
    • Swan IPFS Storage 2.0 API
    • Flink API
    • FS3 API
    • API keys
  • Swan Testnet
    • Swan Jupiter Testnet
      • How to Participate
      • Before You Get Started
      • Network Early Adopter
      • Computing Provider Setup
        • Prerequisites
        • Install the Kubernetes
        • Install and config the Nginx
        • Install the Hardware resource-exporter
        • Install the Redis service
        • Build and config the Computing Provider
        • Install AI Inference Dependency(Optional)
        • Start the Computing Provider
        • CLI of Computing Provider
        • FAQ
      • FAQ
Powered by GitBook
On this page
  • Introduction
  • What is Filecoin - Chainlink Data Provider
  • Sample Use Case
  • Design Structure
  • Data aggregator
  • Chainlink External Adapter - DATA DAO
  • Data DAO Notary
  • Roadmap

Was this helpful?

  1. Swan IPFS Storage
  2. Overview

Flink

A data provider DAO offers Chainlink Oracle service for Filecoin Network

PreviousOverviewNextSwan IPFS Storage User Guide

Last updated 23 days ago

Was this helpful?

Introduction

Flink is a data provider DAO aiming at offering Chainlink Oracle service for the Filecoin Network. Flink offers deal information on multi chains for users who want to store their data on Filecoin.

What is Filecoin - Chainlink Data Provider

Filecoin is the best option for users from blockchains like Ethereum, BSC, and Polygon to store large-scale data off-chain. Users can upload and retrieve data from the Filecoin network via sending deals. However, how to generate a cross-chain proof remains unresolved and has created a gap between users' storage needs and the Fileocin storage solution.

can allow access to high-quality data and enable extreme flexibility to connect smart contracts to premium web APIs. With Chainlink external adapter, user can check their deal information on oracle node operators.

Sample Use Case

Polygon NFTs USDC payment for Filecoin storage

The general process of saving NFTs on the Filecoin network is:

  • Lock a payment on the Polygon network

  • Swap tokens to Filecoin agent

  • Filecoin agents send NFT in deals to Filecoin storage providers

  • Get an on-chain deal ID

  • Chainlink oracle broadcasts the proof to Polygon network

  • Storage DAO notaries sign the data based on the deal info provided by Chainlink oracle

  • NFT payment unlocked to the Filecoin agent

Design Structure

Three must-haves to work as a Flink data provider:

  • Data aggregator

  • Chainlink external adapter

  • Data DAO notary

Several blockchain scanners will first aggregate the data to a unified data provider. Then the chainlink eternal adapter with oracle smart contracts will broadcast the proof to the targeted blockchain network. Afterward, Data notaries will sign the transaction based on the on-chain oracle data. The payment will be triggered once the on-chain proof is relayed from Chainlink oracles.

Data aggregator

When a FIlecoin agent sends the data to a storage provider, the data storage process starts. The storage provider needs to accept the deal and upload an on-chain deal acceptance confirmation, which means the deal is in progress and a deal id will be generated on the Filecoin network.

//{

    "status": "success",
    "data": {
        "deal": {
            "deal_id": 5210178,
            "deal_cid": "",
            "message_cid": "bafy2bzaceaotial6pogwzvm7woh5pf37sivrzm3fmp5teao365jl22z5q4pfc",
            "height": 1697382,
            "piece_cid": "baga6ea4seaqjffbc2mmed2piulix5qfppyuhbqumnppme5ngj3q2ol4udijjqbq",
            "verified_deal": true,
            "storage_price_per_epoch": 0,
            "signature": "",
            "signature_type": "",
            "created_at": 1649227860,
            "piece_size": "1073741824",
            "start_height": 1701360,
            "end_height": 3234661,
            "client": "f1g463yb4ok3lq3tffkvvfmfyngcagpx4kg7c7rei",
            "client_collateral_format": "000000000000000000",
            "provider": "f067375",
            "provider_tag": "",
            "verified_provider": 0,
            "provider_collateral_format": "000000000000000000",
            "status": 0,
            "network_name": "filecoin_mainnet",
            "storage_price": 0
        }
    }
}

Chainlink External Adapter - DATA DAO

After the data aggregator gets the deal information, an External adapter is needed for offering API access for data DAO notaries in the next step.

Data DAO Notary

Data DAO notary is in charge of signing the multi-sig wallet for unlocking the fund to Filecoin agents.

The DAO contract allows the community to add or remove notaries from the DAO. The DAO notaries will follow these steps before signing:

  • get deal_id by proposal_cid

  • get deal_id from Chainlink Filecoin adapter

    • if matches trigger DAO signature

      • match client_address

      • match deal_cid (proposal_cid)

    • otherwise, waiting for the next check cycle

Roadmap

  • March 14th,2022: The mainnet launch with the Polygon network

  • June 6th, 2022: Notary DAO setup

The data aggregator will scan the Filecoin deal information from different data sources and send the information as an API interface. Check the directory for the scan-related code. Typical deal info is in this format:

For detailed information about how to build and deployed External Adapter, please check the code in

data
http://35.168.51.2:7886/deal/5210178?network=filecoin_mainnet
the adapter
An External adapter
GitHub - filswan/flink: A data provider transfers deals info to chainlink oracleGitHub
Logo