Blockchain Education Platform Launch
Blockchain Education Platform Launch
io
 BLOCKCHAIN
FOR EVERYONE
   FEBRUARY 2019
BLOCKCHAIN FOR EVERYONE: belgem.io                                                   2                                                                                                   3
INTRODUCTION
                                     Trying new technologies is inherent in BKM’s         The “business” between the “buyer” and         Various players, including major banks, will explore
                                     culture. We pilot solutions built on AI, IOT, AR     “seller” is conducted through “intermediary    the use of the blockchain technology, allowing for
                                     & blockchain, to assess their potential. Since we    institutions” and “notary services.”           the safe implementation of many activities such as
                                     believe that value of knowledge is appreciated       B2B Business model doesn’t rely on a           e-commerce, file sharing and communication. We
                                     once it is shared, we document our findings          workflow between businesses; it requires       expect many organizations will soon cooperate to
                                     and share it with our ecosystem. Blockchain is a     the intermediation and surety of many          develop a common blockchain infrastructure and
                                     technology we intently focus on learning since it    organizations, authorities and companies.      take advantage of the opportunities offered by the
                                     is an ecosystem solution at its core.                                                               technology.
                                                                                          Blockchain technology offers a game-
                                     We are proud to launch belgem.io, our second         changing shift to businesses by removing       We foresee over 25 percent of the world’s
                                     blockchain-based product (after introducing BBN      the need for an intermediary or a validation   largest 2,000 companies investing in blockchain
                                     on the Hyperledger Fabric platform). You can         authority.                                     technologies in the next year. In 2019, 25 percent
                                     now safely store your certificates of education                                                     of the prosthetic 3D printers will operate on
                                                                                          As in the belgem.io project, blockchain will
                                     on our Ethereum-based cloud platform, belgem.                                                       blockchain, providing a secure data-sharing and
                                                                                          make life easier for people in many fields,
                                     io. This report explains the purpose of belgem.io,                                                  developing patient-specific solutions. By 2020, 25
                                                                                          including finance, energy, healthcare,
                                     the architectural structure of the platform and                                                     percent of the world’s top trading banks, nearly
                                                                                          telecommunication, education and logistics.
                                     other technical details.                                                                            30 percent of manufacturers and retailers, and 20
                                                                                          It does this by eliminating trust issues       percent of healthcare institutions will utilize the
                                     We were among the pioneering companies that
                                                                                          between individuals.                           blockchain network when providing their services.
                                     established Blockchain Türkiye in 2018,
                                                                                          At VeriPark, we consider blockchain a          By 2021, 20 percent of the data acquired from
                                     and we recognize that creating the right                                                            open-source networks will be recorded to a public
                                                                                          breakthrough technology that will change
                                     ecosystem is the key to success when using                                                          blockchain network and many applications will be
                                                                                          the future, and prepare our infrastructure
                                     blockchain-based solutions. belgem.io,                                                              developed to verify them. By 2022, the data of more
                                                                                          for tomorrow through R&D and concept
                                     another outcome of this vision, is the fruit of                                                     than a billion people will be stored on a blockchain
                                                                                          validation.
                                     our consortium’s efforts with VeriPark and                                                          network.
                                     Microsoft. Blockchain will continue to make
                                                                                                                                         Striving to help everyone and each organization
                                     headlines in the coming period and we will keep
                                                                                                                                         achieve more, Microsoft considers the belgem.io
                                     sharing our findings from our trial projects with
                                                                                                                                         project a major achievement for Turkey,
                                     you.
                                                                                                                                         one that will unify education and a new
                                                                                                                                         technological milestone: the blockchain. The
                                                                                                                                         platform is one of the world’s first applications
                                                                                                                                         developed with Ethereum Proof-of-Authority
                                                                                                                                         Consortium that runs on Microsoft Azure cloud
                                                                                                                                         computing platform. In cooperation with BKM and
                                                                                                                                         VeriPark, we have taken a major step in education
                                                                                                                                         through the use of this technology, allowing for
                                                                                                                                         safe and fast transactions. We are pleased that our
                                                                                                                                         innovative projects are contributing to the digital
                                                                                                                                         transformation of Turkey.
BLOCKCHAIN FOR EVERYONE: belgem.io   4                                                                                             5
Executive Summary
1. 	     The Technical Infrastructure of belgem.io                                              When choosing between these platforms, the team aimed to meet various
                                                                                                expectations, such as:
                                                                                                 >> A closed-circuit system and a governance structure that can only grow or
1.1	     What is belgem.io?
                                                                                                 shrink by the joint decision of the system peers,
         belgem.io is a digital platform
                                                                                                 >> A blockchain structure that allows for MetaMask or similar digital wallet
         designed to store, view and share                                                       applications,
         educational certificates on a private
                                                                                                 >> Use of a new programming language during the development process of
         Ethereum blockchain. Developed in
                                                                                                 smart contracts,
         cooperation with BKM (Interbank Card
                                                                                                 >> A technically competent platform whose support services are able to produce
         Center), Microsoft and VeriPark, this
                                                                                                 quick solutions to problems.
         platform aims to test concepts such as
         Ethereum, smart contracts, Proof-of-                                                   We have chosen Ethereum, a blockchain-based distributed computing platform that
         Authority consensus algorithms and                                                     is preferred by many distributed applications. Our decision was also influenced
         governance between organizations.                                                      by Ethereum’s support of multiple consensus algorithms. When developing the
         Thanks to its governance panel,                                                        application, we tested both the Proof-of-Work and the Parity-based Proof-of-
         each decision is submitted for voting                                                  Authority on Azure. We also experienced the Truffle Framework, which provides
         with a majority requirement of 51                                                      great convenience through Ethereum transactions and smart contract tests. Our
                                                                                                final choice was the Ethereum Proof-of-Authority Consortium, which, thanks to its
         percent. belgem.io uses a private and a
                                                                                                structure, does not require mining, has an efficient governance portal and a block
         permissioned blockchain network. The
                                                                                                production rate of two or four seconds. Thanks to our partnership with Microsoft,
         platform is positioned on Ethereum Proof-
                                                                                                we created belgem.io through the mutually nurturing combination of Ethereum and
         of-Authority Consortium on Azure’s cloud
                                                                                                Proof-of-Authority Consortium.
         platform.
1.2	     The Blockchain Platform                                                         1.3	   Top Level Architecture and Technologies
                                                                                                We primarily used some open-source technologies during the
         belgem.io runs on the Ethereum blockchain
                                                                                                implementation stage of the project.
         platform.
                                                                                                 >> Operating System: Windows
         It is one of the world’s first applications developed with Ethereum Proof-of-
         Authority Consortium on Microsoft’s Azure cloud computing platform in July              >> Application server: Windows Server
         2018. The platform uses the Proof-of-Authority consensus algorithm to make              >> Database server: MS SQL
         joint decisions between the nodes.                                                      >> Blockchain platform: Ethereum
                                                                                                 >> Blockchain product: Azure Ethereal Proof-of-Authority Consortium
         At the beginning of the project, the following alternatives                             >> Web development platform: ASP.NET MVC
         were evaluated:                                                                         >> Programming languages: C#, Go, Solidity, JavaScript
           >> Ethereum Proof-of-Authority Consortium (Azure)                                    The first four organizations to issue certificates on belgem.io are Microsoft
                                                                                                Cloud Society, FinTech Istanbul, BayBayNakit Akademi and the Blockchain
           >> Ethereum Proof-of-Work Consortium (Azure)                                         Turkey Platform (BCTR). We assigned the admin role to an account from BKM
           >> Parity Ethereum PoA (Azure)                                                       and authorized them to become a peer on the blockchain network. This means
                                                                                                that the governance practice involves a voting right. When new organizations
           >> R3 Corda                                                                          are proposed to the system, the decisions will be made in line with the votes of
                                                                                                internal institutions and the manager. Each peer on the blockchain has equal
           >> Hyperledger Sawtooth
                                                                                                voting right for the decisions on the governance portal. This structure, formed
           >> Customized Bitcoin                                                                with smart contacts, imposes a majority requirement of 51 percent.
BLOCKCHAIN FOR EVERYONE: belgem.io                                                                           8                                                                                                    9
          Participating organizations should choose one of the following options to                                   1.4	      Why do we use Blockchain on Azure?
          issue a certificate on belgem.io:                                                                                     Blockchain applications on Microsoft Azure support simple setup templates
          I. Become a blockchain node                                                                                           for anyone with an entry-level Azure and blockchain infrastructure. The
             1. Each partner that chooses this option is entitled to participate in the private                                 blockchain network topology is created within minutes thanks to the simple
             network in line with the voting. They are each required to open an account on                                      installation screens of the products provided by the Azure portal. We
             Azure and set up the Ethereum Proof-of-Authority Consortium. The installation is                                   focused on developing our application and scenarios, rather than spending
             completed with the public key created using MetaMask and the information about                                     hours building and configuring the infrastructure. The Proof-of-Authority
             belgem.io blockchain.                                                                                              Consortium was the perfect match for belgem.io app. It met our requirements
             1. The BKM admin provides the organizations in the blockchain network with the                                     with its private and permissioned blockchain network, distributed governance
             necessary information to login to the belgem.io web application. They are granted                                  feature and its management portal for enterprise blockchain projects. It took
             the authorization to send transactions to the blockchain using the web application.                                only 16 minutes to restore functionality to the entire network after keying in
             Through the permissioned transactions, they can create and issue certificates.                                     the platform features of belgem.io on Azure’s portal. The consensus algorithm,
                                                                                                                                Proof-of-Authority, creates a new block every four seconds, without the need
          II. Only execute permissioned transactions
                                                                                                                                for mining.
             >> Organizations chosing this option are permitted to create and issue
             certificates. These institutions are not entitled to a voting right for new
             participants and are not included in the governance platform since they are not                          1.5	      Verification on belgem.io
             blockchain nodes.                                                                                                  One of the main scenarios of the belgem.io app is that users can easily access
          Even though belgem.io is a private blockchain network, its structure allows access to                                 the certificates issued in their name and share them in a digital environment.
          the contracts through the cloud client information. People with malicious intent may                                  belgem.io contains two main roles: “educational institution” and “user.”
          send false transactions to smart contracts.                                                                           Educational institutions may vote by joining the distributed governance
          This can cause the application to lose functionality by collapsing the network or                                     application, and produce and send certificates to user accounts, through their
          cause problems on the governance. To prevent this, we developed a Transaction                                         MetaMask account. Users, however, are not associated with any MetaMask
          Permissioning smart contract for the governance portal and certificate contracts. This                                wallet. Users can access their profiles created with their verified credentials
          contract aims to ensure that only the addresses authorized by the belgem.io peers can                                 through the BKM Express application, and view and share their certificates.
          access the belgem.io contracts and send transactions.                                                                 For a non-MetaMask user, validated credentials were transferred to the belgem.
                                                                                                                                io’s database in exchange for a donation transaction via BKM Express. In
                             Figure 1: Top Level Architecture Diagram                                                           respect to GDPR, credentials are considered as sensitive data, they may be
                                                                                                                                shared with the application/institution/blockchain only if approved by the user.
                                                                                                                                BKM already utilizes the BKM Express application for user authentication.
                                                                                   Azure Ethereum                               E-Government authentication, mobile applications of banks and authentication
                                                                                     Blockchain
                                                    Internet                                                                    solutions for operators can serve as an alternative to this function for future
                                                                                                                                user scenarios.
                                      MetaMask
    Application admin                                                                                                           When the user first registers for belgem.io, the institution simultaneously
                                                                                                                                performs the verification process using this information.
1.5.2 	 Organization Verification through MetaMask on belgem.io                                              cryptocurrency, Ether is also used to pay for transaction fees and services by
         An institution must be invited by another institution to register the platform. The                 application developers on the Ethereum network. There is also a second type
         new institution’s public key and authorized person information are filled out on the                of token called GAS. The performance of each transaction or smart contract
         Organization Screen. The authorized person then receives the request and submits                    execution is measured and paid for by GAS. However, belgem.io uses a PoA
         the new institution’s proposal to the consortium through the governance application.                consensus algorithm, eliminating the need for these types of fees. This way, PoA
         Once the new institution is found to be eligible to participate, belgem.io manager will             spares users and educational institutions that join belgem.io the cost of dealing
         notify the authorized person to complete the registration process.                                  with crypto-management.
         Ether, a type of crypto token that fuels the network. Beyond being a useful
BLOCKCHAIN FOR EVERYONE: belgem.io                                                                  12                                                                                               13
           >> The process of deploying the smart contract is triggered by a transaction.                          The Ethereum Virtual Machine makes the process of creating blockchain
           >> The transaction must take effect.                                                                   applications significantly easier and more efficient. Instead of having to build an
                                                                                                                  entirely original blockchain for each new application,
           >> Peer nodes perform the mining “competitively.”
           >> The new block generated after a successful mining operation includes a                     2.1.4	   In Which Fields Can We Utilize the Ethereum Network?
           transaction and contract address.                                                                      Ethereum enables developers to build and deploy decentralized applications.
           >> The new block created by the miner will be broadcasted to the peer nodes.                           A decentralized application, or dApp, serves a particular purpose to its users.
                                                                                                                  Bitcoin, for example, is a dApp that provides users with a peer-to-peer electronic
           >> The new block will be validated by the peer nodes to become an official block in
                                                                                                                  cash system and facilitates online Bitcoin payments. Because decentralized
           the local blockchain.
                                                                                                                  applications are made up of code that runs on a blockchain network, they are not
           >> The new instance of the Smart Contract contains a unique address. This address
                                                                                                                  controlled by any individual or central entity.
           must be recorded for the next contract deployment.
                                                                                                                  Ethereum can also be used to build Decentralized Autonomous Organizations
         Smart Contract Execution
                                                                                                                  (DAO). A DAO is a fully autonomous, decentralized organization with no single
         Functions included in smart contracts can be run by an external account or a                             leader. DAOs are run by programming code on a collection of smart contracts
         distributed application (dApp).uygulama tarafından çalıştırılabilirler.                                  written on the Ethereum blockchain. The code is designed to replace the rules
                                                                                                                  and structure of a traditional organization, eliminating the need for people and
                                                                           Transaction for Execution
                                                                                                                  centralized control. Anyone who purchases a token will be considered the owner
               Smart contract                                              Function:
                                              External account             Transaction: Hash                      of a DAO. However, these tokens do not equate to equity shares and ownership;
              account Instance
                                                                           From: Mining Node                      rather they serve as contributions to grant voting rights. Inspired by DAO,
                                                                           Input: Function parameters
                                                                                                                  belgem.io’s governance structure is autonomized by smart contracts.
                                                                                                         2.1.5	   What are the drawbacks of Ethereum implementation?
                                                                                                                  Despite their numerous benefits, decentralized applications are not perfect.
                                                                                                                  As smart contract code is written by humans, smart contracts are only as good
              Peer nodes verify                Miner bradcast                                                     as the people who write them. Code bugs or oversights can create unintended
             and confirm the new                 New Block                          Mining
                 block locally                 Status changes                                                     issues.
                                                                                                                  Mistakes or errors in the smart contract code can leave it vulnerable to attacks.
                                                                                                                  This can cause security breaches, such as the unauthorized access of the network
           >> To execute a function defined in the smart contract, the address of the smart                       consensus, and a rewriting of the underlying code. This goes against the essence
                                                                                                                  of the blockchain, which is meant to be immutable. To fortify belgem.io, we have
           contract is taken.
                                                                                                                  developed and rigorously tested highly advanced protective smart contracts.
           >> Each function that changes the state calls a transaction.
                                                                                                         2.1.6	   Private and Permissioned Ethereum Blockchain Structure
           >> The transaction must be mined to be approved.
                                                                                                                  Blockchain networks are divided into different categories according to the
           >> The new block generated after a successful mining operation includes a
                                                                                                                  right to read and write data. These categories are often called “private” and
           transaction.
                                                                                                                  “public,” though it would be more accurate to call them “permissioned” and
           >> The new block created by the miner will be broadcasted to the peer nodes.                           “permissionless.” Public and private classifications can be made under these
           >> The new block will be validated by the peer nodes to become an official block in                    categories as follows.
           the local blockchain.
                                                                                                                                         Table 2: Blockchain Structures
2.1.3	   Ethereum Virtual Machine (EVM)                                                                                        Permissioned                                Permissionless
         Ethereum’s core innovation, the Ethereum Virtual Machine (EVM), is a “Turing
         complete software” that runs on the Ethereum network. It enables anyone to                               	Private	                   Public       	Private	                        Public
         run any program regardless of the programming language, time and memory.
BLOCKCHAIN FOR EVERYONE: belgem.io                                                           14                                                                                             15
         In permissioned blockchains only designated peers with specific rights can                 2.2	   Our Software Development Tools
         contribute to block formations and consensus. However, in permissionless
                                                                                                    2.2.1	Truffle
         blockchains all peers can contribute to block formation and consensus. Private
                                                                                                           Truffle is a development framework that allows developers to easily develop
         blockchain structures determine who information is shared with. In private
                                                                                                           applications on Ethereum. Here are the top features of Truffle that we utilize
         blockchains, the network and blockchain data is restricted to those who have
                                                                                                           throughout the project:
         specific permission. In public blockchains, the network is open to all peers.
                                                                                                            >> Smart contract compilation, linking and testing
         belgem.io usecase aims to house the governance structure on a private chain and offer
         free transactions. belgem.io is a blockchain solution that falls within the permissioned           >> Automated testing for quick development
         and private blockchain category. With its improved data security and confidentiality,              >> Easy switch and transfer between structures
         this structure is typically preferred in enterprise blockchain solutions..                         >> Private and public network management
         What advantages does a private chain offer over a public chain?                                    >> Package management with EthPM and NPM
         Below are the top advantages that a private chain can offer institutions and                       >> Interactive console for direct contract interaction
         organizations.
                                                                                                    2.2.2	Ganache
           >> Transactions are cheaper or free of charge.
                                                                                                           Ganache, formerly called TestRPC, offers a personalized blockchain structure
           >> You are less likely to experience delays.                                                    where you can test your distributed applications. Ganache is available for
           >> You have more authority and control over the chain.                                          Windows, Mac and Linux, allowing you to easily test your application on your
                                                                                                           own computer‘s blockchain.
2.1.7	   Azure Ethereum Proof-of-Authority Consortium
         The Ethereum Proof-of-Work Consortium is a governance platform designed to                 2.2.3	Parity
         make it easier and quicker to authorize, configure and manage a multi-member                      Miners, service providers and exchanges need fast synchronization and
         consortium Ethereum network with minimal Azure and Ethereum knowledge. With                       maximum up-time. Parity Ethereum provides the core infrastructure required
         a single-click deployment through the Azure portal, each member can update the                    for fast and reliable services. Developed using the programming language Rust,
         organization name, and add new organizations or remove existing organizations                     Parity aims to be the fastest and the most secure Ethereum client.
         from the consortium.                                                                              Highlights of Parity:
         Although belgem.io is a private blockchain network, users could potentially connect                >> Modular codebase for easy customization
         to the network through the belgem.io client (RPC) information. This means they                     >> Advanced CLI-based client
         could send transactions to the governance app and certificate authentication
                                                                                                            >> Minimum memory and storage requirements
         contracts.
                                                                                                            >> Synchronize in hours Warp Sync
         To prevent fraudulent transactions, we wrote an additional contract, which
                                                                                                            >> Modular for integration into your service or product
         includes Transaction Permissioning. This ensures that only authorized accounts
         can perform transactions. The “admin” organization, which is the first participant         2.2.4	 Azure CLI 2.0
         on the private network, adds a new participant in the governance application by                   Azure CLI 2.0 is a cross-platform command-line tool for managing Azure
         authorizing accounts that join the system through this contract.                                  resources. It makes it easier to manage your resources with scripts. We
                                                                                                           have taken advantage of the forums and documentations of Azure CLI. This
2.1.8	Performance
                                                                                                           has enabled us to save time when installing the blockchain with the desired
         The block creation statistics of the belgem.io application is displayed on Azure
                                                                                                           features. You can use it in your browser with Azure Cloud Shell, or install it on
         Monitor.
                                                                                                           macOS, Linux or Windows and run it on the command line.
         You can perform the following actions through Azure Monitor:
                                                                                                    2.2.5	Solidity
           >> Detection of infrastructure and network interruptions
                                                                                                           Solidity is a contract-oriented programming language for writing smart
           >> Monitoring network statistics of each node
                                                                                                           contracts. It is used for implementing smart contracts on Ethereum and various
           >> Customized transaction tracking                                                              blockchain platforms. It was influenced by C++, Python and JavaScript and
           >> Creating performance output                                                                  is designed to run on Ethereum Virtual Machine (EVM). It was developed
BLOCKCHAIN FOR EVERYONE: belgem.io                                                           16                                                                                                                           17
         by former Ethereum core contributors, such as Gavin Wood, Christian                          lifespan. Because of this, we send the transactions performed within the belgem.
         Reitwiessner, Alex Beregszaszi, Liana Husikyan, and Yoichi Hirai.                            io to the public keys generated by Microsoft Azure Key Vault (Cloud HSM) and
2.2.6	 Contract ABI (Application Binary Interface)                                                    did not write any critical data to the blockchain. We created a public key for each
         Smart contracts are compiled to bytecodes under a specific contract address and              user who registered to belgem.io on Key Vault with a FIPS 140-2 Level 2 HSM and
         stored in the blockchain. An ABI is necessary to access the contract bytecode,               sent the certificates to these public keys.
         specify which function in the contract to invoke, and guarantee that the function            You can see the transaction set and the distribution of the data in the table
         will return data in the expected format.                                                     below.
2.2.7	Web3.js
         The web3.js library is a collection of modules that allows you to interact with a
         local or remote Ethereum node using an HTTP or IPC connection.                                                                Web Application            Server Database                  Blockchain
         This official javascript API enables interaction with smart contracts.                        User Login                  User Email and Password   Verification and               -
                                                                                                                                                             Authorization Transactions
2.2.8	Nethereum
                                                                                                       User Registration           Authentication with       User Information               Public key created
         Nethereum is the .Net integration library for Ethereum. It simplifies the access to                                       BKM Express                                              on behalf of the user
                                                                                                                                                             (TRIN number, name, surname,
         and interaction with smart contracts both for public and permissioned Ethereum                                                                      email and mobile number)
         nodes like Geth, Parity or Quorum.
                                                                                                       Organization Registration   Starting the Process      Information about the          Organization’s public key
                                                                                                                                                             institution and the
2.2.9	 List of Ethereum Clients                                                                                                                              authorized person
         We prefer to use Parity for belgem.io, as it is one of the Ethereum protocol’s                Certificate Request         Information about the     Certificate requesting         -
                                                                                                                                   requested certificate     institution, requester and
         seven clients. It uses the Azure Ethereum Proof-of-Authority’s consortium                                                                           certificate information
         product, and Parity’s Aura consensus engine.
                                                                                                       Certificate Registration    Information about the     Certificate issuer,            Certificate issuer,
         The other Ethereum clients include:                                                                                       requested certificate     certificate holder, name       certificate holder, name
                                                                                                                                                             and date on the certificate    and date on the certificate
3.2	Glossary                                                                                         >> Elliptic Curve Digital Signature Algorithm (ECDSA): ECDSA is a cryptographic
         >> Address: Cryptocurrency addresses are used to send or receive transactions on            algorithm used by Bitcoin to ensure that funds can only be spent by their rightful
         the network. An address is a string of alphanumeric characters that can also be             owners.
         represented as a scannable QR code.                                                         >> Encryption: Encryption is the process of turning a clear-text message (plaintext)
         >> Asymmetric Cryptography: Asymmetric cryptography is also known as public                 into a data stream (cipher-text), which resembles a meaningless and random
         key cryptography. It uses public and private keys to encrypt and decrypt data. The          sequence of bits.
         keys are simply large numbers that have been paired together but are not identical          >> Ether: Ether is the native token of the Ethereum blockchain and is used to pay for
         (asymmetric). A public key may be shared with everyone, while the private key in the        transaction fees, miner rewards and other services on the network.
         Parity is kept secret. Protocols such as SSH, S/MIME rely on asymmetric cryptography        >> Ethereum: Ethereum is an open software platform based on blockchain technology.
         for encryption and digital signature functions.                                             It enables developers to build and deploy smart contracts and decentralized
         >> BBN: A company loyalty platform that enables the acquisition and consumption of          applications.
         gifts to engage company employees. Named “Bye Bye, Cash” after the slogan for BKM’s         >> Ethereum Test Network: To mitigate the risk of bugs in your smart contract on the
         communications projects with the vision of cashless payments, BBN intends to test           main net, it is important to test it before deploying to the Main Network. Ethereum
         concepts such as digital identity, distributed ledger, smart contracts and consensus.       has multiple test networks that can be configured as an acceptance environment.
         >> BKM Express: A payment system that makes online shopping fast, easy and                  Ethereum provides several test networks, such as Rinkeby, Ropsten, and Kovan.
         joyful, developed with BKM, banks and leading companies of e-commerce area. Card            >> EVM – Ethereum Virtual Machine: EVM is the Ethereum smart contracts bytecode
         owners can shop without sharing any card information online by saving their cards on        execution environment. Each node in the network runs EVM. All the nodes execute all
         BKM Express. The places of business that accept card on e-commerce websites can             the transactions that point to smart contracts using EVM. This means that every node
         approach more customers as a Member Place of Business of BKM Express.                       performs the same calculations and stores the same values.
         >> Blockchain: A digital distributed ledger, comprised of unchangeable, digitally           >> EVM Bytecode: This is the programming language in which accounts on the
         recorded data in packages called blocks. Each block is then “chained” to the next block     Ethereum blockchain can contain code. The EVM code associated with an account
         using a cryptographic signature. This allows blockchains to be used like a ledger, which    is executed every time a message is sent to that account, and has the ability to read/
         can be shared and accessed by anyone with the appropriate permissions.                      write storage and send messages.
         >> Confirmation: This means the blockchain operation has been verified by the               >> GAS: The usage of blockchain costs money. This money is used to reward miners
         network. This occurs through a process called mining, in a proof-of-work system (e.g.       who validate your transactions and append them to the blockchain. All transactions
         Bitcoin). Once a transaction is confirmed, it cannot be reversed or double spent.           on the blockchain have an associated fee called GAS. GAS is a unit of complexity that
         >> Consensus Algorithm: A consensus algorithm ensures that the next block in a              is used to set the price of code execution. GAS complexity does not depend on the
         blockchain is the one and only version of the truth. It also keeps powerful adversaries     current value of ether.
         from derailing the system and successfully forking the chain. The most common               >> Geth Console (Go Ethereum): Geth is the command line interface for running a
         consensus algorithms are Proof-of-Work, Proof-of-Stake and Proof-of-Authority.              full Ethereum node implemented in Go. Installing and running Geth allows you to
         >> Cryptography: Cryptography is the encryption and decryption of data. There are           take part in the Ethereum frontier live network, mine real ether, and transfer funds
         two main cryptographic concepts used in blockchain: hashing and digital signatures.         between addresses. It also allows you to create contracts and send transactions,
         In general, there are three widely used forms of encryption: symmetric cryptography,        explore block history, and much more.
         asymmetric cryptography, and hashing.                                                       >> Hash Functions: The hash function transforms the digital signature before sending
         >> dApp (Distributed Application): A decentralized application (dApp) is an application     it and the hash value to the receiver. The receiver uses the same hash function to
         that is open source and operates autonomously with no entity controlling the majority       generate the hash value and then compares it to what they received with the message.
         of its tokens.                                                                              If the hash values are the same, it is likely that the message was transmitted without
         >> Digital Signature: A digital signature proves that a message originated from a           errors.
         specific person and no one else. When you visit a website, you are using SSL. This uses     >> Immutability: Immutability means a block cannot be modified after it is created.
         a digital signature to establish trust between you and the service.                         In blockchain, blocks are chained together so that you can’t go back and change
         >> Distributed Ledger: A type of database that is spread across multiple sites, countries   their contents without having to change every subsequent block. Depending on
         or institutions. Distributed ledger data can be either “permissioned” or “permissionless”   the consensus protocol, you can’t change blocks without the express agreement of
         to control who can view it.                                                                 everyone involved. This is sometimes referred to as “mutable by consensus.”
BLOCKCHAIN FOR EVERYONE: belgem.io                                                                20                                                                         21
                                              CONTENTS
                                              	   Introduction		                                                         2
                                              	   Executive Summary	                                                      5
                                              1	 The Technical Infrastructure of belgem.io	                              6
                                              	1.1	    What is belgem.io?	                                               6
                                              	1.2	    The Blockchain Platform	                                          6
                                              	1.3	    Top Level Architecture and Technologies	                           7
                                              	1.4	 Why do we use Blockchain on Azure?	                                  9
                                              	1.5	    Verification on belgem.io	                                        9
                                              		 1.5.1	        User Verification through BKM Express on belgem.io	       9
                                              		 1.5.2	        Organization Verification through MetaMask on belgem.io	 10
                                              		 1.5.3	        Digital Document Verification on belgem.io	               10
                                              2	 Lessons Learned	                                                        10
                                              	   2.1	Ethereum	                                                          10
                                              		 2.1.1	        Ethereum Blockchain	                                      10
                                              		 2.1.2	        Smart Contracts	                                          11
                                              		 2.1.3	        Ethereum Virtual Machine (EVM)	                           12
                                              		 2.1.4	        In Which Fields Can We Utilize the Ethereum Network?	     13
                                              		 2.1.5	        What are the drawbacks of Ethereum implementation?	       13
                                              		 2.1.6	        Private and Permissioned Ethereum Blockchain Structure	   13
                                              		 2.1.7	        Azure Ethereum Proof-of-Authority Consortium	             14
                                              		 2.1.8	Performance	                                                      14
                                              	   2.2	 Our Software Development Tools	                                   15
                                              		 2.2.1	Truffle	                                                          15
                                              		 2.2.2	Ganache	                                                          15
                                              		 2.2.3	Parity	                                                           15
                                              		 2.2.4	 Azure CLI 2.0	                                                   15
                                              		 2.2.5	Solidity	                                                         15
                                              		 2.2.6	 Contract ABI (Application Binary Interface)	                     16
                                              		 2.2.7	Web3.js	                                                          16
                                              		 2.2.8	Nethereum	                                                        16
                                              		 2.2.9	 List of Ethereum Clients	                                        16
                                              	   2.3	 Sensitive Data Management	                                        17
                                              		 2.3.1	        Azure KeyVault	                                           17
                                              3	 Conclusion		                                                            17
                                              	   3.1	Conclusion	                                                        17
                                              	   3.2	Glossary	                                                          18