Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference. The platform allows users to verify that the published smart contract source code is exactly what is deployed on the platform. This transparency opens huge possibilities for applications in the fields of insurance, online gambling, finance, etc. where trust between the users and the application is key for the success of those applications. An Ethereum smart contract with open and verifiable source code removes the need for the users to trust the publisher of the application.
However, this transparency comes at a cost.One of the features of the Ethereum platform is that execution of each code instruction costs gas. The more logic we put into the smart contract the more expensive the execution of such smart contract becomes. At some point one must decide which part of the application logic must be on the Ethereum platform and which part can be moved to be executed off-chain. Hence the question is about the balance between the transparency of the code vs. the cost if its execution.
One other aspect that has an impact on the level of the code transparency is another feature of the Ethereum platform – immutability of the applications once those are deployed. One consequence of the smart contract immutability is that if a software defect is found there is no way to fix it in the deployed contract. The risk is that due to such software defects the existing funds collected on the smart contract may become trapped forever in the smart contract with no way for anyone to withdraw those. As a result, one might want to add a simple backdoor option to withdraw funds collected on the contract in case of an emergency. This reduces the risk of losing funds however it brings back the need for trusting the owners of the application. While reducing the risk it also reduces the transparency thus removing one of the best advantages that Ethereum applications have over traditional web applications.
The challenge for relatively complex applications developed on Ethereum platform is to find the right balance between the code transparency, the cost of execution and the risk of losing funds due to software defects.