Ethereum vs NEM
Ethereum, miracle child of a blockchain, and its Ethereum Virtual Machine (EVM), is one of the prominent examples of blockchain use. Many ICOs have built their businesses on smart contract, one of which is DApps or decentralized application. Now we discuss: is Ethereum really decentralized? Are there different or “better” ways of writing blockchain applications?
First appeard on medium, by Tongokongo
With Bitcoin’s basic scripting language, users are able to create applications that perform some tasks on an automated basis. These applications run mostly on private servers and are managed by centralized entities. These are similar to NEM, a completely new blockchain, written from scratch and with much broader and easier-to-access functions than Bitcoin.
The main ammunition of people attacking NEM (the second most popular platform to create ICO on) is its lack of decentralized smart contracts. But is Ethereum really a decentralized platform as it advertises to be? Will it be worth the use to gain a glimpse of decentralization when trading for the rigidity and security of your application?
To create a contract on NEM, you need to relate to one or more of the API requests and group them in an offchain application. Technically, it is difficult to confirm if an open source code on the NEM platform is really the code that is running on the entity’s server. But does that mean it is less decentralized than Ethereum contracts?
The first counterargument in decentralization’s defense is of the compilation of Ethereum’s source code. Currently, most applications on the EVM is the solidity compiled byte code, with minority of serpent compiled code. Let’s take the example of the simple HelloWorld contract. Every time we want to check if we can trust a contract, we as users should take the open source code, compile it in exact compiler that was originally used, and then check if the bytecode we get from this operation equals the bytecode from the uploaded contract.
nem-vs-ethereum-1.jpg
Bytecode:
“0X6060604052341561000F57600080FD5B6101578061001E6000396000F300606060405260043610610041576000357C0100000000000000000000000000000000000000000000000000000000900463FFFFFFFF168063942AE0A714610046575B600080FD5B341561005157600080FD5B6100596100D4565B6040518080602001828103825283818151815260200191508051906020019080838360005B8381101561009957808201518184015260208101905061007E565B50505050905090810190601F1680156100C65780820380516001836020036101000A031916815260200191505B509250505060405180910390F35B6100DC610117565B6040805190810160405280600A81526020017F68656C6C6F576F726C6400000000000000000000000000000000000000000000815250905090565B6020604051908101604052806000815250905600A165627A7A72305820E417728D298ADD6F4E1210005CF05CB6F6F0F2BDFCF162E4E756E53E71D478660029”
(Ethereum Solidity contract and the same contract compiled to bytecode and ready to upload on EVM)
However, compiling and checking the bytecode of every contract we use isn’t the biggest problem. Currently, to make solidity contracts more robust and “upgradeable,” solidity developers use a special contract called Ownable.sol which allows the owner of the contract to modify some variables, kill the contract, or change the owner. It is very popular for contracts and is used by main contracts on Ethereum, making them centralized and much more robust at the same time. It allows the owner of the contract to write into external data storage without changing the contract logic. Also, most modern contracts are upgradeable through versioning system and/or detaching logic, which can be updateable from immutable data storage.
Using these techniques is considered good practice when writing a solidity code for Ethereum VM. But is it much different from scripting languages (historical Bitcoin and upcoming NEM) that are more contract-centralized but more secure on the code? At the end of the day, modern solidity contracts are decentralized only in the sense of storing timestamped data on the blockchain, while well-architected contracts are editable by owners. But if it isn’t different than non-turing complete blockchains, why learn another complicated language to access the blockchain data when you can simply use RestfulAPI-based NEM blockchain?
Congratulations @jpdifiori! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of posts published
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Congratulations @jpdifiori! You received a personal award!
Click here to view your Board of Honor
Congratulations @jpdifiori! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!