BlockMart – E-Commerce Marketplace using Blockchain

DOI : 10.17577/IJERTCONV7IS08004

Download Full-Text PDF Cite this Publication

Text Only Version

BlockMart – E-Commerce Marketplace using Blockchain

Abhishek P1, Iyaaz Hassan Mohtihsam2, Deepraj K Pednekar3, Kritesh Bhandary O4

    1. Students, Computer Science & Engineering Sahyadri College of Engineering & Management

      Adyar, Mangaluru Karnataka, India

      Prof. Sudheer Shetty5

      Associate Professor, Computer Science & Engineering Sahyadri College of Engineering & Management Adyar, Mangaluru

      Karnataka, India

      Abstract Modern physical marketplaces are places of trust and security where the trust is built on reputation of previous deeds but when it comes to the digital domain we have traditional architecturally centralized marketplace with no transparency or responsibility to resolve the matters of a growing audience and have a hard time applying the same principles as real-world marketplaces due to outdated models of business methodologies that are still in use. The problem is based on the consensus of this complex system where we need a separate eco-system to provide a history of participants to judge reputation, middle man to oversee transactions and resolve all occurring disputes and make trustworthy transparent transaction information to be available to anyone. All of the above key problems can be mitigated by applying Blockchain, a new data structure which uses distributed i.e de- centralized ledger technology to help secure the networks of transactions. BlockMart in this paper aims to be a smart, distributed online e-commerce marketplace application for assets, data, and service exchange in a peer-2-peer network of clients, which is powered by ethereum smart contracts and built using hyperledger fabric.

      Keywords Blockchain, Smart Contracts, Hyperledger, Marketplace, E-Commerce.

      1. INTRODUCTION

        Modern physical marketplaces are places of trust and security where the trust is built on reputation of previous deeds but when it comes to the digital domain traditional architecturally centralized marketplace have no transparency or responsibility to resolve the matters of a growing audience and have a hard time applying the same principles as real-world marketplaces due to outdated models of business methodologies that are still in use. The problem is based on the consensus of this complex system. Blockchain has come into the spotlight as a technology which helps us bind entities and equities across an agreed tamper-resistant relationship which is known as a distributed ledger. The ledger primarily is a database that accounts for all transactions that take palace on the blockchain network so altering it would be futile as we would have to alter all the available copies of the ledger on the network. Based on principles of Merkel trees, blockchain is robust towards network manipulation. Emergence and development of

        blockchain technology has given several major improvements as to how it is applied in various applications, One of them being smart contracts which provide an ordinary distributed network with decision making zero- trust components which fulfilled a major deficiency in the previous requirement as now the contracts can act as an escrow which helps further perform complex transactions. A marketplace requires a buyer and seller where the seller provides products for purchase and buyer pays the specific amount towards the product. The pre-requisite that the seller requires become the foundation for the terms and conditions of the smart contract for the respective transaction. The transactions are all validated before being added into the distributed ledger.

        The security provided by the distributed nature of blockchain makes it really hard to manipulate the network to favor a single user. For a single user to take over the entire blockchain network, they would have to provide the PoW to each node for each processing node. Since each transaction details is public where transaction validation and verification is done using common consensus protocols through mining where a node on the network would put out a request stating they are available to authenticate transactions and then receive a transaction hash that they need to compute in order for the transaction to be processed and update the network with the new block of transaction. The node that is mining is called a miner does so for the incentive of receiving a percentage of the transaction or a set amount of value that is predefined by the consensus algorithm which increases difficulties and lower reward values as more miners are working. This makes the application of blockchain very suitable in an eco-system of transactions like our marketplace.

        The blockchain used in this paper will not be on any main cryptocurrency exchanges due to real cost constraints of the soaring price of most coins and shall use the networks utilized by the hyperledger composer to build the network of nodes that will interact with each node for every transaction that take place throughout its history this will ensure node drop and other network related problems will not affect the network at a large.

      2. RELATED WORK

        The idea of decentralized cryptocurrencies has been discussed long before but a successful implementation failed to follow when an anonymous author [1] created the very first blockchain as a form of a network of data nodes with a zero-trust secure blind authority using proof-of-work as the basis. Since then many have examined numerous applications of blockchain and with ethereum smart contracts [2] have played a major role in the acceptance of blockchain in a modern transaction environment. Ethereum plays a major role in this project allowing for an eco-system of generalized higher level abstract application to be built around the smart contracts it provides which form the backbone that drives the user trust in the consensus algorithm. In [3], author explore more possibilities of blockchain in educational systems to widen our understanding of the impact blockchain has on across domains, where [4] proves that during scaling if any issues arise then the application itself can be decentralized to help scale faster for better performance but it also depicts the downside of local decentralization on the client side. Hyperledger Composer is an open source protocol for blockchain [5] which provides business to business or business to customer transaction networks. The composer is then made into a fabric which is a consortium of similar networks which helps us understand the implication of every architecture that this paper plan to build. The structure of hyperledger composer is shown in Fig 4. The use of hyperledger is perfect for the marketplace application which makes approach standardized as the design is industry oriented.

      3. METHODOLOGY

        Fig. 2 shows the system architecture and Fig. 3 shows the dataflow diagram of the proposed system.

        The first design that was used, was a simple implementation of blockchain as a proof-of-concept to understand as to what would be the nature and behavior of users in a decentralized application as illustrated in the Fig 1.

        Fig. 1. Simple Blockchain Implementation

        The resolve among issues where there were inconsistencies in the said product required a lot of manual intervention due to lack of proper network to handle the escrow disputes, the paper implementation focus on to build a blockchain network to store:

        1. Product/Services that a seller provides

        2. Buyer wallet amount

        3. Transaction history (Buyer, Seller, Contract). These are illustrated in the system architecture below.

          Fig. 2. System Architecture

          Three layers of architecture provide the evironment required to set up the marketplace. The NodeJS server will act as an intermediary between the front-end and the backend blockchain. The layer in the middle will oversee all transactions through smart contracts using escrows. The network will still completely function even if nodes drop out and leave the network. The loss of information that arises with the loss of those nodes will be replicated from other nodes to rebuild the same network integrity. The amount deducted from the buyer and the products provided by the seller are both put into an escrow and within a given time the smart contract resolves the transactions and any discrepancies will reverse the transaction and send notifications correspondingly.

          The components that make up the decentralized marketplace are

          1. Participants – Which will comprise of buyer and seller

          2. Assets – Which will be the product or service provided

          3. Transactions – Which will be the contracts used and their parameters.

        The flow of data between the participants is shown in the Fig 3 below.

        Fig. 3. Dataflow diagram

        In this implementation, a NodeJS server and corresponding composer libraries installed for the hyperledger composer. Hyperledger fabric composer was our choice to help us create and manage the distributed database. Docker- Compose was used to build the hyperledger compose playground locally. A composer-rest-API is used to talk to the blockchain itself. The user interface is built using Python and on front-end technologies. The compose-rest- API will accept valid transaction data which will then interact with the NodeJS server to push the necessary changes to the blockchain network. The wallet is of the buyer and seller is generated locally according to the same industry standard. The implementation is based on models of business networks that are required to be designed forehand for the hyperledger fabric and also the smart contracts with transactional constraints and conditions. Both, as well as the scripts, is written in ES6 Javascript as it the standard for hyperledger fabric composer. Fig 4. Illustrates the hyperledger fabric composer architecture.

        Fig. 4. Hyperledger Fabric Composer Architecture

      4. RESULTS

        The recent version of the e-commerce market works well for a simple blockchain network. In this paper the implementation have not utilized real currencies due to financial restrictions. Areas of improvements exist for implementation on the real blockchain networks which could build the transaction system using the bitcoin or any other crypto currency so that whole transaction market will be transparent, and robust in its functioning.

        However, the proposed system is free from all the security

        Fig. 5. Report of security vulnerability

      5. CONCLUSION

        The system prosed in this paper, BlockMart as one many applications that blockchain might soon be the first choice. However, the scenarios applied are limited and need further refinement if they are to be applied on a larger scale. Validating and transaction history will also provide new means of data to be utilized to make the current systems better e.g. authentic users with the purchase and current product ownership are the only ones to have permission to leave a review where if one of the condition fails then the review will be removed. The idea of network among networks with transparency and fairness at its core will take over traditional thinking of transaction models as open source has so often seen that proprietary systems will eventually fall a few steps behind their open source alternatives. The hyperledger fabric composer provided the fundamental building block for our blockchain where no user can manipulate contents of a block and re-introduce it successfully, such nature allowed us to create a lot more features swiftly without lower-level implementation hurdles which were a major problem intially. Blockchain technology is progressing at a rate that has grabbed everyone's attention throughout the industry and its application is only limited by our imaginations where there could be an application that was so revolutionary it just might change the face of the transaction and create new industries of the future.

      6. ACKNOWLEDGEMENT

We thank our guide, coordinators and our college for providing full support.

REFERENCES

  1. Bitcoin: A Peer-to-Peer Electronic Cash System. Satoshi Nakamoto – 2007.

  2. H. Kopka and P. W. Daly, A Guide to L A TEX, 3rd ed. Harlow, England: Addison-Wesley – 1999.

  3. Exploring blockchain technology and its potential applications for education. Guang Chen, Bing Xu, Manli Lu, Nian-Shing Chen – 2018.

  4. Storj A Peer-to-Peer Cloud Storage Network. Shawn W., Tome B., Josh B.,James P., Gordon H., Patrick G., Philip H., Chris P. – 2016IPFS – Content Addressed, Versioned, P2P File System. Benet J.

    2017

  5. Hyperledger-Composer; https://hyperledger.github.io/composer/introduction

Leave a Reply