As the world’s lightest blockchain, Coda enables an entirely new category of applications called Snapps: Snarkified Applications. Snapps are featurewise similar to Dapps on Ethereum, but are superior thanks to three specific properties:
These types of applications aren’t necessarily new - in a way both exist as present day blockchains: ZCash as a Snapp with property 1, and Coda as a Snapp with property 2.
A Snapp is also significantly more efficient than a Dapp on Ethereum. In order for the Ethereum world computer to make a commitment to its users about the execution of a Dapp, every node and miner on the network has to run the same computation. This is wildly inefficient. With a Snapp on Coda, the Snapp gets executed once by its developer, after which all other nodes can just verify the associated SNARK proof. One can make the same argument for SNARK powered Layer 2 Dapps on Ethereum, however those Dapps are still encumbered by the limited throughput of the main chain, whereas a Snapp on Coda benefits from the scalability potential of the Coda blockchain thanks to its succinct nature.
In general, a Snapp on Coda has the following workflow:
As currently designed, Coda’s Snapps functionality will work as follows.
There will be a new kind of account, called a “Snapp account”, which in addition to a public-key and balance will also contain a Pickles SNARK verification-key K and a state S, consisting of a small array of field elements.
There will be a new kind of transaction called a “Single Snapp transaction”. This will enable transferring to and from a standard account, as well as updating a Snapp’s state. It will contain
The result of applying this transaction will be to update the Snapp’s state as indicated, modify the Snapp’s balance by snapp_acount_delta and modify the standard account’s balance by -snapp_account_delta.
There will be a new kind of transaction called a “Double Snapp transaction”. This will enable simultaneously updating the states (and transferring funds between) two Snapp accounts.
It will contain
The result of applying this transaction will be to update both account’s states as indicated, modify the account1’s balance by account1_delta and modify account2’s balance by -account1_delta.
O(1) Labs is currently developing tooling for app developers, which includes existing ones like snarky, to easily develop Snapps, and with the click of a button compute required SNARK proofs. The tooling will be compatible with Coda out of the box, providing Snapps with an easy way to gain state and financial value.
Let’s dive into a couple examples that will showcase the true power of Snapps.
Value Proposition: Providing borrowers with a way to prove their credit score is above a certain threshold, without disclosing the score itself, and thus be able to borrow funds without posting any collateral.
Example User Flow:
How Snapp Toolset Is Used: Developer of Snapp uses the toolset to integrate a specific program that has the user download a signed credit score from provider, check locally on the user’s computer that the score meets criteria, and locally generate a proof for the check, which is subsequently shared back with the developer. The toolset also provides the user with a Coda address behind the scenes, which is used to provide a time stamp to the computation via the block number on the Coda blockchain. They also use the toolset to integrate a SNARK verifier into their own backend to confirm the validity of the local computation.
Value Proposition: Proving that the owner of a Coda address has access to an authentic identity document (such as driver’s license), without disclosing the document itself, starting with a certain block height. The validity of the identity document would be checked by a standardized open source algorithm.
Example User Flow:
How Snapp Toolset Is Used: Snapp toolset provides the developer with an SDK to embed into their app the SNARK proof generator and hash generator, along with a Coda interface. Snapp toolset also provides any other developer that wants to be able to verify said ID authentications with a SNARK verifier.
Value Proposition: Providing third parties with proof of funds meeting a certain criteria (e.g. >$10,000) in a Coinbase account belonging to a specific email, without disclosing the actual deposit amount.
Example User Flow:
How Snapp Toolset Is Used: Developer of Snapp uses the toolset to integrate a specific program that has the user OAuth into their Coinbase account, query their account balance for a signed balance information, the account’s email address, and a time stamp. The toolset allows a SNARK proof to be generated locally, without sharing any information with the backend of the service provider, so all balance info stays private. The developer also uses the toolset to integrate a SNARK verifier into their own backend to confirm the validity of the local computation.
Value Proposition: Allowing a set of eligible voters (e.g. any Twitter account with >100 followers) to vote privately, without disclosing who they are and what they voted for. Anyone would easily be able to verify the outcome of the entire vote once the voting period is over.
Example User Flow:
The design space for Snapps is huge, and will consist of many other innovative ideas entrepreneurs will come up with as the framework is better understood. Some other examples we have thought of:
O(1) Labs is working hard to build the Snapp toolset which will make the above examples possible on the Coda blockchain, and partner with talented developers to build the first proof of concept implementations.
However, the sky's the limit for Snapps. As such, we would like to invite the Coda community to join us in ideating different Snapp use cases and user flows, as well as helping us develop the tools and apps by contributing to the code. If you would like to join the exploration of this entirely new design space for confidential and verifiable applications, start by filling out this form.