Skip to content
No description, website, or topics provided.
Branch: dev
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ethereum fix truffle config issue May 13, 2019
public
src
.gitattributes
.gitignore
README.md
package-lock.json fix SecretNote.sol version incompatibility for solc 0.5.0 May 3, 2019
package.json

README.md

zk-HMY

Zero Knowledge Proof on Harmony:

We demonstrate private HMY ERC20 token transactions on Harmony testnet.

Dependency

Install libsnark and zokrates. Using libsnark and zokrates, we generate the proving.key and verification.key as well as the corresponding verifier.sol (solidity smart contract).

Development

generate smart contract for secret note

export ZOKRATES_HOME=/path/to/zokrates_stdlib/stdlib
./zokrates compile -i zk-circuit.code (generate R1CS circuits)
./zokrates setup (generate prover and verifier keys)
./zokrates export-verifier (generate solidity smart contract)

deploy smart contract

Currently, we are manually deploying the smart contracts. At the same time, we are building Harmony SDK to make smart contract deployment easier.

The main smart contract is SecretNote.sol. It will call the verifier smart contract (verifier.sol) to verify whether the transaction is legal. We use Zokrates to generate verifier.sol. After deploying our smart contracts, we can use a front end to interact with the smart contract to send and withdraw money without leaking privacy information.

Acknowledgement

The code is modified based on zk-Dai project.

You can’t perform that action at this time.