project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Enclimate

A weather insurance protocol that automatically settled with TEE.

Enclimate

Created At

ETHGlobal Cannes

Project Description

The project develops a weather insurance protocol. To build it, it develops a weather oracle, specifically, a temperature oracle framework for a specific location, by running a program that fetches weather data from different APIs (3 in the deployed version) and computes median within TEE. It leverages the oracle data to further develop the insurance protocol that allows weather-sensitive parties like farmers, airline operators or any weather-related businesses to purchase insurance against unexpected weather condition directly on-chain and without worry of settlement risk and ambiguity of legal documents since the insurance fund is locked on-chain and settled automatically by data provided by TEE and through smart contract on Sapphire. It also implements fair pricing for the insurance in the TEE and dynamically adjust the payoff based on the different condition users select on-chain. Only the specific ROFL app that's run inside the TEE is allowed to update these parameters. Through open-source and verifiable build, the logic of pricing in TEE can be verified and publicly audited in a more transparent way than traditional insurances.

How it's Made

This project is built on ROFL and Sapphire, using oasis cli and sapphire smart contract utilities. I have documented clearly all the pitfalls and issues in README.md of the Github repo of the project, including the development cycle of ROFL application, and the interaction between ROFL and smart contract. Specifically, I ran a cronjob to automatically top-up machine when near an hour since if not, the machine would expire and a new machine would needs to be added. I used oasis cli to deploy program within TEE, and the ROFL application signs transactions within TEE to update contract state on Sapphire. There are two major tasks ROFL conducted in the project: one is updating the data on-chain for oracle, the other is to update parameters based on real-world weather condition for insurance payoff functions, this is to ensure the fair pricing of the insurance and security of the protocol. I believe ROFL has made the development process with TEE much easier, especially by abstracting away native SGX machine operations.

background image mobile

Join the mailing list

Get the latest news and updates