Chainlink and iExec collaborate to address the complex off-chain needs of next-generation decentralized applications
Written and edited by iExec and Chainlink, based on the collaborative work of both tech teams.
Without a doubt, 2019 was the year of decentralized finance or ‘DeFi’. The surge in the amount of ETH locked in DeFi smart contracts (standing at >$800M at the time of writing) is one striking indicator of this trend, along with the growing list of projects building DeFi applications and the increased discussion around the subject.
We are witnessing the Ethereum blockchain natively support decentralized versions of many key financial instruments that all developed countries have been relying on for the past hundred years to support robust economies. These functionalities include currency stability, borrowing/lending markets, derivatives, insurance, and margin trading. In contrast to traditional financial systems, the Ethereum blockchain brings two dramatic improvements: Being censorship resistant and guaranteeing permissionless access to anyone around the world. These are two key values at the core of the DeFi movement.
In 2020, we will see developers taking advantage of this new financial base layer, of which didn’t even exist a year ago, to build a whole new range of highly valuable applications.
What will these new applications look like? Which pain points will they solve? How widely will they be adopted?
Beyond these questions, we forecast that these new kinds of blockchain-based applications will have one characteristic in common: They will need access to more and more off-chain resources of increasing diversity and complexity, while still maintaining high level of trust, security and confidentiality.
Such a solution is challenging because it needs to be both versatile and multidisciplinary. Looking at Chainlink’s long-time focus on high-quality data and the expertise of iExec in heavy computation with confidential compute and trusted execution environments, it’s only natural that Chainlink and iExec collaborate to allow developers to easily leverage their technologies together as a complete off-chain solution for the next wave of decentralized applications.
The below diagram illustrates an off-chain request that uses both Chainlink and iExec to access a comprehensive set of services in one transaction, all paid in LINK and RLC tokens through the Orchestrator smart contract.
Here is a description of each step composing the workflow:
- A decentralized application (smart contract) sends an off-chain request to the Orchestrator smart contract, which implements “ChainlinkClient” as well as “iExecHub” to take care of holding the utility tokens used for payment.
- The Orchestrator smart contract creates a request to the Chainlink network.
- The on-chain request is picked up by Chainlink nodes.
- Chainlink reaches out to multiple data sources as specified in the request.
- Chainlink responds on-chain.
- Orchestrator contract is triggered to create a request to iExec.
- iExec picks up the request.
- iExec processes the work order off-chain (leveraging CPU/GPU, TEE enclaves).
- iExec responds on-chain with the computed result.
- The Orchestrator relays the result back to the decentralized application (the requester).
Let’s now consider a concrete use case enabled by Chainlink and iExec joint expertise.
Use Case: Decentralized Car Insurance
Looking at publicly available data, we observe that the car insurance market is substantial:
The motor insurance market is estimated to be more than USD 880 billion in 2019, and it is expected to witness a Compound Annual Growth Rate of approximately 6.2% during the forecast period (the next 5 years). Premiums from motor insurance accounted for more than 40% of the overall non-life insurance premiums in 2018. This is expected to increase in the next few years, due to the rising demand from developing countries, primarily in Asia (source).
While the motor insurance market shows healthy figures, the growth captured by insurance companies does not benefit the end-user. Reports show that motor insurance premiums for individuals actually increase year over year. Even more worrying is the realization that a large portion of the population in developing countries can’t afford the cost of motor insurance or don’t even have access to such offerings.
We could discuss the inefficiencies of other kinds of insurances — such as health insurance — but motor insurance offers one characteristic that makes it ripe for transformation: The behavior of a vehicle is easy to model, measure and standardize, making car insurance easier to transition towards an almost fully automated operation. With the rise of IoT sensors, 5G, telematics and blockchain technology, we observe the convergence of all the blocks needed to build a more efficient version of existing motor insurance products. Not only can the costs of insurance be reduced, but risk coverage can be preserved and policies can become accessible to anyone around the world (users won’t necessarily have to reside in a developed country to benefit from this service).
Leveraging the technical integration presented above, one could develop an autonomous motor insurance policy as a data-driven smart contract deployed on the Ethereum Blockchain. Prior to contracting a new user, the insurance smart contract would have to compute his risk profile. Here is the expected workflow:
- The user reveals just enough information about his location to allow the Chainlink Node to fetch car accident statistics from the driver’s region. Given Chainlink’s integration with Google Bigquery, we can find an example of a dataset available in Bigquery for the city of New York, including more than 1 million motor vehicle collisions.
- The driver installs an application on his smartphone that collects all kinetic data reflecting his driving behavior. Given the high degree of confidentiality of such data, it would be locally encrypted before being uploaded to the cloud.
- An iExec worker uses the following datasets: Chainlink’s dataset, the applicant’s encrypted dataset, and a neural network as an input to run an AI application. The AI software will compute the applicant’s risk profile, which ultimately translates into the insurance premium of that specific user. Thanks to iExec trusted compute, all of this confidential data is processed in a highly secured environment (such as Intel® SGX enclave), ensuring that no one, not even the untrusted host machine carrying out the computation, is able to access it.
- Finally, the information about the insurance premium is pushed back into the insurance smart contract, which informs it how much the new subscriber should be charged.
Such a workflow could be re-run after a 30 days period, reacting to risks changes; hence being able to adjust the cost of the insurance over time. In case the user believes their risk profile improved, they could take the initiative of triggering a new computation ahead of the fixed time period, and cover the costs associated with the extra computation as he would benefit from the resulting insurance cost reduction.
The second part of an insurance product is the policy specification detailing exactly how an accident is compensated. Most of the compensation rules can be translated into smart contract code, particularly if the insurance is of parametric type (ie: the level of compensation directly depends on an index). However, assessing the damages after an accident is the most difficult part to automate. This traditionally requires the human intervention of a “claims adjuster”.
Thanks to the advent of electronic vehicle health check (eVHC) and IoT devices, it is now conceivable to measure the level of damage, and report the health check result in a way that cannot be tampered. With every claim, there will be new fresh data inputs training the neural network, ensuring the AI’s model of producing output results continuously improves over time. Eventually, based on these measurements and the parametric insurance rules, the smart contract will automatically trigger the payment to the driver, thereby drastically reducing the time needed to compensate for their loss, at a fraction of the cost of traditional motor insurance.
iExec has developed the first decentralized marketplace for cloud computing resources. Blockchain technology is used to organize a market network where users can monetize their computing power, applications, and datasets. By providing on-demand access to cloud computing resources, iExec is able to support compute-intensive applications in fields such as AI, big data, healthcare, rendering, or FinTech.
The iExec network is made up of computing resource providers. Computing power providers are called ‘iExec Workers’. As workers, users can connect their machines and be rewarded in RLC tokens for contributing resources to the network. Application providers can monetize their applications and algorithms. Data providers who own valuable datasets can make them available for use by applications through iExec. The iExec consensus protocol ‘PoCo’ (Proof of Contribution) provides consensus over off-chain computing.
iExec’s strength lies in trusted off-chain computing. Its representative heads the ‘Trusted Compute Working’ group within the Ethereum Enterprise Alliance. It has partnered with Intel to release a ‘trusted compute’ solution for blockchain (TEE using Intel SGX) and recently became the latest member of the Linux Foundations project community Confidential Computing Consortium (CCC). Other iExec collaborators include Alibaba Cloud, IBM, Genesis Cloud, EDF electrical utility company, EEA, and Ubisoft. iExec was one of the contributors to the Trusted Compute Framework (Hyperledger Avalon) alongside Microsoft, Intel, ConsenSys, Chainlink, Envision, PegaSys, and Kaleido.
iExec is working with various organizations and consortiums with the goal of providing scalable, secure and easy access to the services, datasets, and computing resources.
An oracle is a digital agent employed by a smart contract to retrieve and/or connect it to data and systems outside its native blockchain (off-chain). Oracles enable this off-chain connectivity for the smart contract by reformatting external connection points (APIs) so that two different software applications are compatible for data exchange. The oracles can then pull data into the smart contract and/or execute actions on external systems based on predefined instructions and endpoints outlined in the Service Level Agreement (SLA).
Chainlink is a decentralized oracle network that will give smart contracts secure and reliable access to data providers, web APIs, enterprise systems, cloud providers, IoT devices, payment systems, other blockchains and much more. It will feature the following:
- Binding service agreements between the oracle providers and querying smart contracts that outline the terms of service
- A robust market of independent oracles providing a range of data and connections
- Flexibility to customize an oracle connection including the number of oracles, types and number of data sources, aggregation strategies, staking deposits, trusted execution environments, Mixicles and more
- A reputation framework for evaluating oracles based on on-chain and off-chain metrics
It’s an all-in-one network for users to customize how their contract communicates with anything off-chain using varying levels of decentralization, data aggregation, and oracle selection.
It’s backed by an experienced team of developers, academics, and proven business leaders with an extensive background in pioneering emerging technology and scaling global enterprises. Chainlink is recognized as one of the top blockchain companies by leading independent research firms such as Gartner, and featured in leading publications such as MIT Technology Review, Forbes, Coindesk, and more. It is well known for providing highly secure and reliable oracles to great companies like Google, Oracle, SWIFT, and many other large enterprises, as well as many of the world’s best smart contract projects/teams such as Web3/Polkadot, Synthetix, Loopring, Kaleido, OpenLaw, Reserve, and many more.
In conclusion, the new generation of decentralized applications will have an ever-growing need for high-quality data, privacy-preserving features, and trusted heavy computing interlaced in one single request. By combining Chainlink’s real-world validated data with iExec’s decentralized cloud infrastructure, we are proud to offer an innovative and unique solution, intended to become a one-stop provider for all kinds of complex off-chain requests initiated by blockchain applications.