Chainlink Update: Integration Ready For Developers On Stacks Testnet
Plus other oracle related updates from around the ecosystem
by Mitchell Cuevas on November 11, 2021
Stacks builders, it’s time for an update on the highly-anticipated integration of Chainlink as the preferred oracle solution on Stacks. We know you’re all very excited about the new capabilities Chainlink oracles can bring, so this post will break down where we are and what’s next.
Try it now
Thanks to hard work by Tintash, Hiro, and a handful of community developers, you can work with a version of the Chainlink price feed oracle on the Stacks testnet today. It’s very important you use this testnet option, more on why later on.
What's Next
There are still a few critical steps ahead before a full-featured Chainlink oracle can be deployed for broader use on mainnet. At a high-level, here are the next steps according to the Chainlink team and developers at Tintash:

  • Testing: Before completion of the Chainlink integration, which includes further development and testing, Stacks builders should demonstrate demand by using the current testnet implementation. Not only will this help showcase the demand for integrating Chainlink on Stacks, it will provide additional opportunity to refine the integration.
  • Deeper Integration: Once demand has been demonstrated through testnet interaction, the Chainlink Labs team and Tintash can work to add more complete support for Stacks, including exploring adding support for a more advanced oracle model for data feeds. One of the challenges to be considered here is that Stacks is not EVM-compatible (by design), meaning the integration work is more custom than with other chains.
  • Security Audit: When the integration work has been completed, a security audit can be scheduled. Chainlink Labs has been introduced to possible providers that also know how to work with Clarity in addition to their own audit partners.
How you can help
The most important thing you can do to help progress toward the integration of Chainlink oracles on Stacks is use the testnet implementation. Usage of Chainlink oracles on testnet is one of the factors used to determine which blockchains are prioritized for integration. We also recommend you message the Chainlink team on appropriate channels or social media highlighting your exciting use cases, offering feedback, and sharing results. Specifics from your testnet efforts will be the single most helpful action in accelerating progress.

Other Workstreams
Given the importance of an oracle solution for builders has only continued to grow, the Stacks Foundation and others are supporting complementary efforts to the work with Chainlink, which will remain a priority and not be impacted by these additional workstreams.

  • Marvin Janssen from here at the Stacks Foundation is heading up a small project team made up of community developers to work on an oracle option loosely based on psq’s ‘stacks open oracle’. The team also intends to explore and rapidly iterate on related models with an eye on getting something reliable on mainnet before the end of the year. Please email [email protected] to be included.
  • The Stacks Foundation and Daemon Technologies are collaborating to connect with other leading oracle providers and assemble a technical team to support the integration work.
  • The team from Open Art Source has been approved for a grant for an oracle for machine learning models.
  • Grants: As always, anyone interested in combining forces with the above efforts or starting their own should consider applying for a Grant from the Stacks Foundation. The more efforts on this front, the better!

That’s everything we’re aware of for now, please reach out on the usual channels with questions or concerns or to call attention to other oracle efforts. Anywhere we can help with funding, feedback, or otherwise, we’d love to be of service to the ecosystem.
Direct Request Model vs. Off-Chain Reporting
Taking a closer look at the architecture of Chainlink oracles, it’s important to understand that there are two different models.

The current deployment of Chainlink oracles on the Stacks testnet uses the ‘Direct Request Model’. Essentially, developers can get real-world data into their contract by submitting an on-chain request to a Chainlink node in one transaction and receive the response to the query within a separate transaction. The Direct Request Model is the first oracle model planned to be deployed on the Stacks mainnet to bring real-world data on-chain. After this model has been sufficiently time-tested and level of demand sufficient, the next step is to explore providing support for the ‘Off-Chain Reporting’ model, otherwise known as OCR.

The Chainlink OCR model enables the creation of on-chain data feeds that are continuously updated by a decentralized network of oracles that collectively fetch and aggregate data off-chain from multiple sources and deliver it on-chain in the form of aggregated oracle reports. Chainlink oracle nodes in the OCR model communicate peer-to-peer directly off-chain, generating consensus on external data, which is delivered to an on-chain reference contract in a single transaction for each round. This model is ideal for obtaining freshly updated real world data within a single on-chain query, so as a community we want to work toward this implementation by proving demand for the Direct Request Model now.
How to use the Chainlink oracle on the Stacks testnet
Tintash has deployed the necessary smart contracts on testnet, including an event observer server which is listening to oracle contract events on testnet, as well as setup a Chainlink oracle node on an EC2 instance.
You can login with email: [email protected]
Password: 12345678
If you want to write your own consumer contract then you need to implement these two traits:

  1. This will help you in creating the oracle-request, you'll have to provide the [job_id] and data for the request.
  2. ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.stxlink-transfer-trait. This will enable the transfer and call functionality, i.e. the call to oracle will only proceed when the stxlink-token is transferred successfully.

As you begin to work with the Chainlink testnet implementation, please connect with the Tintash team and others working on it in the #chainlink-testing channel in Discord.

Mitchell Cuevas leads various partnership and growth marketing efforts at the Stacks Foundation. He's spent the last decade working in community-driven high-growth startups.