HTTPS and Snapps: Bridging cryptocurrency and the real world

Mina Protocol
MinaProtocol
Published in
3 min readAug 15, 2020

--

by Evan Shapiro, CEO and co-founder, O(1) Labs

A huge problem facing cryptocurrency today is interfacing with the real world. Once data is on a cryptocurrency and trusted, you’re golden. But getting the data there is another matter.

Mina bridges a private gateway between crypto and the real world.

Mina’s Snapps, when combined with HTTPS, present a very elegant solution to this problem. It’s particularly awesome because it just works with the internet as it is already — it doesn’t require any per-site integrations or intermediaries, and there’s complete privacy for sensitive user data.

The key insight is that HTTPS means institutions already sign all of their data.

Snapps are Mina’s general-purpose SNARK-enabled smart contracts. They are Turing complete like other smart contracting languages, but because they’re built on SNARKs they bring along the features of privacy and verifiability. If a Snapp has data signed by a trusted source, it can start using and computing with that data. Snapps can take advantage of this and HTTPS to deeply integrate with public and private data, from anywhere on the web, as part of their operation.

Public data can be moved on-chain by checking the webpage signature provided by HTTPS. A Snapp can ensure it is working with the latest AAPL price as provided by a particular trusted site (or set of sites), with no changes on those sites’ end. Contrast this to how existing oracle systems like Chainlink work — it’s centralized, and you’re limited to the data and sources that the oracle network is integrated with. A developer can’t choose what data they want to use.

User data can also interact with Snapps privately. A user can safely prove private information, say their credit score on CreditKarma’s website or the funds they have on their banking website to a Snapp. This can be done without even necessarily disclosing specifics, but even just a computation on it, such as that the underlying credit score is greater than a particular value.

Some examples, some silly and some very real:

  • The price of TSLA on Yahoo finance was $1,554.76 at 3:50 pm, August 12th.
  • The average price of BTC on Coinbase, Binance, … was $11,500 at 2 pm, August 12th
  • Privately proving to a loan smart contract my credit score per Credit Karma is > 700
  • Proving I made a Reddit post for <link> that received at least 10,000 upvotes
  • A smart contract that gives out tokens if a paper is published on Nature with the title X
  • I’ve had Y accepted commits to a GitHub project
  • I own an electric car, as shown from the DMV’s website
  • The NYTimes election results indicator indicates Biden has won the 2020 election

For example, to get a price feed of bitcoin, averaged over many exchanges, a developer would need to identify the exchanges to get the bitcoin price feeds from, then, write a program that:

  1. Downloads each exchange’s webpage or price feed API over HTTPS
  2. Extracts the relevant information and HTTPS timestamps
  3. Creates a SNARK, proving the information came from the real sources in the correct formats with correct timestamps by checking the HTTPS signatures
  4. Pushes that SNARK to a Mina Snapp, updating the smart contract’s average price of bitcoin from these exchanges.

Anyone can run the update program too (and perhaps get paid for running the update), it’s completely decentralized; the Snapp smart contract only accepts the information if it was legitimately from the website it’s supposed to be.

This will be a powerful way we can bridge the real world and cryptocurrency, without requiring anything different from the web pages we already use. Snapps present a lot of awesome capabilities generally too besides this HTTPS / oracle use-case. In a lot of ways, it’s similar to when Ethereum came out and opened up a whole new set of possibilities on top of Bitcoin’s limited feature set for computation. If you’re interested, check out more on Snapps here and join our community on Discord to explore the idea further (#snapps channel).

--

--

Mina Protocol
MinaProtocol

The world’s lightest blockchain, powered by participants.