<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Blockchain Development Publication - Medium]]></title>
        <description><![CDATA[We write about all things Blockchain. - Medium]]></description>
        <link>https://medium.com/blockchain-development-publication?source=rss----bd66b2d902f1---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Blockchain Development Publication - Medium</title>
            <link>https://medium.com/blockchain-development-publication?source=rss----bd66b2d902f1---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:14:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/blockchain-development-publication" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hyperledger vs NEM: Blockchain Technologies to look for in 2019]]></title>
            <link>https://medium.com/blockchain-development-publication/hyperledger-vs-nem-blockchain-technologies-to-look-for-in-2019-24145282eb7c?source=rss----bd66b2d902f1---4</link>
            <guid isPermaLink="false">https://medium.com/p/24145282eb7c</guid>
            <category><![CDATA[hyperledger-fabric]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hyperledger]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Zfort Group]]></dc:creator>
            <pubDate>Tue, 16 Apr 2019 08:30:07 GMT</pubDate>
            <atom:updated>2019-04-16T08:30:07.824Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8kOb1RJs_pyfLK5A3PVNg.jpeg" /></figure><p>Blockchain has become such a widespread buzzword that people forget that there are different types of Blockchain with different strengths and weaknesses. Picking the best blockchain for your specific use case requires a thorough understanding of the leading technologies, and there’s no single, easy answer when it comes to which one is “best”.</p><p>In this article, we’re going to make it a little easier for you by taking a look at two of the most popular blockchain solutions — Hyperledger and NEM — and giving you the lowdown on what you can expect from each of them.</p><h3>Comparing Hyperledger and NEM</h3><p>Let’s get started by taking a brief overview of the two blockchains and highlighting a few of the similarities and differences between them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r1-82qxPM_dKlYtz.jpg" /></figure><p>Both Hyperledger and NEM have their use cases, but their different technical capabilities mean that they both have unique drawbacks and advantages.</p><p>But before taking a closer look at how the two of them compare, there’s a fact we can’t ignore.</p><p>Nem is struggling now. It all happened when NEM (XEM) faced one of the greatest crypto hacks of all times. As a result, NEM has lost over $500 million of worth. But still, even following such a great recession, NEM might be a rewarding blockchain option in the long run. Read more about the Continue reading to get a better idea of these two platforms.</p><h3>Technical and use-case difference</h3><p>Hyperledger Fabric (HLF) is an enterprise-level permissioned blockchain that’s designed with flexibility in mind. Built using “chaincode” (HLF’s term for smart contracts) and written in Go, it’s relatively easy to develop with and is known for its fast compile time. The most commonly used functions are PutState, GetState, GetHistoryForKey, and DelState.</p><p><strong>NEM</strong>, meanwhile, is noteworthy for its <strong>scalability</strong> and for its full <strong>decentralization</strong>. It can also handle hundreds of transactions per second at a much more rapid rate than its rivals, which makes it a reasonably good choice when you’re trying to future-proof. It’s reportedly faster, safer and easier than other blockchain solutions.</p><p>That means that Hyperledger tends to be used by larger companies rolling out company-wide blockchains, while NEM typically works better for smaller organizations that are hoping to scale and grow. The main thing is that you need to put some thought in up front and to identify the goals and the scope of the blockchain. With that information in mind, it becomes much easier to decide which blockchain is the best for you.</p><h3>Why just these two?</h3><p>Hyperledger and NEM aren’t the only two blockchain solutions on the market. If neither of them suits your particular use case, there are other options to consider including:</p><p>1.<strong> TRON: </strong>Tron is positioned as a blockchain that targets purely decentralized applications. This means it’s not the best choice for centralized solutions.</p><p>2. <strong>EOS: </strong>EOS is partly decentralized, but it’s also controlled by “block-producers” through a “delegated proof of stake” algorithm. No options were found to deploy fully custom private cloud infrastructure, but it may be possible.</p><p>3. <strong>Zilliqa: </strong>Zilliqa is a scalable and secure blockchain platform that specializes in hosting decentralized applications. Its high throughput aims to reduce network congestion, high transaction fees, and poor security.</p><p>4. <strong>Cardano: </strong>Made up of experts from around the world,<strong> </strong>the Cardano team is currently in the bootstrapping phase, making updates to the code and debugging. On their website, they say, “We will improve the design and make integration through APIs to third parties simpler. We will then move [to the next phase], where the network becomes decentralized.”</p><p>5. <strong>IOTA: </strong>Led by the IOTA foundation, this platform is all about “redefining trust, value and ownership” through a permission-less ecosystem. It has a particular focus on powering interconnected and autonomous devices.</p><p>6. <strong>Ethereum Classic: </strong>You’ve probably already heard of Ethereum because of its cryptocurrency. Ethereum Classic is a continuation of the original Ethereum blockchain and offers smart contracts and various other features.</p><p>7. <strong>Waves: </strong>The Waves platform allows you to store, trade, manage and issue digital assets more easily and securely. It’s most notable for its popular cryptocurrency wallets which support the majority of currencies.</p><p>8. <strong>VeChain: </strong>VeChain is an enterprise level public blockchain which aims to provide a comprehensive governance structure with a robust economic model. Like IOTA, it has a particular focus on powering the Internet of Things devices.</p><p>However, it’s important to remember that none of these alternatives fit our requirements in terms of the best private permissioned blockchain. That battle is between Hyperledger and NEM.</p><h3>What’s Next?</h3><p>Now that you are aware of various blockchain solutions available, the next step is for you to determine which option is the best for you and your particular use case. The good news is that if you’re still not sure which blockchain to pick, we’ll be happy to help you to make a decision. Just contact our <a href="https://www.zfort.com/contacts">blockchain experts</a> for a quote.</p><p>Originally published at <a href="https://www.zfort.com/blog/hyperledger-vs-nem-comparison">zfort.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24145282eb7c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchain-development-publication/hyperledger-vs-nem-blockchain-technologies-to-look-for-in-2019-24145282eb7c">Hyperledger vs NEM: Blockchain Technologies to look for in 2019</a> was originally published in <a href="https://medium.com/blockchain-development-publication">Blockchain Development Publication</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum vs Hyperledger: Which Open-Source Blockchain Platform to Choose?]]></title>
            <link>https://medium.com/blockchain-development-publication/ethereum-vs-hyperledger-which-open-source-blockchain-platform-to-choose-15f65e612b62?source=rss----bd66b2d902f1---4</link>
            <guid isPermaLink="false">https://medium.com/p/15f65e612b62</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[hyperledger]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <dc:creator><![CDATA[Roman Korzh]]></dc:creator>
            <pubDate>Mon, 18 Feb 2019 14:54:23 GMT</pubDate>
            <atom:updated>2019-02-18T14:54:23.436Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50AyRRuQEy6YLWrMBp9_MA.jpeg" /></figure><p>Ethereum and Hyperledger are both Blockchain platforms in the continuously evolving technology landscape. They are quite different due to their origin and use-cases. In this article, we will explain the key differences and analyze which one to choose.</p><h3>What is Blockchain or Distributed Ledger Technology?</h3><p>Blockchain or DLT (Distributed Ledger Technology) originated as a public permissionless Blockchain network. But in order to explain what it is and how it can be used, we need some background.</p><h3>Origin of the Bitcoin network and how it influenced its design</h3><p>The 2008 banking crisis was significant, and many lost their money. The risks of the prevailing banking system became clear as quite a few people tried to devise an alternative system. Their objective was to build a system where banks and governments can’t interfere with their money.<a href="https://bitcoin.org/en/"> Bitcoin</a> was born as a result of such libertarian ideas.</p><h3>The requirements of a decentralized payment network</h3><p>A person or a group of people created the Bitcoin network under the nickname “Satoshi Nakamoto”. They created a peer-to-peer (P2P) network where users could send digital money to other users without any intervention from banks and governments. They had to address three broad requirements, as follows:</p><ol><li>The<a href="https://www.digitalcitizen.life/what-is-p2p-peer-to-peer"> P2P network</a> should be decentralized and not controlled by other participants.</li><li>Hackers shouldn’t be able to hijack any sensitive information of individual network participants.</li><li>The decentralized network should be stable, i.e. participants can’t frequently branch away with one part of the network.</li><li>The currency is digital and has no physical presence and backing of the government. Given this, participants shouldn’t be able to spend the same digital money twice, which is called the <a href="https://www.investopedia.com/terms/d/doublespending.asp">double-spending</a> problem.</li></ol><h3>How did the Bitcoin network address these requirements?</h3><p>Satoshi Nakamoto solved the 1st requirement easily by creating a P2P network. It didn’t have a central server because all participants have equal authority. To address the 2nd requirement, the team used a digital signature with the<a href="https://searchsecurity.techtarget.com/definition/asymmetric-cryptography"> public key-private key encryption</a>. Participants have 2 keys. The public key can be shared with anyone. This is the address where someone else can send digital currencies like Bitcoin (BTC) in this case.</p><p>However, the private key is unique and secret. The two keys are linked to each other. It’s easy to create the public key from the private key, however, it’s incredibly difficult the other way.</p><p>Let’s now understand the Blockchain structure and how issues three and four are addressed.</p><p><strong>Bitcoin network blocks, and the chain</strong></p><p>Bitcoin transactions are stored in an intermediate repository called ‘mempool’. When transactions are validated, they are grouped together in a data structure called ‘block’. The network uses<a href="https://blockgeeks.com/guides/cryptographic-hash-functions/"> cryptographic hash functions</a>. These convert the data of the block into a scrambled alphanumeric string called ‘hash’. It’s easy to create a hash from a data set, but it’s impossible to recreate the data from the hash. Even a slight change to the data results in a completely different hash.</p><p>A block has its transaction data; additionally, it also has the cryptographic hash of the previous block. As you can see, only the first Bitcoin block doesn’t have the hash of any previous block. Additionally, the block also has the answer to a complex cryptographic puzzle. We will discuss this puzzle a little later. Each block has a reference to the earlier block, so we can see an imaginary chain forming, which is called ‘Blockchain’.</p><p>It’s a decentralized network with all participants having equal authority. All participants, i.e., their computers have the entire data in the network. They are called ‘nodes’ and each node can view the entire set of blocks in the distributed database. It’s called a<a href="https://www.investopedia.com/terms/d/distributed-ledgers.asp"> ‘Distributed Ledger Technology’ (DLT)</a>.</p><p>As you can see, with equal authority, every node can create new blocks according to their preference. This creates a risk because nodes can frequently branch off with a new network, which can create a highly unstable network! Also, any node can spend the same digital currency twice, i.e. exploit the ‘double-spend’ weakness. Enter the consensus algorithm!</p><h3>The ‘Proof of Work’ consensus algorithm</h3><p>The creators of Bitcoin used a consensus algorithm called the<a href="https://cointelegraph.com/explained/proof-of-work-explained"> ‘Proof of Work’ (POW)</a>. Although all nodes have the same authority, to create a new block with transactions, a node must solve that complex mathematical puzzle we mentioned earlier. It requires no skill, but it requires trying out one number after another quickly. The puzzle is difficult to solve, but not impossible. It’s an asymmetric puzzle, i.e., verifying a solution is very easy. It requires a very high amount of computing power. Solving this puzzle and creating a block this way is called ‘Mining’, and we call the nodes ‘Miners’.</p><p>When a miner solves a puzzle, they broadcast it to the network. Others review and once they confirm, the miner gets to create a new block. There is a reward, in a form of a fraction of the new Bitcoin minted. As you can see, new blocks can be created only when a complex mathematical task is solved.</p><p>If a miner tries to create a new block without following the standards, other miners will reject it. Branching off with a part of the network isn’t easy! For hackers to attack this network, they must capture a majority of the computing power in this decentralized network. That’s very hard with many nodes running computers with high computing powers.</p><h3>How does the Bitcoin network prevent ‘double-spend’?</h3><p>Assume a hacker has identified a transaction in the 519th Bitcoin block for manipulation. Once the hacker changes that transaction, they need to solve the puzzle again. It’s hard to convince other miners because they will accept an answer with a small hash value only. A small hash value has many leading zeros in it, and it’s very hard to find. Let’s suppose the hacker finds it.</p><p>Now since the hacker has changed the data in the 519th block, the hash has been changed. Now, the hacker must update the 520th block to incorporate this new hash of the 519th block in it. Otherwise, the new block will be in a very short chain. Miners will immediately reject that chain since they know that only the longest chain is the true one.</p><p>As soon as the hacker changes the 520th block, the hash for that also changes. This way the hacker must change the 521st block. This challenge continues! By the time the hacker changes so many blocks, everyone in the network finds that out, and the plan is failed!</p><h3>What’s different in the Ethereum Blockchain network?</h3><p>Vitalik Buterin and his team created the<a href="https://www.ethereum.org/"> Ethereum Blockchain network</a> following the main principles of the Bitcoin network. It uses the same kind of blocks, P2P network, public key-private key encryption, and the POW consensus algorithm. Its native cryptocurrency is Ether (ETH). However, unlike just a P2P payment network using cryptocurrencies, the Ethereum Blockchain has more to offer.</p><h3>Ethereum ‘Smart contracts’</h3><p>The Ethereum Blockchain network introduced the ‘<a href="https://blockgeeks.com/guides/smart-contracts/">Smart contract</a>’ concept. Smart contracts are programs. They have ‘If-Then-Else’ conditions, based on which they check if a condition is fulfilled. It then transfers crypto assets. These are open-source programs, like the Blockchain protocols programs generally are.</p><p>They are stored as part of the Ethereum Blockchain blocks and no one can tamper with them after deployment. The execution results are permanently recorded in the Blockchain making it irreversible. Ethereum smart contracts are coded in ‘<a href="https://solidity.readthedocs.io/en/develop/">Solidity</a>’, the proprietary language of Ethereum.</p><h3>The ‘Ethereum Virtual Machine’ (EVM)</h3><p>The Ethereum project also uses its platform called the<a href="http://ethdocs.org/en/latest/contracts-and-transactions/developer-tools.html#the-evm"> ‘Ethereum Virtual Machine’ (EVM)</a>. Developers can create ‘Distributed Apps’ (DApps) using this platform. Virtual machines execute smart contracts, so these DApps can execute business functions other than sending digital currency from one address to another.</p><h3>Ethereum DApps</h3><p><a href="https://blockgeeks.com/guides/dapps/">DApps</a> are like web apps, however, they have a few distinguishing characteristics. While the front-end can be in any language, DApps must have smart contracts as their backend code.</p><p>DApps must be open-source, besides, they must use a crypto token created using a standard cryptographic algorithm. No entity can hold the majority of crypto tokens and no entity can control the future of the DApp. It executes autonomously. In addition, any change to it must be approved by the user community through consensus. A DApp also must store its data in a decentralized Blockchain following cryptographic standards.</p><h3>Crypto tokens based on the Ethereum network</h3><p>Developers can also create crypto tokens using the Ethereum platform. They use relevant crypto token standards like<a href="https://cointelegraph.com/explained/erc-20-tokens-explained"> ERC 20</a> for this. Users of their DApps can access these apps using these crypto tokens. The computation on the main Ethereum network still uses its native cryptocurrency Ether.</p><h3>Decentralized business models using the Ethereum network</h3><p>EVMs, smart contracts, and DApps allowed developers and Blockchain-crypto start-ups to create<strong> new decentralized business models</strong> and disrupt existing centralized businesses. These DApps allow users to transact among themselves without a central authority charging exorbitant fees. Transactions take place using the crypto token of the DApp.</p><p>There are many examples. Hundreds of Blockchain-crypto start-ups offered their products built on the Ethereum platform and launched their ‘Initial Coin Offerings’ (ICOs). An example is<a href="https://locktrip.com/"> LockTrip</a>, which is a vacation rentals marketplace with 0% commission. They intend to disrupt existing vacation marketplaces like Booking.com and Airbnb.</p><h3>Limitations of public Blockchains like Bitcoin and Ethereum</h3><p>Decentralization allows peer-to-peer transactions, whereas consensus algorithms enable immutable records in public Blockchains like Bitcoin and Ethereum. However, these also impose limitations on them, as follows:</p><ol><li>All nodes store the complete data, so activation of a new node can take days!</li><li>Transaction validation requires the participation of all nodes. Since different nodes use different computing powers and network bandwidth, the network can only be as fast as the slowest node! This scalability issue becomes more pronounced as more nodes join. Bitcoin can process just 3–5 ‘transactions per second’ (TPS), whereas Ethereum is only marginally better with 7–15 TPS.</li><li>The POW consensus algorithm requires high computing power which causes huge electricity demands. All <a href="https://digiconomist.net/bitcoin-energy-consumption">Bitcoin miners</a> require more electricity than the electricity consumption in some countries!</li></ol><p>While cryptocurrency networks and ‘Business to Consumer’ (B2C) companies have used public Blockchains so far, these limitations impede their use in the enterprise context.</p><h3>Enterprise Blockchain requirements</h3><p>Now that we’re done with prehistory, we can go further and discuss the key features in particular. Enterprises have markedly different requirements according Blockchain networks, but there are some common features required by most companies.</p><p><strong>Data privacy</strong></p><p>Enterprises often work in heavily regulated industries where data privacy is the key challenge. Public permissionless Blockchains make the entire data visible to all nodes. This is one of the reasons why enterprises can’t use them. Enterprise Blockchains need data privacy.</p><p><strong>Access control</strong></p><p>Public Blockchains allow anyone to join the network, even anonymous users. The mathematics in the Blockchain protocol program and data encryption techniques provide trust in the system, not participants. Enterprises can’t let such unrestricted access to their systems since they have proprietary data. They need access control.</p><p><strong>Consensus</strong></p><p>Since public Blockchains allow anonymous and pseudonymous users, they may need to go too long to protect the network. This necessitates energy-hungry consensus algorithms like POW. On the other hand, enterprises will only allow trusted participants in their network, besides, such participants are bound by the codes of conduct of the enterprise. Consensus algorithms like POW are not relevant here, so these are not practical in the enterprise context. They need consensus algorithms aligned with their workflow, and roles, and responsibilities.</p><p><strong>Scalability</strong></p><p>Enterprises often have 1,000 or more TPS requirements that means they need better scalability than public Blockchains.</p><p><strong>Governance</strong></p><p>No one owns the Bitcoin network. Despite criticism over the energy-consuming POW consensus algorithm and steady centralization of mining pools, Bitcoin will likely use this process in the foreseeable future. While the<a href="https://www.ethereum.org/foundation"> Ethereum Foundation</a> oversees developments around the Ethereum network, DApps are decentralized. Enterprises need a tighter governance framework around their Blockchain network. Publicly listed enterprises need to be very transparent with their shareholders, investor communities, and regulators.</p><h3>The Hyperledger Blockchain platform</h3><p><a href="https://www.hyperledger.org/">Hyperledger</a> is a collaborative effort. It includes several open-source Blockchain platform projects, e.g., Hyperledger Fabric, Hyperledger Indy, etc. The<a href="https://www.linuxfoundation.org/"> Linux Foundation</a> hosts this, however, many companies from a wide spectrum of industries participate in this project. IBM, SAP, Accenture, Cisco, Daimler, American Express are just a few of the companies, while the membership list is huge!</p><p><a href="https://www.hyperledger.org/projects/fabric">Hyperledger Fabric</a> is one of the more famous projects under this umbrella effort. It’s quite a mature project and it’s a Blockchain framework implementation for enterprises. IBM and Digital Asset had first created this jointly. For the rest of this article, we will use Hyperledger Fabric as the pole for comparison with Ethereum.</p><h3>What’s common between Ethereum and Hyperledger Fabric?</h3><p>There are a few similarities between Ethereum and Hyperledger Fabric, as follows:</p><ul><li>Data encryption: Both Blockchain networks use advanced cryptographic techniques for data encryption.</li><li>Distributed ledger: Both have implemented the concept of distributed ledger however, it’s implemented quite differently in case of Hyperledger. More on this later.</li><li>Smart contracts: Like Ethereum, Hyperledger Fabric also has them. They are called ‘chaincodes’.</li></ul><h3>Key differences between Ethereum and Hyperledger</h3><p>Ethereum and Hyperledger Fabric have some important differences. Let’s review them.</p><h3>Currency</h3><p>Ethereum has its native cryptocurrency to fuel the computation within the network. Ethereum network users need to pay the ‘Gas price’ to execute transactions in this network. These are paid in Ether. As I have explained earlier in this article, you can also create your DApp running Ethereum smart contracts with a crypto token. It’s a token created on the Ethereum platform, however, remember that it’s separate from Ether.</p><p>Hyperledger Fabric isn’t suitable for cryptocurrencies and it doesn’t have any. It’s for enterprise use. Enterprises typically don’t have a cryptocurrency use case. Their B2C or B2B transactions already have payment terms and conditions specified. Enterprises intend to use Blockchain for efficiency and simplicity of processes.</p><h3>Governance</h3><p>Ethereum foundation tries to implement a consensus-based governance, however, it’s not easy. Ethereum stakeholders and the original project team<a href="https://cointelegraph.com/news/ethereum-stakeholders-meet-to-discuss-governance-without-vitalik-buterins-involvement"> aren’t fully aligned</a> on the matters of governance.</p><p>Enterprises can’t quite work with a decentralized governance model. When some enterprise implements their own private Blockchain, it follows the governance model in their organization. On the other hand, when multiple enterprises work together and implement a consortium Blockchain for an industry-specific use case, they govern it jointly. An example is the<a href="https://newsroom.ibm.com/2018-08-09-Maersk-and-IBM-Introduce-TradeLens-Blockchain-Shipping-Solution"> Maersk-IBM Blockchain shipping platform</a>.</p><h3>Development languages</h3><p>Ethereum smart contracts are codes in Solidity or Vyper languages. These are Ethereum proprietary languages. However, chaincode in Hyperledger Fabric can be developed in various popular programming languages. Both are open-source platforms.</p><h3>Consensus</h3><p>Ethereum main network uses the POW consensus algorithm. However, some developers use sidechains for their DApps to get better scalability.<a href="https://loomx.io/"> Loom Network</a>, a Blockchain start-up, provides SDK to develop ‘DAppChains’, i.e. DApp specific sidechains. Developers can use a different consensus algorithm in their sidechains.</p><p>On the other hand, Hyperledger Fabric models its consensus algorithm according to a typical business process workflow. The transaction process has three phases, as follows:</p><ol><li>Distributed logic processing involving chaincodes.</li><li>Transaction ordering.</li><li>Transaction validation and commit.</li></ol><p>There are different roles and tasks related to the transaction divided across these roles. This is performed as follows:</p><ol><li>A requester submits a transaction request.</li><li>An endorser follows an endorsement policy. It specifies the number and combination of endorsements needed for a given type of transaction.</li><li>Endorsers send transactions to peers using a ‘read/write’ channel. This is done using chaincodes.</li><li>Now endorsers send the digitally signed proposal responses back, which are also called ‘endorsements’.</li><li>At this point, the client submits a transaction to the orderer.</li><li>The orderer creates a block of transactions and sends it to peers.</li><li>Peer checks for endorsements and whether there are conflicting transactions. When all conditions are met, the peer commits the transaction in the Blockchain.</li></ol><p>Signatures and ‘read/write sets’ are the only datasets that go back-and-forth through the network. This helps in improving scalability and performance. Endorsers and peers are the only people that see the transaction while data privacy is maintained.</p><h3>Smart contracts</h3><p>Both platforms use smart contracts. I have earlier mentioned the difference with respect to the smart contract programming language. There is another key difference. Hyperledger Fabric uses the container technology to host smart contracts, whereas Ethereum just uses contract accounts and stores them in the Blockchain.</p><h3>Who wins? Ethereum Blockchain or Hyperledger Fabric?</h3><p>The two Blockchain platforms were created for entirely different purposes. As far as completely transparent decentralized Blockchain networks are concerned, Ethereum remains a top choice for entrepreneurs and developers. Most Blockchain-crypto ICOs over the past couple of years have used Ethereum platform for their new decentralized business models.</p><p>On the other hand, enterprises have completely different requirements, as I have mentioned earlier. Hyperledger Fabric provides data privacy, access control, scalability, and high transaction throughput. These suites enterprises. Fabric also has a<a href="https://www.ibm.com/developerworks/cloud/library/cl-top-technical-advantages-of-hyperledger-fabric-for-blockchain-networks/index.html"> few other advantages</a> for enterprises, as follows:</p><ol><li>A modular architecture where developers can develop and use components like consensus algorithm in a plug-n-play manner.</li><li>Hyperledger uses ‘channels’ for partitioning data as it’s highly suitable for stringently regulated industries like banking and healthcare.</li><li>Hyperledger offers very good querying features using LevelDB and optional CouchDB.</li><li>Fabric has a ‘Hardware Security Module’ (HSM) that increases the security of digital keys for sensitive use cases like identity management.</li></ol><h3>Conclusion</h3><p>The Blockchain is not a one-size-fits-all solution for all business problems. You need to carefully evaluate your business model. If you need a completely transparent and fully decentralized Blockchain network with crypto tokens, Ethereum can be the right choice. You will need to contend with scalability and transaction throughput issues.</p><p>On the other hand, if you are in an enterprise environment and dealing with regulations, then you need data privacy and access control. Add to that the typical high transaction throughput demands of enterprises. Hyperledger Fabric is a good bet for you in such situations.</p><p>Need help?</p><p>No worries! Just talk to one of our <a href="https://www.zfort.com/contacts">Blockchain experts</a> for a piece of thoughtful advice.</p><p>Originally published at <a href="https://www.zfort.com/blog/top-software-development-companies-eastern-europe/">zfort.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15f65e612b62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchain-development-publication/ethereum-vs-hyperledger-which-open-source-blockchain-platform-to-choose-15f65e612b62">Ethereum vs Hyperledger: Which Open-Source Blockchain Platform to Choose?</a> was originally published in <a href="https://medium.com/blockchain-development-publication">Blockchain Development Publication</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WHAT IS TOKENIZATION AND WHY DOES YOUR PRODUCT NEED IT?]]></title>
            <link>https://medium.com/blockchain-development-publication/what-is-tokenization-and-why-does-your-product-need-it-24b0c8bd63a4?source=rss----bd66b2d902f1---4</link>
            <guid isPermaLink="false">https://medium.com/p/24b0c8bd63a4</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[tokenization]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[infographics]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Zfort Group]]></dc:creator>
            <pubDate>Mon, 24 Dec 2018 16:10:23 GMT</pubDate>
            <atom:updated>2018-12-24T16:10:23.492Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*by7oVHgIlsSS74TJ" /></figure><p>While real-world assets become more on the planet, the merchants want to take them to the market. Since not every asset can be moved or sent out, the traders create actives or shares for them. Yet, the thing is that it leads to unnecessary and time-consuming paperwork along with an engagement of middlemen. Sounds insecure, doesn’t it?</p><p><strong>Tokenization </strong>is a revolutionary process which allows avoiding such kind of issues. It lets the merchants sell their products in prompter way and protect the transactions.</p><p>In 2008, a Bitcoin creator Satoshi Nakamoto has established an innovative technology called Blockchain based on the distributed ledger technology (DLT). In a word, it is a decentralized database which consists of blocks of data (which actually gave the name to the technology) and is preserved on many different PCs all over the world. First of all, it should have resolved the issue of cryptocurrency double-spending. And only in 2014, its functionality has been extended to supporting an idea of smart contracts contributing to secure the deals.</p><p>While smart contracts exclude the mediators in the transactions, blocks in a Blockchain encrypt the data making it indestructible. With that being said, any attempt to break the blocks can be noticed by any member of the network and prevented. Thus, processing the bargains through Blockchain system results in automated and secure operations without a third party.</p><h3>Everything You Wanted To Know About Tokenization</h3><h4>TOKENIZATION AND TOKENS</h4><p>First things first, so let’s start with the original meaning of tokenization. It is a technology that replaces the value stored in a specific object to a digital token. The last one can be managed within a Blockchain system.</p><p>Would you like to get a<strong> real-life example in retail industry</strong>?</p><p>Well, how often do you shop online? When was the last time you paid with a credit card? Have you ever thought of how safe your credit card information is and how it can be stolen?</p><p>Let’s explore the <strong>traditional vs tokenized transaction flow</strong> when using credit card processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9h-6OJNL1COYZpPA.png" /><figcaption>Tokenization process explained using credit card processing.</figcaption></figure><p>By tokenizing your payment information it is impossible to access sensitive credit card data which makes all transactions safe. You can take a closer look at the tokenization platform developed by our Blockchain specialists recently and get a better idea of how it can be used.</p><p><strong>ASSETS TOKENIZATION</strong></p><p>When it comes to Blockchain trends in 2018, tokenization is one of them. Let’s forget what we’ve been previously talking about and look at tokenization from a different angle.</p><p>Let’s say you have an asset and want to sell it fast and securely. <strong>Tokenization may transform your asset into a token and then move it, record, or store on the digital ledger system.</strong> Except for the assets, you have a chance to tokenize the services you offer and the funds you have.</p><p><strong>HOW CAN YOU BENEFIT FROM TOKENIZATION?</strong></p><p>Let’s imagine you have an asset and it’s challenging to transfer it to your customer. You know the data can be stolen at any point in the delivery chain, or the transfer process will require too many digital resources.</p><p>Your customer doesn’t want to take risks as well. In this case, tokens presenting the real assets are aimed to help you and your customer to resolve the issue. <strong>While tokenization occurs right on the Blockchain system, you don’t have to worry about security and transparency of a transaction.</strong></p><p>While the whole world is discussing the prospects of transferring the assets into the token, some of the most progressive companies try to reach the next technological stages. In spring 2018, they’ve launched Atlant project working in real estate. Additionally, BankEX project has also launched their platform for a financial industry. They allow tokenizing your assets and conducting transactions with no risk of information loss.</p><h4>Security Matter In Asset Tokenization</h4><p>With no doubt, tokenization is one of the most reliable ways to protect payment and private data. Except for data security, the process of tokenization enables protecting your goods, services, or even intellectual property like patents, custom designs etc.</p><p>When it comes to protecting credit card numbers, SSN, and any other data that can get under threat of hackers attack, people choose tokenization. Even if the intruders steal tokens, it will be impossible for them to extract any sensitive information from them.</p><p>While tokenizing the assets, you may use <strong>smart contracts</strong>. This is a self-regulating code written to a Blockchain. It allows its users to exchange the assets without the participation of the third parties. The contract usually spells out all the terms of the deal. In case the participants meet the conditions, the contract automatically comes into action. Making use of a smart-contract you don’t have to gather documents and go through all circles of hell called bureaucracy. Among the participants, there are only you, a buyer, and a decentralized computer algorithm.</p><p>The assets tokenization and smart contracts not only protect your payment and private data. They also contribute to a transaction transparency, avoid additional costs excluding intermediaries, save you much time etc.</p><h4>Find Out If Your Assets Can Be Tokenized</h4><p>Because the number of assets accessible for tokenization is almost unlimited, experts have divided them into three categories. Thus, we can talk about intangible, fungible, and non-fungible assets. Further, let’s cover the details of all categories so that you can understand if your asset can be tokenized.</p><h4>INTANGIBLES</h4><p>Intangible assets don’t exist as material goods, yet, they are just perfect for the world of the Blockchain.</p><p>They can refer to license on specific inventions, trademarks, loan contracts, copyrights, franchises etc. Funds and assets without a material shell are easy to tokenize on the digital ledger system. One can set a unique ID to such kind of assets and then trade them on the market.</p><p>Even though the intangibles don’t physically exist, they are still legitimate. Furthermore, they don’t require storage or physical movement. Thus, you can easily get an intangible asset including a unique signature for a token.</p><p>Let’s imagine that you’ve previously got an order to create a design for a specific web product. The ordering is ready and you want to send it to a client. Yet, you both live in different countries with different copyright regulation systems. Besides, some issues may occur while transferring money. Furthermore, the commission may be excessive. The paperwork is about to make the transaction almost impossible. This is the case when tokenization can help you.</p><p>All you have to do is just agree on the price with your client and set it to a smart contract. The algorithm will assign a unique hashcode to an asset which will guarantee that it is a real patent, not just a copy. By tokenizing intangibles, you contribute to an instant and verified bargains.</p><h4>FUNGIBLE ASSETS</h4><p>Fungible items are the ones that can be exchanged for identical items or goods with equal values. Fungible assets can be found in the raw materials sector and are supported by a physical resource. These are interchangeable goods like gold, water, oil, wheat after all.</p><p>Any fungible asset can be sold between two participants by means of a smart contract. Excluding the mediators in this process, the trade is registered on a digital ledger system generating a receipt. With that being said, tokenization of fungible goods allows eliminating paper accounting system and exchanging the items on the more comprehensive scale.</p><h4>NON-FUNGIBLE ASSETS</h4><p>Non-fungible assets usually include artworks, antiques, real estate etc.</p><p>When it comes to a tokenization of these assets, the system can transform them into so-called actives which can be further bought and traded. During the tokenization, the owner of an asset receives a digital signature without a chance to change it. The token is a not a copy of your artwork, yet it can be divided into sub-tokens, each with a digital signature. That being said, the actives can be traded between a huge number of people.</p><p>Tokenization enables a more protected way of transferring client data and prevents your business from a data loss. It also helps you avoid the paperwork, participation of third-party agents, and additional costs.</p><p>How You Can Get Started With Tokenization<br>If you want to have your tangible asset tokenized, you can try Blockchain platforms such as BankEX, LaToken, or Maecenas. Such platforms imply the independent assets tokenization. This means that you have to handle the creation of a smart contract on your own. In case you make a mistake, you will not be able to change the designated conditions. This option is best suited for those practicing various operations on Blockchain system.</p><p>If you don’t want to handle it on your own, yet want to entrust it to professionals, apply to Zfort Group and get an assistance with creating smart-contracts for your upcoming transactions. Zfort is a reliable company which guarantees a personalized approach and high-class end result. Selecting a trustworthy provider who can install tokenization into transaction processes you contribute to reducing risks and improving payment security. Besides, the professional assistance will definitely save you much time and ensure a high efficiency for your business.</p><p>Wow, well.</p><p>We hope that was an insightful read. Maybe, you’ve already got inspired for some mind-blowing project? Just <a href="https://www.zfort.com/contacts">drop us a line</a> and speak with one of our Blockchain experts! Stay tuned!</p><p>Originally published at <a href="https://www.zfort.com/blog/what-is-tokenization">zfort.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24b0c8bd63a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchain-development-publication/what-is-tokenization-and-why-does-your-product-need-it-24b0c8bd63a4">WHAT IS TOKENIZATION AND WHY DOES YOUR PRODUCT NEED IT?</a> was originally published in <a href="https://medium.com/blockchain-development-publication">Blockchain Development Publication</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum Smart Contracts: Security Starts with Architecture]]></title>
            <link>https://medium.com/blockchain-development-publication/ethereum-smart-contracts-security-starts-with-architecture-5a4aa4d91ace?source=rss----bd66b2d902f1---4</link>
            <guid isPermaLink="false">https://medium.com/p/5a4aa4d91ace</guid>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[testing-smart-contracts]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Roman Korzh]]></dc:creator>
            <pubDate>Tue, 13 Nov 2018 13:45:29 GMT</pubDate>
            <atom:updated>2018-11-13T13:45:28.839Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*0SeiwY-6f_umaTufGvIEmg.png" /></figure><p>When you create Blockchain, you should decide on the right platform to deploy it. While Blockchains are secure just by their properties, there can be some known vulnerabilities that can exist in your architecture and they can be manipulated by hackers and wrong-doers.</p><p>The architecture you use should have integrated security features that can do the following:</p><ul><li>Prevent anyone from accessing root and sensitive information. This includes even administrators and root users.</li><li>Any illicit attempt to alter the data should be thwarted. Unauthorized access should be denied and reported immediately.</li><li>Encryption keys should be carefully guarded using high-security standards. This will ensure that the keys are not misappropriated.</li></ul><p>When your architecture has these features, your network will get the additional protection that’s needed to avert any attacks — whether they are from inside or outside.</p><h3>Test checklist</h3><p>If you want to test a Blockchain project, how do you do it? And what limitations are there in this technology? Before we delve into these topics, keep in mind that Blockchain isn’t limited to Bitcoin. While Bitcoin is also a Blockchain based technology, Blockchain in itself is a much broader term. Let’s go through the parameters for testing.</p><h3>Block size limit</h3><p>For Ethereum block size limit means the same as the gas size limit. The gas limit is a cap on both processing and storage because the cost of a transaction is fixed in units of gas for each type of instruction.</p><p>The upper gas limit of a block is 1MB. When Bitcoin was introduced, for the first 18 months, the average block size was under 30KB. Towards the end of 2017, it was around 1MB. It’s not yet decided what will happen once the block size reaches over 1MB. Since there can be multiple transactions in a single block, the block size can increase.</p><h3>Load</h3><p>Since there are many people on the Blockchain, the load is an important parameter to be tested. If we take the example of Bitcoin, there are about 3–4 transactions per second. This works as of now, but what if the load increases? It’s important to maintain the performance of the Blockchain even under heavy loads.</p><h3>Performance</h3><p>Performance can go down with load. The performance of the Blockchain should be optimal and it shouldn’t take too long for a query to return with results. If a query has to go through every block in the chain, how long will it take? This should be considered while developing the project.</p><h3>Collision</h3><p>What happens when there is a collision? If there is a split in the chain, what action will be taken? The chain is peer reviewed and there should be a prompt action to decide which branch of the chain will continue and which will be discarded. There can be other instances when a collision occurs in the chain. The system should be able to handle exceptional conditions effectively.</p><h3>Security</h3><p>Since a Blockchain always has many miners, security is always a major issue. Also, security can be a complex parameter since the Blockchain technology needs a multi-layered security system. Any instantaneous transactions cannot be stopped even if a layer gets hacked. It’s important to test the layers and to make sure that one security layer is not affected by the others.</p><p>Here are some other parameters that quality assurance specialists should check while testing the Ethereum Smart Contract.</p><h3>Investigation dependency Gas Usage from Amount of Investors/Website operators</h3><p>Gas refers to a fee paid for a transaction. Each transaction can’t be done for free and needs some capacity (hardware, power, maintenance etc.) in order to be executed.</p><p>This way we have a price for every transaction which is calculated in Gas if we talk about Ethereum operations.</p><p>Since Ethereum itself has no correlation with ever-changing infrastructure prices, gas is a so-called equivalent for the transaction price which should be approved by the investors.</p><p>Users can also set limits for the gas amount to be transferred to avoid users’ wallets going empty because of multiple transactions taking place simultaneously.</p><p>In the test cases below we aimed at finding the maximum amount of investors and optimal gas price for a transaction to be performed.</p><p>Gas usage for 10 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*Wc6ZsiduNvGw8-faT9TpzQ.png" /></figure><p>Gas usage for 50 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*ShVizB-9FCMNzJ2Y7SX8kQ.png" /></figure><p>Gas usage for 100 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*p7iT9ocnlof_Ck0vIkfMxQ.png" /></figure><p>Gas usage for 150 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*0h5hORqUJRcdeldhdOSEhg.png" /></figure><p>Gas usage for 200 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*4eQhh06wqbdnHPMTOLUtnQ.png" /></figure><p>Gas usage for 250 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*vTLikzsri6XQAA2d7LJCdg.png" /></figure><p>Gas usage for 251 investors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hy4qfKG8XNqa6tHr0LLIHg.png" /></figure><p>The investigation process described above resulted in the fact, that the transaction limit is 250 investors per one transaction.</p><h3>The Security Checklist Criteria</h3><p>It’s a common mistake to rely on a single random testing tool and hope you’ve delivered a secure Ethereum-based solution. Instead, our expert development team has worked out a list of key parameters a truly secure smart contract should meet:</p><ol><li>Confusion of the different method calling possibilities: send(), transfer(), and call.value()</li><li>Missing error handling of external calls</li><li>Erroneous control flow assumptions after external calls</li><li>The use of push over pull for external calls</li><li>Lack of enforcement of invariants with assert() and require()</li><li>Rounding errors in integer division</li><li>Fallback functions with a higher gas limit than 2300</li><li>Functions and state variables without explicit visibility</li><li>Missing pragmas to for compiler version</li><li>Race conditions, such as contract Reentrancy</li><li>Transaction front running</li><li>Timestamp dependence</li><li>An integer overflow and underflow</li><li>Code blocks that consume a non-constant amount of gas, that grows over block gas limit.</li><li>Denial of Service attacks</li><li>Suspicious code or underhanded code.</li><li>Error-prone code constructs</li><li>Race conditions</li></ol><p>Based on these criteria it is possible to evaluate some really useful tools you can use to test your smart contract. Let’s see which ones our team has decided to use.</p><h3>What Are the Tools?</h3><p>Reliable smart contacts can’t be written without proper testing. In order to make sure your code has no vulnerabilities and is reliable, you’ll need to use special tools that help detect all the issues. We’ve gone through a number of “bug-hunters” and now share the top of our shortlist:</p><ol><li><a href="https://tool.smartdec.net/">Smart Contracts code checker</a>: for bad practices and vulnerabilities</li><li><a href="https://github.com/ConsenSys/mythril">Mythril</a>: a security analysis tool for Ethereum smart contract</li><li><a href="https://github.com/raineorshine/solgraph">Visualize Solidity</a> control flow for smart contract security analysis</li></ol><p>In this article, we share the test cases for Smart Contracts code checker and Mythril security analysis tool.</p><h3>Checking code by Mythril security tool</h3><h3>Integer Overflow</h3><p>Type: Warning</p><p>Contract: ERC20FreezableImplementation</p><p>Function name: _function_transferBulk</p><p>PC address: 1224</p><p>A possible integer overflow exists in the function `_function_transferBulk`.</p><p>The addition or multiplication may result in a value higher than the maximum representable integer.</p><p>— — — — — — — — — —</p><p>function transferBulk(address[] _toAccounts, uint256[] _tokenAmount) onlyOwner public {</p><p>require(_toAccounts.length == _tokenAmount.length);</p><p>for(uint i=0; i&lt;_toAccounts.length; i++) {</p><p>balances[msg.sender] = balances[msg.sender].sub(_tokenAmount[i]);</p><p>balances[_toAccounts[i]] = balances[_toAccounts[i]].add(_tokenAmount[i]);</p><p>if(!isInvestor[_toAccounts[i]]){</p><p>isInvestor[_toAccounts[i]] = true;</p><p>investors.push(_toAccounts[i]);</p><p>}</p><p>}</p><p>}</p><p>— — — — — — — — — —</p><p><strong>Resolution:</strong> <em>This overflow can be, when _toAccounts.length will be &gt; 2**256+1. It is not possible because of block gas limit. Also, we are using safeMath library, which prevents all of this.</em></p><h3>Exception state</h3><p>Type: Informational</p><p>Contract: ERC20FreezableImplementation</p><p>Function name: _function_0xd73dd623</p><p>PC address: 9071</p><p>A reachable exception has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.</p><p>— — — — — — — — — —</p><p>In file: contracts/SafeMath.sol:45</p><p>assert(c &gt;= a)</p><p>— — — — — — — — — —</p><p><strong>Resolution:</strong> <em>Just information that exception could be. It’s expected behavior.</em></p><h3>Exception state</h3><p>Type: Informational</p><p>Contract: ERC20FreezableImplementation</p><p>Function name: _function_0x9316c3e7</p><p>PC address: 9040</p><p>A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.</p><p>— — — — — — — — — —</p><p>In file: contracts/SafeMath.sol:36</p><p>assert(b &lt;= a)</p><p>— — — — — — — — — —</p><p><strong>Resolution:</strong> <em>Just information that exception could be. It’s expected behavior.</em></p><h3>Exception state</h3><p>Type: Informational</p><p>Contract: ERC20FreezableImplementation</p><p>Function name: _function_0xd880ae89</p><p>PC address: 8396</p><p>A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking.</p><p>— — — — — — — — — —</p><p>investors[i]</p><p>— — — — — — — — — —</p><p>==== Integer Overflow ====</p><p>Type: Warning</p><p>Contract: ERC20FreezableImplementation</p><p>Function name: _function_0xb2f5a54c</p><p>PC address: 7009</p><p>A possible integer overflow exists in the function `_function_0xb2f5a54c`.</p><p>The addition or multiplication may result in a value higher than the maximum representable integer.</p><p>— — — — — — — — — —</p><p>return investors</p><p>— — — — — — — — — —</p><h3>Checking code by <a href="https://tool.smartdec.net/">SmartCheck</a> security tool</h3><h3>Reentrancy</h3><p>Any interaction from a contract (A) with another contract (B) and any transfer of Ether hands over control to that contract (B). This makes it possible for B to call back into A before this interaction is completed.</p><p>This pattern is experimental and can report false issues. This pattern might also be triggered when</p><ul><li>accessing the structure’s field;</li><li>using enumeration element.</li></ul><p>To avoid reentrancy, you can use the Checks-Effects-Interactions pattern as outlined further below:</p><p>pragma solidity ^0.4.11;<br>contract Fund {<br>/// Mapping of ether shares of the contract.<br>mapping(address =&gt; uint) shares;<br>/// Withdraw your share.<br>function withdraw() {<br>var share = shares[msg.sender];<br>shares[msg.sender] = 0;<br>msg.sender.transfer(share);<br>}<br>}</p><p>Note that reentrancy is not only an effect of Ether transfer but of any function call on another contract. Furthermore, you also have to take multi-contract situations into account. A called contract could modify the state of another contract you depend on.</p><p><strong>Resolution:</strong> <em>We avoid this problem with a line like:<br>balances[_to] = balances[_to].add(_value);<br>In the mining moment of the transaction, we are getting the actual value of the balance in the current moment.</em></p><h3>Compiler version not fixed</h3><p>Solidity source files indicate the versions of the compiler they can be compiled with.</p><p>pragma solidity ^0.4.17; // bad: compiles w 0.4.17 and above<br>pragma solidity 0.4.17; // good : compiles w 0.4.17 only</p><p><strong>Resolution: </strong><em>It is recommended to follow the latter example, as future compiler versions may handle certain language constructions in a way the developer did not foresee.</em></p><h3>No payable fallback function</h3><p>The contract does not have a payable fallback. All attempts to transfer or send ether to this contract will be reverted.</p><p><strong>Resolution:</strong> <em>This is an expected behavior.</em></p><h3>Integration testing</h3><p>We can’t make full integration testing with ganache-cli because it’s a bug with using call() method in web3js. It doesn’t allow call function which is not using gas with gas limit &gt; then block size limit.</p><p><strong>Resolution: </strong><em>So we need to launch our personal node of the test network for full integration testing.</em></p><p>Tests which should be made:</p><p>1) Check TransferBack method (This method is used for manually solving possible transfer errors. It transfers tokens from a given address back to the token owner) with different scenarios:</p><ol><li>When address of transaction sender is not owner ⇒ should fail;</li><li>When address parameter is “0x0000000000000000000000000000000000000000” ⇒ should fail;</li><li>When value &gt; account.balance ⇒ should fail;</li><li>When owner calls these methods with real parameters and address balance &gt;= value ⇒ should pass;</li></ol><p>2) Check TransferBulk (Transfer tokens from owner to array of addresses) method with different scenarios:</p><ol><li>When array of recipients and array of token amounts for recipients are different ⇒ should fail;</li><li>When address of transaction sender is not owner ⇒ should fail;</li><li>When owner calls these methods with real parameters ⇒ should pass;</li></ol><p>3) Check getInvestors method:</p><ol><li>Should return array with all investors;</li></ol><p>4) Check getInvestorsBalances method:</p><ol><li>Should return array with investor balances without any gas usage;</li></ol><p>5) Check freeze() method:</p><ol><li>When address of transaction sender is not owner ⇒ should fail;</li><li>Should lock all transfer methods except transferBack and transferBulk, when user tries to call transfer method, should be revert;</li></ol><p>6) Check unFreeze() method:</p><ol><li>When address of transaction sender is not owner ⇒ should fail;</li><li>Should unlock all transfer methods which was locked by freeze() method;</li></ol><h3>ERC20 Testing Cases</h3><p>In order to extend your understanding of smart contracts testing, we’ve run a number of tests for ERC20. Yes, we know a number of tests had already been done and there’s no reason to run tests ourselves. But there’s only one team we can trust in terms of high-quality development and security, so we did them on our own. You can find a list of test cases we went through using the tools described above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*IkIupWUgilv3cwpCOPJLRg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*fB-HZwN2ljOxsrB9WR1-jg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*BW7YE7Ul41RX4rtOOavjFw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*hl1qES5Klrrzd3KHfjt5EA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*saXTAucDl2Fzjp6c8LmqKA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*JEULfqoY3DUQZvD2OBHOeA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*PwgTep0-ud787GVPRHy79g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*mtxma07aXje9BMs2QfzBqA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*s2SxUsLNz3HWdvmF4uIL7w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*tdt89J_RSrHZ5o4_XdjA_A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*OQ_cFWFWudKbaGy_-SInCQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*cYTf_FbDfbganhoCCmsJyQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*FNFUoaLxqElgt0yu-i1T6A.jpeg" /></figure><p>Hooray! We congratulate you for having learned the basics of smart contracts testing. Now you’ll definitely be ahead of your competitors in terms of safety and reliability.</p><p>Have some questions about smart contracts or got a mind-blowing project idea? Just <a href="https://www.zfort.com/contacts">drop us a line</a> and speak with one of our Blockchain experts!</p><p>Originally published at <a href="https://www.zfort.com/blog/ethereum-smart-contracts-testing">zfort.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a4aa4d91ace" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchain-development-publication/ethereum-smart-contracts-security-starts-with-architecture-5a4aa4d91ace">Ethereum Smart Contracts: Security Starts with Architecture</a> was originally published in <a href="https://medium.com/blockchain-development-publication">Blockchain Development Publication</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain Testing: How to Keep Your Ethereum Contracts Safe?]]></title>
            <link>https://medium.com/blockchain-development-publication/blockchain-testing-how-to-keep-your-ethereum-contracts-safe-ddbb5462098d?source=rss----bd66b2d902f1---4</link>
            <guid isPermaLink="false">https://medium.com/p/ddbb5462098d</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Roman Korzh]]></dc:creator>
            <pubDate>Fri, 26 Oct 2018 14:03:05 GMT</pubDate>
            <atom:updated>2018-10-26T14:05:02.588Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*odA7bOa6Zk1zXOsUyruKKQ.png" /></figure><p>According to the consulting giant, Deloitte, GitHub saw the launch of more than 26,000 Blockchain projects in 2016. Github is a popular development platform and supports the code for over 86,000 Blockchain projects. This includes the largest Blockchain project, Bitcoin.</p><p>Deloitte reports that while there have been thousands of new Blockchain programs, a major chunk of them become inactive in some time and only 8% of all Blockchain projects are active now. These numbers are alarming. A failure rate of 92% raises concerns.</p><p>China Academy of Information and Communications Technology (CAICT) has recently completed a research on Blockchain projects and revealing that about 92% of Blockchain projects fail with the average life of a project being 1.22 years.</p><p>There are several reasons that affect the success or failure of a Blockchain project. Almost 15% of the software developed by organizations are still active. Whereas, when it comes to programs developed by users, only 7% of them are active.</p><h3>Why do these projects fail?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*kptQeD3zxea8BFdoQsQqgg.png" /></figure><p>Let’s discuss some common reasons for Blockchain project failures.</p><h3>1. User-developed</h3><p>As discussed earlier, projects developed by users generally fail from the beginning or have a short lifespan. Users generally tinker around and develop prototype ideas that need to progress iteratively to gain traction. This doesn’t usually happen, thus resulting in failure. Also, user-developed programs are mostly aimed at creating a standalone Blockchain instead of a foundation that enables the development of several applications.</p><h3>2. Number of committers</h3><p>The number of contributors to a program also plays an important role in its success or failure. The projects with high number of contributors have a higher chance of survival. Studies show that projects with high failure rate were the ones in which a single committer developed the majority of content.</p><p>If a project has only one committer, it generally happens that they get disengaged and give their time to other projects. This is why projects with just one lead or sole developer often die out. At the same time, we know several successful projects maintained by a single developer. When it comes to having multiple contributors to a project, its survival chances become higher. With several committers, developers don’t need to have their complete focus on one project. And since most organizations have multiple committers, projects by organizations have statistically higher chances of success than those by individual users.</p><h3>3. Number of copies</h3><p>Projects that have more copies (known as forks) have higher chances of survival than those with few or no copies at all. When there are only a few copies, even those with just a few committers have high failure rates. While there have been successful projects that were forks of other projects, but usually fork projects have low chances of success because they don’t get many committers.</p><h3>What keeps transactions safe?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*hYiv0ZNEQI4E03rTRlc_3g.png" /></figure><p>Blockchains are considered very safe. Here are some points that make them so secure.</p><h3>Peer-reviewed</h3><p>As a transaction is completed, it is reviewed by peers and is validated. Once it is validated, it is added to the Blockchain. Since there is no central location doing the review, a hacker will need to hack all nodes simultaneously to hack one block. This is not practically possible, which is what makes Blockchains so secure.</p><h3>Quick notifications</h3><p>Each record in the Blockchain is secured through encryption. Participants of the network have private keys. If a record is changed, its signature becomes void and the peers get to know right then that a change has happened. It’s important to generate immediate notifications so that any alteration is quickly detected.</p><h3>Healthy infrastructure</h3><p>While Blockchains have inherent security features, the projects’ infrastructure will play an important role. Make sure to have an infrastructure that prevents the access to sensitive information, denies unauthorized attempts to alter data, and guards the encryption keys using high-security standards.</p><h3>Contingency plan</h3><p>There can be security related events or human error issues. You must always be ready for a situation which may go out of your control. While a public Blockchain is more exposed to exceptional conditions, problems can occur with private Blockchains as well. There should always be a plan on what do in case of a security issue.</p><h3>Maintenance of keys</h3><p>Private keys are managed through software or smart cards. Both of these methods need some level of protection to make sure that the keys are safe. If the Blockchain is designed to involve physical goods such as freight or money, it’s important to ensure a smooth way in which the smart contract events will be translated to physical processes.</p><p>While these are the general guidelines to keep Blockchains secure, keep in mind that public and private Blockchains differ considerably. In a public Blockchain, systems on the public internet are used to validate the transactions and add blocks to the ledger. In a private Blockchain, there are only permitted members. These members are generally organizations. This forms a private members-only type of business network.</p><h3>Conclusion</h3><p>Make sure you don’t make the common mistakes when developing a new Blockchain project. The recent studies have revealed the major reasons for failure for most Blockchain projects. Are you making these mistakes? Evaluate your project before the execution phase to make sure it’s a success.</p><p>Need more help? Get in touch with our Blockchain experts <a href="https://www.zfort.com/">here</a>.</p><p>Originally published at <a href="https://www.zfort.com/blog/blockchain-testing-keep-your-ethereum-contracts-safe">zfort.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddbb5462098d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchain-development-publication/blockchain-testing-how-to-keep-your-ethereum-contracts-safe-ddbb5462098d">Blockchain Testing: How to Keep Your Ethereum Contracts Safe?</a> was originally published in <a href="https://medium.com/blockchain-development-publication">Blockchain Development Publication</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>