Introducing Chainlink Functions: Connect the World’s APIs to Web3

We’re excited to announce the beta release of Chainlink Functions—a serverless developer platform that empowers anyone to easily connect a smart contract to any Web2 API and run custom computations using Chainlink’s highly secure and reliable network.

Functions opens a whole new chapter for the Chainlink platform. Until now, Web3 developers couldn’t connect their smart contracts to existing Web2 APIs to access social media signals, AI computation, messaging services, and more. Conversely, the 30 million Web2 developers couldn’t leverage their existing Web2 infrastructure when planning to build a Web3 app. Chainlink Functions solves this problem by providing the missing piece developers need to build these powerful hybrid applications.

Leading cloud and Web2 platforms such as AWS, Meta, and Google Cloud have collaborated on example use cases to showcase how developers can use Chainlink Functions to easily connect Web2 APIs and cloud services in their smart contracts. Numerous projects are already testing Functions across a wide range of Web3 verticals from AI integrations to DAO governance, including Block Scholes, ChainML, Dopex, Nusic, Thirdweb, and more.

With Chainlink Functions, Web3 developers can quickly and securely build connections from smart contracts to off-chain resources on a self-serve basis without having to run their own infrastructure. All they need to do is define which external data sources they want to access (e.g. weather, sports), how those data points should be transformed (e.g. median value), and where the output should be delivered (e.g. an Ethereum smart contract). Chainlink Functions abstracts away the backend complexity and executes the code as submitted so builders can focus on unlocking the next big use case for Web3.

The beta version of Chainlink Functions is now live on the Ethereum Sepolia and Polygon Mumbai testnets. Sign up below to access the beta version of Chainlink Functions:

The Serverless Platform for Web3 Developers: Any Data, Any Device, Any System With Just a Few Lines of Code

Chainlink Functions acts as a decentralized compute runtime to test, simulate, and run custom logic off-chain for Web3 applications—akin to a more trust-minimized and blockchain-enabled version of existing cloud-based serverless solutions such as AWS Lambda, GCP CloudFunctions, and Cloudflare Workers.

It’s no longer necessary to host and run external adapters for custom off-chain computation or to source/run your own Chainlink node to connect smart contracts to the outside world. Developers can just focus on their decentralized applications—leaving the connectivity, security, and reliability to the Chainlink Network, the blockchain industry’s most time-tested infrastructure for oracle connectivity and computation. Furthermore, Chainlink Functions is a truly self-serve platform, meaning developers can fulfill their external data and compute needs without having to interface with Chainlink Labs or Chainlink node operators.

Chainlink Functions
Chainlink Functions is supported by a distributed serverless architecture powered by a Chainlink decentralized oracle network that leverages the latest version of Off-Chain Reporting (OCR). OCR is a novel consensus protocol that already underpins Chainlink Data Feeds, which help secure major Web3 protocols such as Aave, Compound, and Frax Finance. The testnet beta of Chainlink Functions uses a subscription contract with testnet LINK.

Benefits of Building With Chainlink Functions 

  • Extensive connectivity: Connect your smart contract to any data, device, or system, ranging from public and password-protected APIs to IoT devices and enterprise systems.
  • Customizable computation: Aggregate and transform your data using highly scalable and customizable serverless runtime environments.
  • Trust-minimized security: Build upon time-tested decentralized infrastructure that already helps secure billions of dollars for Web3 apps.
  • Self-service in minutes: Get started in minutes with Functions’ serverless developer solution, which features a CLI, starter kits, and a debugging environment.
  • Serverless runtime environment: Run JavaScript code in a serverless manner so you can focus less on infrastructure and more on your core application.

Onboarding the Next Million Web3 Developers

Today, there are about a few hundred thousand developers building various types of applications on blockchain networks. However, there are about 30 million total developers in the world. For blockchains to become as ubiquitous as the cloud, or even AI, we need to continue to remove the barriers that exist in the Web3 developer experience. Lack of access to API data is one of those fundamental problems that Chainlink Functions solves. Functions helps unlock a whole new realm of use cases for Web3 builders. 

In this section, we’ll highlight four initial design patterns that smart contract developers can begin exploring in the beta version of Chainlink Functions. We also encourage developers to explore and contribute to https://www.usechainlinkfunctions.com/, a community website where developers have begun sharing the off-chain connections they built using Chainlink Functions. 

Web3 Use Cases Unlocked by Chainlink Functions
Chainlink Functions unlocks a wide range of use cases along the spectrum between connectivity and computation.

Data Connectivity

Developers can use Chainlink Functions to connect to any public or private data API, such as to fetch recent gaming or sports results or to pull metric data on a Web3 protocol from Token Terminal (e.g., protocol revenue, user fees, active users, TVL). 

Furthermore, Chainlink Automation can be used as a complimentary service. For example, dynamic NFTs that change based on external events can leverage Chainlink Automation to continually check if the NFT needs to be updated and Chainlink Functions to bring event data on-chain when certain conditions are met. 

IoT Device and Traditional Backend Connectivity

Developers can integrate Web3 protocols with existing technologies and networks by using Chainlink Functions to connect to password-protected IoT device data or an enterprise system. For example, developers can fetch data from a smart watch or a smart pollution sensor. They can also connect a smart contract to an enterprise ERP system such as SAP to build a supply chain application or connect to the Stripe API to check a user’s account balance. 

Data Connectivity and Transformation

Developers can go beyond data connectivity by having Chainlink Functions fetch data and perform advanced computations on it prior to referencing it in their smart contract. For example, developers can retrieve data from a social media API, calculate sentiment from it, and report the transformed result on-chain to trigger an action (e.g. a user receives a limited-edition NFT).

Off-Chain Computing and Storage

Developers can also integrate with Chainlink Functions to connect their smart contracts to an external decentralized database such as IPFS and Filecoin. This would allow the development of off-chain computing dApps that utilize DONs as the computing layer and IPFS for low-cost decentralized storage. For example, a developer can build a decentralized off-chain voting system for a DAO by using Chainlink Functions to fetch off-chain votes and relay the vote result on-chain to trigger a smart contract-based action.

Explore What’s Possible With Chainlink Functions Today

The beta release of Chainlink Functions is currently available on the Ethereum Sepolia and Polygon Mumbai testnets and will be expanded and deployed across more chains in the future based on user demand and feedback. 

If you would like to access the beta version of Chainlink Functions, sign up here. Also, check out the Chainlink Functions developer documentation and join the Chainlink Discord for any technical questions or feedback. And if you’re on the ground at ETHDenver 2023, be sure to stop by the Chainlink Functions launch event with AWS, Polygon, and top builders from across Web3. 

Chainlink Functions is making it easier than ever for Web3 developers to get their smart contracts connected off-chain in minutes, all backed by the reliability guarantees Chainlink is known for. Once a smart contract can be effortlessly connected to the real world in a trust-minimized way, the possibilities are limitless. This paves the way for new and more advanced Web3 applications that combine the value already present in traditional systems and technologies with the benefits of transparency, security, and efficiency that blockchains uniquely afford.

Disclaimer: Chainlink Functions is currently in beta stage and is subject to change based on feedback or future developments. Chainlink Functions is offered “as is” and “as available” without conditions or warranties of any kind. Users of Chainlink Functions are responsible for considering the quality of the data used in their applications. For more information about selecting quality data sources, please see Evaluating Data Sources in the Chainlink documentation.

Need Integration Support?
Talk to an expert
Faucets
Get testnet tokens
Read the Docs
Technical documentation