Zero Knowledge Tokens Introduction
Zero Knowledge Tokens
Transfer tokens with complete privacy using the Zero Knowledge Tokens service. The service is based on the Anonymous Zether implementation by JPMC, which is an extended implementation of the Zether design jointly published by Stanford University and Visa Research.
The service supports transfer of ERC20 tokens with zero knowledge proofs, so that the transaction payload appears to be random bytes to the participants in the blockchain, except for the designated sender and receiver.
Anonymity is achieved by using a group of decoy accounts to mix together with the sender and receiver accounts, so that non-parties of the transfer can not decipher the real impacted accounts.
The design of the user experience is modeled after the "fund - transfer - withdraw" flow. A summary of how this works is as follows:
- Any account holding a balance in a standard ERC20 token contract can move some funds into a zero knowledge smart contract, and in exchange get the corresponding amount of ZTH tokens to use for private trading.
- Using ZTH, which now represents the account's holding in the private world, accounts can make payments with each other with complete privacy. Not only is the amount hidden from all parties apart from the sender and receiver, but the identities of the sender and receiver are obscured as well by mixing them together with "decoy" accounts.
- At any point, the ZTH balance can be exchanged back to regular ERC20 tokens by withdrawing from the zero knowledge smart contract.
All the ZTH transfer transactions are managed by the zero knowledge smart contract instead of the ERC20 contract. The only transactions visible in the ERC20 contracts are the funding and withdrawing transactions.
NOTE: As of this writing, the Zero Knowledge Tokens service is only available on Quorum based environments. Both Raft and Istanbul BFT are acceptable consensus algorithms.
Deploying the Service
The Zero Knowledge Token service is deployable in the same manner as any other member services: each membership can deploy their own instances via the administrative API or through an environment dashboard within the Kaleido console.
Via the console
- To provision the service via the Kaleido console, navigate to the appropriate environment and click the + ADD dropdown in the top portion right of the screen and click Add Services.
- Find the Kaleido Zero Knowledge Token service and click ADD.
- Optionally provide a name for your service.
- Select the membership that will own the service.
- If in a multi-region environment, select the region to deploy the service in.
- The service is ready for use when a green dot appears next to it.
Via the API
To provision the service via the API follow the same procedure as other member services with a service type of
tokenzkp, a membership ID and an optional name in the body of the call. Note that this example call assumes that the
$HDR_CT environment variables have been properly set. To see the example syntax for these variables refer to the Understanding the Kaleido API documentation. An example Zero Knowledge Token service creation call would resemble the following: