I see a lot of tokens (like GNO or QRL) has tab "Read Smart Contract" tab populated with standard ERC20 tokens members and functions but in the same time haven't "Contract Source" tab. I'd like to have the same for my token but cannot find how to do it.

I know how to verify source and it actually make tab "Read Smart Contract" filled but how to avoid publishing of my contract source code?

  • 3
    Why would you not let people see your contract source? This is against blockchain concept and you lose confidence from users. Jan 28 '18 at 11:46

No. Currently Etherscan only allows you to publish your code and by that also make the contract readable.

The tokens that you mentioned do actually have their source code published. You probably meant the Token Tracker view which indeed does not show the code. However, when clicking on contract address you do see the full code.

Please consider the following when thinking about not open-sourcing token code:

  • Ideologically blockchain is all about an open world, open access to data and sources and inclusivity of financial markets. By not having an open-source smart contract you go against the entire Ethos of the Ethereum / Blockchain community in general which is probably not a good idea.
  • In more technical terms, blockchain is about interoperability and deterministic contracts. If you close-source your code then I do not know what I work with and do not have certainty how it is going to behave tomorrow. That might be especially troubling for other smart contracts that attempt to interface your smart contract and are dependent on a certain behavior. If that behavior is broken, bad things can happen.
  • Especially tokens have a massive number of investors in the ultimate free market that blockchain and decentralized exchanges enable. If you work in the interest of your investors, then you want to make it as easy as possible for anyone to transfer or sell your token. This requires potential buyers to be able to do a due diligence. You make their due diligence process a lot easier if you have open source code and follow best practices and style guides. Once the craziness settles I do expect larger investors to just be able to invest into tokens matching some criteria (e.g. rating / technical due diligence / passed formal verification) - so better code in a clean and compliant fashion today, reach out to community and talk to all of us - don't be afraid, there's plenty of ♥ out here!
  • Open source does not automatically mean: Everybody can copy you free of charge. Take a look at the wealth of open source licenses.
  • You might choose to protect your invention by a trademark or patent if it really is so important to you that you're willing to spend money on it. If you really have a sufficiently novel invention that might be worth the effort to apply for a patent then you cannot publish it in any form before, otherwise the patent will be invalid.
  • A token is not arbitrarily complex and so is the resulting bytecode. The compiled bytecode is always publicly visible on the blockchain anyway. If it is worth it, then it will always be possible to reverse-engineer what your token does in any case, so you do not protect yourself a lot.

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.