Case Study: Chainlink Data Streams Demo dApp

Cover Image for Case Study: Chainlink Data Streams Demo dApp

Introduction

The Chainlink Data Streams Demo dApp, developed by HackBG, is a project that is demonstrating the utilization of Chainlink’s Data Streams. It highlights the potential of low-latency, hybrid price feed solutions in a full-stack context. The project is designed to revolutionize the way DeFi applications interact with real-time pricing data.

Project Specifications

  • Functionality: The dApp leverages Chainlink Data Streams to provide pricing information for eligible tokens and pairs, updating at least once per second. This data is stored off-chain and can be pulled on-chain as needed, cryptographically verifiable for correctness.
  • Development Aspects: HackBG developed separately a Chainlink SDK Datastreams consumer, which allows developers to authenticate to the Chainlink Data Streams API, fetch reports from feeds, and decode them to a format that is usable in a JavaScript environment. The Data Streams Demo dApp also involved front-end development with Next.js, WalletConnect integration, and API integrations with Binance and Coinbase.
  • Technologies Used: The project is built on technologies such as Solidity, Hardhat, Next.js, along with Chainlink Automation, Chainlink Datastreams SDK and TypeScript.

Development Process

  • The Data Streams dApp is part of HackBG‘s ongoing collaboration with Chainlink, focusing on building practical tools and demos with user friendly interface and easy integration with the Chainlink network. The project tackles the dual challenge of delivering cryptographically verifiable pricing reports from centralized exchanges like Binance and Coinbase and enabling secure, efficient trade execution in DeFi platforms. This capability is crucial in preventing front-running scenarios, allowing users to trade without the risk of being compelled to sell at lower or buy at higher prices due to market movement.

Unique Features and User Experience

  • Trading Mechanism: The dApp offers a novel approach to trading on-chain. It prevents front-running by providing the option to subscribe off-chain to specific price feeds, receiving cryptographically signed aggregated reports. These reports can be used to execute trades with a predetermined price, ensuring transparency and security in trading.
  • Automated Trade Execution: The dApp includes a smart contract with Uniswap trade functionality automated via Chainlink Automation. This setup allows for trades to be executed only if the on-chain price matches the price at the time of trade initiation, guaranteeing the trade execution at the intended price.
  • Comprehensive Price Comparison: The Web app compares price feeds from Coinbase, Binance, and Chainlink Data Stream API, providing a rich interface for users to perform secure trading actions at a set price. If the price is different, the transaction will fail.

Technological Innovation and Impact

This dApp is a testament to HackBG‘s ability to deliver advanced blockchain solutions that address critical challenges in the DeFi space. By leveraging Chainlink’s Data Streams, HackBG has created a platform that not only enhances the security and efficiency of on-chain trading but also opens up new possibilities for DeFi applications.

Project Vision

The vision behind this project is to enhance the reliability and functionality of DeFi applications by providing them with a tool to access real-time, accurate, and secure pricing data. This innovation aims to foster a more robust and trustworthy DeFi ecosystem, paving the way for more advanced financial applications utilising the price oracles and blockchain.

Project Repository

Have a project in mind?

We have the expertise! Drop us a line and lets talk!