Real-Time Crypto Price Anomaly Detection Using Google Cloud Public Data With Band Protocol

Kevin Lu
Band Protocol
Published in
4 min readApr 15, 2021

--

We are proud to announce that Band Protocol has integrated into Google Cloud Public Data to enable immediate and accurate analysis of financial time series data. With Band Protocol oracle data live on Google Cloud Public Data; traditional, hybrid blockchain and cloud applications can be built to leverage unique data feeds from decentralized oracle services.

At Band Protocol, our teams are empowering researchers and developers to use decentralized oracles for any external data source or type, regardless if the application is natively built on the blockchain or Web 2, through the flexible design of Band Protocol oracles.

Accurate and reliable price discovery mechanisms are crucial to all capital markets. Google Cloud Public Data has a wealth of data available for unique analysis. This is especially interesting for real-time financial time series data using novel approaches to Machine Learning. In particular, a Keras model implementing an LSTM neural network for anomaly detection is provided. For this article, we will refer to the Band Protocol public dataset available on Google BigQuery.

More interestingly, the data derived from the auto encoder-decoder could be considered a dataset in and of itself. This dataset can then be used to support the creation of a new decentralized oracle through custom oracle scripts on BandChain — further expanding the capabilities and offerings provided by Band Protocol.

On-chain smart contracts on any blockchains supported by Band oracles will then be able to in turn have access to pre-trained neural network and anomaly detection systems to perform complex business logic in a trustless manner without relying on other extra external parties.

Take a decentralized insurance protocol as an example, claims can be triggered and conditioned based on data anomaly detection while computation on-chain remains relatively minimal with little overhead. The idea can be further generalized to different types of software to enable smart contracts to delegate complex or expensive computations to GCP and thus creating hybrid cloud-blockchain applications.

Diving Into the Technicals

The whole process can be broken down into two parts:

  • Part 1: Metrics calculation using Dataflow. The following metrics and technical indicators are included: Relative Strength Index (RSI), Moving Average (MA), and Open, High, Low, Close (OHLC).
  • Part 2: Anomaly detection. We are using an LSTM model implemented in Keras.

Check out Google Cloud’s article for the full breakdown of technical details:

References

This article is based on the work of Reza Rokni. For more examples of time series data processing in Dataflow refer to this repository:

Closing Remarks

With Band Protocol oracles fully integrated into Google Cloud Public Data, this is the first of many use-cases we are exploring with partners to bridge traditional enterprises and blockchain applications. Our focus is to continuously and rapidly expand the support of data available on BandChain — pushing the use-cases far beyond just Web 3 alongside many enterprises.

About Google Cloud:
Google Cloud provides organizations with leading infrastructure, platform capabilities and industry solutions. We deliver enterprise-grade cloud solutions that leverage Google’s cutting-edge technology to help companies operate more efficiently and adapt to changing needs, giving customers a foundation for the future. Customers in more than 150 countries turn to Google Cloud as their trusted partner to solve their most critical business problems.

https://cloud.google.com/

About Band Protocol
Band Protocol is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts. Band Protocol enables smart contract applications such as defi, prediction markets, and games to be built on-chain without relying on the single point of failure of a centralized oracle. Band Protocol is backed by a strong network of stakeholders including Sequoia Capital, one of the top venture capital firms in the world, and the leading cryptocurrency exchange, Binance.

Website | Whitepaper | Telegram | Medium | Twitter | Reddit | Github

--

--

Kevin Lu
Band Protocol

Co-Founder @GMIStudios | Previously OG @BandProtocol