Hello all ,
I’m Ryan from Usher Labs, where we focus on zero-knowledge cryptography to help Web3 businesses keep their data safe. I want to share in a post how you can get data from the outside world into the Internet Computer (IC). This comes after the recent updates to HTTPS Outcalls, like IPv4 support and non-replicated calls. While great steps forward, there’s another way that tackles some key challenges: zkTLS.
zkTLS is a tech that uses cryptography to prove data comes from a trusted source without revealing secrets. Our platform, Verity, makes it easy to build secure data pipelines with zkTLS. I’ve created a videos to
explain why zkTLS > native
- walkthrough a code demo – check it out below. The code demo forks the ICP Ninja starter for non-replicated requests.
It’s all about making data fetching safer, cheaper, and better for building protocols on any chain, using IC as a data verification hub.
How Native HTTPS Outcalls Work Today
The IC has built-in tools to pull data from APIs. That’s handy! In a subnet (a group of nodes that work together), each node – say 13 or 34 of them – makes its own request to the API. They then agree on the result through consensus. For example, if you’re grabbing crypto prices from CoinGecko, all nodes check the same data at the same time.
This works well for public data, but it has limits:
-
Consensus needs matching results: If the API gives slightly different answers to each node (due to timing or small changes), it might fail.
-
Security risks with non-replicated calls: The new feature lets one node fetch data and share it without repeats. This saves resources but opens doors to tampering if that single node is compromised.
-
High costs for frequent fetches: Repeating requests across all nodes uses a lot of cycles (IC’s compute units), especially if you’re pulling data often. While this functions like Chainlink, zkTLS opts to work with a single request but adds cryptographic proofs for extra trust.
zkTLS as a Strong Alternative
zkTLS lets you fetch data off-chain with proofs that the IC can verify. This means:
-
Access to private data: Get info behind logins or API keys without exposing secrets. Perfect for sensitive stuff like user details or financial records.
-
Lower costs and faster speeds: Instead of every node repeating the fetch, one proof covers it all. Our tests show big drops in cycle use – up to dramatic reductions for high-frequency data.
-
Strong security: Cryptographic guarantees ensure data hasn’t been changed. Even if you’re handling millions in assets, it’s tamper-proof.
-
Build on-chain databases: Index real-world data like credit scores, reserves, or derivatives into IC canisters. Recent IC tools for SQL databases pair well with this.
For sending data out (like to Ethereum), non-replicated calls shine – no need to repeat sends. But for fetching in, zkTLS keeps things efficient while adding that proof layer.
How Verity Makes zkTLS Easy
Verity is our open-source toolkit for zkTLS. It works like this:
-
Prover: Fetches data and creates a TLS proof off-chain.
-
Verifier (Canister): Validates the TLS proof on-chain
-
IC Canister or zkVM for Data Processing: Handles transformations in a verifiable way, like using zero-knowledge virtual machines (zkVMs).
We visited the DFINITY team in Switzerland earlier this year to share our research. The results? zkTLS cuts cycle costs hugely compared to native repeats, especially for frequent updates. There’s a trade-off – running proof infrastructure has a base cost – but for anything more than a few requests per hour, it’s worth it.
Think of the IC as a hub for verified world data. Feed it into DeFi protocols across crypto, or use it for new ideas like micro-loans based on credit scores.
Code Demo + Walkthrough
Code Repository: GitHub - rsoury/ic-verity-demo: Demo of using Verity zkTLS to fetch data on Internet Computer
Walkthrough Video: Verity zkTLS to the IC - Code Log | Loom
Let’s Chat
What do you think? Have you run into issues with HTTPS Outcalls? How could zkTLS fit your projects? Join the discussion, or reach out to us at Usher Labs via Discord or our site. We’re here to help support adoption of the IC!
Cheers,
Ryan Soury
Usher Labs