4

When I create a smart contract with some functions in it, I know anyone can execute those functions. My question is; can anyone also read the source/logic of those functions?

And I've got the same question for storing things on the Ethereum network. Let's say I create some sort of DAO in which people can register their names. If I don't create a method/function to read out those names, can anyone read the data stored by the smart contract (the names) anyway?

3

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 code unless you also publish it. It's also worth noting that you can prevent smart contracts, which are "inside" the EVM from reading certain data (Solidity functions - private visibility) but you cannot prevent "outside" observers.

Every data stored in a smart contract is public and observers can see. It's possible to analyze, but it may not be straightforward, for example How do I get the storage indices/keys?

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.