3 ms·
On a tangent, are smart contracts automatically “open source” - as in anyone can see the source or is there a way to obfuscate what’s on the blockchain?
by bergenty 4y ago
On a tangent, are smart contracts automatically “open source” - as in anyone can see the source or is there a way to obfuscate what’s on the blockchain?
- soco 4y agoI thought one of the selling points was that everybody can check the contract...
- saurik 4y agoJust because contracts can exist whose code you don't have doesn't mean you don't know how anything works: not only can you build something on Ethereum that is open source and with verifiable behavior, that is currently the norm and obfuscated contracts are not taken seriously.
- WJW 4y agoJust because you don't have the source code does not mean you cannot inspect what a binary does by disassembling it. (And as any programmer will tell you, just because you have the source code available does not automatically mean you can see where it has a tricky edge case with massive security implications. The obfuscated C contests are proof of that)
- saurik 4y agoYou can obfuscate source code also--see what people do with JavaScript on websites--so the answer is "no" under any case. (In specific, though, contracts are implemented in a bytecode, so by more basic definitions of "open source" the answer is still "no".)
- vl 4y agoSmart contract’s binary code is visible to anyone once it’s deployed. (And it’s pretty simple to disassemble). For most contracts they link actual source code to make inspection even easier - large part of trust in the system comes from the fact that contracts are inspectable.
- bergenty 4y agoAn so just binaries which I guess means it’s not visible for all intents and purposes. Are there ready to go smart contract disassemblers?
- PaywallBuster 4y agoexample https://etherscan.io/bytecode-decompiler?a=0x610b8B78da143fC1E38b36C4EA0f68F86cc3b4f4 https://etherscan.io/bytecode-decompiler?a=0x610b8B78da143fC... which uses https://github.com/palkeo/panoramix https://github.com/palkeo/panoramix
- miohtama 4y agoAll high profile smart contracts have reproducible and verified source code available on EtherScan.
- pcthrowaway 4y agoDissambly into Ethereum opcodes is doable, but do you find that readable?