Innovative NFT collection Degen Blues to generate music based on data from Chainlink Price Feeds
We are pleased to announce Degen Blues, a dynamic NFT collection that generates music from Ethereum prices. Starting today, you can listen to a preview of Degen Blues and join our Discord server for updates. NFTs will become mintable on Ethereum Mainnet starting on April 4, 2022.
As Ethereum prices go up and down, the beat of Degen Blues goes on. For example, listen to this preview of Degen Blues #569:
Powered by Chainlink
Degen Blues is made possible by the Chainlink decentralized oracle network, which provides price data via on-chain feeds known as Chainlink Price Feeds.
Chainlink Price Feeds are the key enabling technology for Degen Blues. Using a decentralized oracle architecture, smart contracts can easily access high-quality price data. Specifically, Degen Blues will use the ETH/USD Chainlink Price Feed to generate the melody, and the BTC/USD feed for harmony. Degen Blues will be deployed on Ethereum, but these feeds are also available on many other top blockchains. We chose to use Chainlink Price Feeds because of the simple integration process.
The Degen Blues team is excited to create future collections based on other off-chain data, making use of a wider variety of data sources available via Chainlink. We’re also excited that Chainlink is a future-proof solution, so that NFT holders can be assured of the longevity of their assets, and so that the Degen Blues collection will automatically mint fresh NFTs based on Chainlink data well into the future.
We also want to blaze a trail for more creators to make data-driven NFTs. So today we’re publishing our core data fetching code, DegenFetcher, on Github. More details about our Chainlink integration and DegenFetcher are available in the Technical Deep Dive below.
Degen Blues Highlights
Generated from on-chain Ethereum price data
Our smart contract fetches each day’s price data from Chainlink Price Feeds, and uses that data to dynamically generate a musical NFT. Each one is unique because every day in the market is different. Unlike other NFT collections, Degen Blues requires no arbitrary hashes, and no randomness other than what the market provides.
Music composed and synthesized entirely by code.
Price data is algorithmically translated to musical notes, with the chord and scale chosen based on the market direction and volatility. Then the notes are synthesized entirely using oscillators and synths in web audio. This is robot music all the way from start to finish.
Own a day in the history of Ethereum
Each NFT represents a single day’s history on the blockchain. Which day will you choose? Wax nostalgic about ETH at $400. Relive the crypto crash of Jan 2022? Or just own your birthday. Each day is a 1/1 unique NFT so nobody owns it but you.
From now until forever
A new NFT will be generated at the end of each day at midnight UTC, based on that day’s price data. At that point it becomes immediately mintable via this site. The Degen Blues smart contract will continue to generate NFTs forever at a fixed rate of 1 per day.
Mission
Degen Blues was born from the desire to push the NFT world further and to create innovative forms of blockchain-native art. We took inspiration from projects such as Loot, Merge, and Fidenza. But our unique contribution is that Degen Blues uses meaningful external data rather than random hashes, and instead of being frozen in time at launch, the collection will continue evolving indefinitely.
By minting a Degen Blues NFT, you become a genesis patron of the project, helping us advance our mission and conceptualize future projects. Some future possibilities we’re excited about:
- Music based on other tokens
- New types of data on chain (greenhouse gas levels, COVID genome data, etc)
- DAO to support data driven art
Technical Deep Dive
The above diagram shows the basic technical components of Degen Blues. We’d like to highlight two aspects of the design in particular.
Fetching historical data from Chainlink and making it easy to use in an NFT
The core data fetching logic is found in the DegenFetcher smart contract, which is public on Github today.
This contract serves as a bridge between conventional timestamps (e.g. “Aug 6, 2020, 12:00am”) and Chainlink round IDs. DegenFetcher uses a binary search algorithm to repeatedly fetch timestamps for various round IDs from a Chainlink aggregator. When it has identified the correct rounds of Chainlink data, it culls the data to the desired density; e.g. one price point every 30 minutes.
DegenFetcher accepts the following parameters:
- Starting timestamp
- Duration (e.g. 1 day)
- Density (e.g. 48 data points per day)
- Address of any Chainlink Price Feed; e.g. ETH/USD, DOGE/USD, EUR/USD
DegenFetcher is currently deployed on Rinkeby testnet and is ready to use today. A mainnet deployment of DegenFetcher will be available for anyone to use starting on launch day.
Rendering audio and visuals via an IPFS-hosted web app
The Degen Blues smart contract returns the URL of the Degen Blues renderer hosted on IPFS. This ensures there is no single point of failure on an external web server. The price data is passed into this renderer as a URL parameter. The JS/HTML rendering code uses this data to synthesize both audio and video. Audio is synthesized entirely in WebAudio using the ToneJS library — no external music files are used as samples. Note that we made the decision to host the renderer off-chain on IPFS in order to accomodate a higher degree of complexity in the renderer, although we look forward to future data-driven projects that are entirely on-chain.
Future Vision
Beyond price data, we’re excited about the artistic potential of other data sources. Chainlink offers a wealth of other data types readily accessible to be used within dynamic NFTs, and for all types of data not already onboarded onto the Chainlink Network, Chainlink Any API makes it easy to build a direct connection between a smart contract and a data source.
What’s Next
Degen Blues collection becomes mintable on Apr 4, 2022 at the Degen Blues website, where you can listen to a preview today:
We hope you’ll become a patron of Degen Blues by adding it to your collection! You can keep up to date on the latest launch announcements on our Discord server:
If you want to try your hand at data-driven NFTs yourself, check out our Github repo:
About Chainlink
Chainlink is the industry standard for building, accessing, and selling oracle services needed to power hybrid smart contracts on any blockchain. Chainlink oracle networks provide smart contracts with a way to reliably connect to any external API and leverage secure off-chain computations for enabling feature-rich applications. Chainlink currently secures tens of billions of dollars across DeFi, insurance, gaming, and other major industries, and offers global enterprises and leading data providers a universal gateway to all blockchains.
Learn more about Chainlink by visiting chain.link or reading the developer documentation at docs.chain.link. To discuss an integration, reach out to an expert.
About Degen Blues
Degen Blues is a musical NFT collection generated dynamically from Ethereum prices. The fully-doxxed core Degen Blues team has a track record of creating products used by hundred of millions of people around the world:
- Andy Szybalski is a creator working in diverse mediums including painting, cartography, Solidity, and Javascript. As a product designer, he co-founded Google Street View and Uber Eats. As an artist, he created Zoom Backgrounds for Biden. His favorite jazz song is Song For My Father (Horace Silver).
- Stephen Chau is a product manager and entrepreneur who (with Andy) co-founded Uber Eats and Google Street View. His favorite jazz song of all time is Autumn Leaves (Cannonball Adderley & Miles Davis).