Skip to main content
28 votes

zk-SNARKs vs. Zk-STARKs vs. BulletProofs? (Updated)

A few of your points are valid (e.g. SNARKs and STARKS are both faster than Bulletproofs) but there are also some mistakes: STARKs are only faster than SNARKs at the prover level (1.6s vs 2.3s), ...
Paul Razvan Berg's user avatar
19 votes
Accepted

When a smart contract is deployed, is its source code publicly viewable?

No, the source code isn't automatically publicly viewable. If you have a publicly usable smart contract then you normally need to publish it so that people will know what they're interacting with, but ...
Edmund Edgar's user avatar
  • 16.9k
13 votes
Accepted

How do I see the value of a string stored in a private variable?

For the example contract you gave, it looks like there's a bytes32 state variable at slot 1 with the value "A very strong secret password :)". I found this by just calling getStorageAt a couple times:...
user19510's user avatar
  • 28.1k
12 votes

zk-SNARKs vs. Zk-STARKs vs. BulletProofs? (Updated)

Starks are almost better than Snarks all around: they require weaker crypto assumptions, don't require a trusted setup and are post-quantum resistant. But they have a major drawback, as in the proof ...
Alex Pinto's user avatar
11 votes

Is there any way to hide a transaction?

No. All information on the blockchain is visible to all participants. Having said that, some clever uses of encrypted data exist for specific use cases. zkSnarks may provide general-purpose ...
Rob Hitchens's user avatar
  • 55.6k
8 votes
Accepted

Is it safe to commit truffle build files to Github (open source)?

There are two problems with Truffle compilation output (JSON files), which make it difficult to keep them under version-control: The updatedAt field indicates the compilation time of the source file ...
goodvibration's user avatar
7 votes

Issue with New version of Metamask: Remix cannot detect the Metamask address

The reason it is not being read is because this version of Metamask enables privacy mode by default. What this does is require you to approve the application to view/use your wallets on Metamask. For ...
Shane Fontaine's user avatar
5 votes

With a ring signature mixer, will Ethereum transactions be completely anonymous?

The property of anonymity offered by ring signature mixers is more like what you would intuitively think of as 'plausible deniability', or 'anonymity with respect to an anonymity set'. The actual ...
bekah's user avatar
  • 1,099
5 votes

Is there any way to hide a transaction?

There's ring mixing contract with source code here which has similar (in fact, flipped) properties to Monero's ring signature mixes. It offers anonymity to recipients rather than senders, meaning ...
bekah's user avatar
  • 1,099
4 votes
Accepted

Should I create a new address for each transaction?

Bitcoin is UTXO based, so you can use an HD wallet(BIP32) to get a new address for each transaction to protect your privacy. However, Ethereum is account based and each account has a single address, ...
Badr Bellaj's user avatar
  • 18.8k
4 votes

Is the content of a function and the data in a smart contract publicly readable?

Yes. The blockchain will contain the EVM bytecode of the functions and anyone can read and analyze them to try to figure out what the functions are doing. They will not have access to the source ...
eth's user avatar
  • 86.5k
4 votes

Is there any way to hide a transaction?

Sort of. There's some work going to get zCash running on ethereum here: https://z.cash/blog/zksnarks-in-ethereum.html. It seems like the ideas is: you would probably have an initial, traceable ...
John Henry's user avatar
4 votes
Accepted

Is there a way to privately send ether?

The sending and receiving addresses and the amount are available for anyone to view. (EtherScan for reference). In the future, Ethereum does plan to implement privacy features - zero knowledge proofs ...
Karen S's user avatar
  • 432
4 votes

Is it possible to obscure the owner of a non-fungible token?

If your NFT is ERC721 compliant, then no, according to the non-finalised ERC721 Standard, this is not possible. A requirement of the standard is that your NFT token contract contain the following ...
AnAllergyToAnalogy's user avatar
4 votes
Accepted

Why wrong proof accepted in Zokerates?

When you generate a proof in ZoKrates, it is always valid. You might be confusing the program returning 0/1 and the proof being valid/invalid. You can invalidate the proof by fiddling with it (...
dark64's user avatar
  • 56
3 votes

Privacy of smart contract? How can one implement "private" smart contract on Ethereum?

Hackers can't manipulate your code. They can only execute it like all other people. Smart contracts are hacker resistant. If you leave a hole in your system so anyone can enter and execute the code ...
Max's user avatar
  • 71
3 votes

When a smart contract is deployed, is its source code publicly viewable?

In general as other users commented it is not possible to get back the original source code in practice. Also, Etherscan.io only lists <1% of contracts with source code. People can use decompilers ...
Neville Grech's user avatar
3 votes

Hiding variables in Solidity

Practical answer: You can't. If the contract can see it when it executes, everyone who has the blockchain can see it. Theoretical answer that won't help you: Homomorphic encryption. See Can smart ...
Edmund Edgar's user avatar
  • 16.9k
3 votes
Accepted

How secure is this Rock Paper Scissors smart contract?

Yes, knowing the ABI/code of the contract you can see which function is being executed and with which parameters in a specific transaction.
AdrianClv's user avatar
  • 1,269
3 votes
Accepted

Current state of zero knowledge proofs?

The Ropsten testnet has just verified a tranasction from the zCash network via a zkSNARK. For more details, have a look at the zkSNARK code, available here.
István András Seres's user avatar
3 votes

Store secret data in contract

There is no complete way of doing this. One approach you could look at is: You could commit to the secret in advance (by having the contract hold a hash of the secret). When you know the recipient ...
Adam Dossa's user avatar
  • 1,287
3 votes
Accepted

Is Ethereum blockchain public?

The entire Blockchain is public and distributed among nodes. The only way to store data which you want to be private on the Blockchain would be encryption.
Samuel Barnes's user avatar
3 votes

Are the contents of ethereum storage private?

The contents are private only in the sense that other contracts can't read them if you set them private, but otherwise everything is public. All nodes need to be able to process the data so they also ...
Lauri Peltonen's user avatar
3 votes

Updated: Is it possible to hide the sender or receiver of transactions by "zk-SNARK" or "Bulletproofs"?

Roughly, there are three aspects relative to privacy of transactions. Hiding the sender of the transaction -> Ring Signatures. See Will be a ring signature scheme possible to implement at Ethereum?...
ivicaa's user avatar
  • 7,539
3 votes

An example on using "zk-SNARK" in "smart contract"?

The only thing that is in solidity are precompiled contracts for Ellyptic curve operations. For implementations check out Is there a decentralized zk-SNARK (zero-knowledge Succinct Non-Interactive ...
Nico Vergauwen's user avatar
3 votes

Masking Ethereum Address in a transaction

If your requirements are limited to payment, then checkout the aztec protocol and specifically their implementation of a zero knowledge wrapper for dai. With this your users can transact privately, ...
natewelch_'s user avatar
  • 12.2k
3 votes

Is it safe to commit truffle build files to Github (open source)?

To start: yes you can commit them, there's nothing sensitive in them. As far as I can tell, there is no real consensus about whether the build directory should be added to version control or not. ...
Lauri Peltonen's user avatar
3 votes

How is authorization handled in smart contracts

You are correct - anyone with the address & ABI can call a public contract. The only way to prevent this is to have code within the contract that checks for calls from authorized addresses. If a ...
Satpal Sandhu's user avatar
3 votes
Accepted

How is authorization handled in smart contracts

Azure provides an RPC security layer that enforces access control to the network. In order to provide authentication to your RPC interface you can use basic authentication, certificate based ...
cucrisis's user avatar
  • 171
3 votes

Quorum private transactions not private

Your code is a good example of sending a public txn that is externally signed, but it is not a private txn, thus the contract is available on all nodes of the chain. Sending a private txn is a bit ...
fixanoid's user avatar
  • 1,627

Only top scored, non community-wiki answers of a minimum length are eligible