To learn more about smart contracts, I thought I could start by building a super simple dApp, which only does two things: Allow users (addresses) to share some random info to the contract (In my case just a string), and allow users to query shared information from the contract, if they previously shared. What makes it a bit more interesting than a simple getter/setter, is that I thought it'd be neat if users could view all info, but NOT view who added it.

Initially, I thought simply storing submitter-addresses and their submitted information separately, with no link to each other, would do the job. However, I then realized that since all transactions are logged on the blockchain, any person could, at any time, go back to look through the transactions done to very clearly associate each submitted information with a specific address. This basically completely invalidates what I was trying to do, so I can't help but ask: How would you go about representing anonymity in a smart contract?

Even if we imagine more complex systems, like for example voting systems, anonymity could often be a core feature (Since you don't want others to know what you voted for) - But how can you do that, while also having your address be logged with your submitted data?

  • You should take a look at Tornado cash a project that allows sending ether anonymously.
    – Ismael
    Sep 19 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.