Implementation of national cryptocurrency using ethereum development platform

Received Feb 09, 2019 While Ethereum run in public networks which make the blockchain size large and transaction run time longer than time for private or national network, that led to continuous worries over the expanding size of Ethereum Blockchain, which certainly reduce Cryptocurrency's effectiveness. The estimations were on increase and believed it would cross the node limit of 1 TB terribly shortly. If new consumer a full node enters to that blockchain and cryptocurrency world, a node is a computer software cum database of the blockchain, which a full node client must download on their personal computers to become a full node in the blockchain. in this way, the client can be verifying transaction on the network with the help of other nodes on the system. We proposed to implement national cryptocurrency which developed using Ethereum as a development platform that could serve national or regional people that has limited or slow internet connections like Iraq, in addition payments in countries with unstable fiat currencies, although cryptocurrencies are suffering from unstable exchange rates against fiat currencies, the use of national cryptocurrency instead of the native fiat cash could even be a far better alternative for individuals in certain countries like Iraq, Iran and Syria, with high rate of inflation. The reminder of this paper is arranging as following: an introduction, the advantages and drawbacks of cryptocurrencies, Background on Blockchain and Ethereum, implementation, results and conclusion. Keyword:


Introduction
By the arrival of Bitcoin by Satoshi Nakamoto' in 2009 [1] a different scoops of blockchain platform has developed.The blockchain developers seek after a shared objective, to be in charge of specific asset of specific decentralizing application.They accomplish this by replacement of confidence in centric structure by a great network of untrusted elements who endeavor to achieve consensus of the right history of the transactions.The trust is gotten by means of the assumption by most of these hubs demonstration loyally and regard the blockchain protocol, so as to verify the task of the blockchain all in all.The asset of Bitcoin's is its cryptocurrency, with trust in decentralized structure to supplant of classical banks.Present day blockchains, for instance, Ethereum go above and beyond.The last plans to decentralize the computer all in all by using of Ethereum Virtual Machine (EVM) [2],which engages the disseminated process of projects, as purported smart contracts, conveyed on the Ethereum platform.The EVMs are stack-based virtual machines which underpins a guidance group of 134 operation codes (opcodes) so as to have the capacity to implement the Turing-complete projects.Smart contract capacities are conjured through exchanges.Every activity on EVM take fees as specific amount of gas.At the point when the aggregate sum of gas doled out to an exchange is surpassed, program rendering is ended, and its belongings returned.the gas amount is determined by ether, designers are propelled to compose effective projects to retain exchange fees low and to maintain a strategic distance from unbounded circles on the EVM.Engineers for the most part compose the cod of the smart contract in a state language which aggregates into EVM bytecode.Albeit different exploratory variant of abnormal state dialects existing, at the time of the comparison, Solidity [3] is the widely pervasive programming language to create smart contracts.By the first impression, the JavaScript/C-like sentence structure of Solidity appearance comfortable to designers with involvement in C or JavaScript and supports quick improvement of the smart contracts.However, the manner of smart contracts processed, just as their security properties, are generally different from traditional programs and might prompt to unforeseen behavior during execution.In addition, the lack of strain static consent and shortage of support of development kit, developers are urged to change the code of smart contract till it "just works".although this would be a workable methodology for prototype, its potential outcomes in deadly errors when deploying the smart contracts as real decentralized applications (DApps), on the open Ethereum blockchain.As opposed to classical programs, when writing to a blockchain, they can't be modified longer.The unexpected transactions by the developer are unchangeable.In Sept 2018 the market evaluation of the well observable virtual assets ("tokens") of the Ethereum platform amounts to US$ 35 billion, not count the US$ 17.5 billion of ether, the platform's hardwired cryptocurrency [4].Cryptocurrencies are a kind of digital currencies that are counting on cryptographically verifications of transactions.Cryptocurrencies possess three features ensuring limited anonymity, no central authority need (independence) and protection from double spending attack.As stated by Jan Lansky, the system of the cryptocurrency satisfy 6 terms [5]:  A system that doesn't need a centric controller; its status is preserved by distributed ledger. The system holds a summary of digital money units and their possession. The system set where or not to create new units of the cryptocurrency.within the event that new units of cryptocurrency created, the system circumstances the conditions of their source and the way to decide their possession. possession for units will be well-tried only by cryptography. The system permits exchanges to be completed within responsibility for units of cryptocurrency is modified.A transaction statement should be release by an element demonstrating the present possession for units. If two distinct instructions try to change the possession of the same units of cryptocurrency are concurrently entered, the framework performs at the most one among them.

Advantages
 Open source code for process of mining cryptocurrency -Ethereum used similar calculations that are utilized in web based bank services. No inflation -Most extreme digit of coins is carefully constrained by 100 million in Ethereum. . Peer to peer cryptocurrency systemthis system has no central controller, that is chargeable for each function. Unlimited potentialities of transactionevery wallet holder can pay to anyone, anyplace and any amount. No confines.Payments created during Ethereum are not possible to withdraw.The cryptocurrency units can't be forged, copied or spend doubly. Low cost Ethereum operation.The Ethereum cryptocurrency acts as classical money, in addition to the features of e-trading. Decentralization. the system has no centric management controller within the system, it possesses distributed network to entire entrants, every pc mining Ethereum is a part of this network. Simple to use.With taking into consideration that the steps of creating an account, the corporate in Iraq banks is complicated and may be rejected while not clarification, implementing Ethereum is convenient for corporations.The corporate take about five minutes to make a Ethereum wallet and instantly starting use it with no more inquiries and taxes.
 Anonymity.It's totally anonymous and absolutely transparent. Transaction speed.the flexibility to transfer money anyplace and anyone within a short time when the Ethereum system perform the transaction.

Drawbacks of cryptocurrencies
According to [6] the disadvantages are as follows [7]:  robust volatilityunsteady of the Ethereum price rely directly on the announced report from different country's authorities. massive hazards of investment in cryptocurrencies that ought to thought-about at present time and future.
The disadvantages of cryptocurrencies are significantly more, and are linked with money laundry, terrorist and other illicit action financing, absence of centric controller, implies that there is no legitimate formal agent to assurance in the event of bankruptcy, and corresponding.However, though it's very hard to anticipate, many studies about this topic claiming that the future of cryptocurrencies is shining because it will take off trade barriers and intermediaries, it would reduce the fees of transactions, and thus raise the economy and the trading.and so on, though, it must be think about pessimistic sounds in the academic filed as well, proposing that the high hazards of volatility, hacking hazards, and limited of institutional support led to some suspicions for the future of cryptocurrencies [8]

Background on blockchain and ethereum
Blockchain are often as an open (to the public) decentralized databases in which replication distribute cross many nodes at the same time [9].In Blockchain there's no authority responsible of overseeing and keeping up the record of transactions.The ledger's version validity is determined by a consensus method among the collateral nodes.the utilization of blockchain technology permits a secure validation of transaction's information integrity.Bitcoin, for instance, that is that the first application developed over blockchain by Satoshi Nakamoto [1].On another side Ethereum blockchain is open source, decentralized and distributed computing infrastructure which process programs called smart contracts [10].it's developed to empower decentralization application programs and just not for a cryptocurrency, which is made by using a virtual machine (Ethereum Virtual Machine, EVM) to process a scripting language.in contrast to Bitcoin during which that alone Boolean analysis of paying conditions are in concerning, EVM is by some means is the same as a general pc that simulates what an informatics system will process.Modifying the contract status in the blockchain wants transaction fees that are estimated in Ether.Ether is taken into thought because the fuel for operative the decentralized application.for that, Ethereum is presently the second worthiest cryptocurrency that features a market capability around 68 billion dollars till May 2018, and numerous cryptocurrencies are merge smart contracts.Ethereum accounts can be classified into two types: 1. Externally owned Accounts (EOA): this account known by the wallet address and managed by a personal key.The owner of this personal key can exchange cryptocurrency and make signature of transaction from this account.EAO is consider user kind account and it is joined to special cryptographical keys pair, created according to account generation.the public one is utilized to point to the account, additionally referred to as EOA address while the personal key on the opposite side uses to sign transaction prior to any execution of transactions on the system to evidence legitimacy.EOA possesses balance that store cryptocurrency [11].2. Smart Contract: the smart contract is an account that's managed by itself [12].it's considered like an independent client processed using EVM and is the core basis and also the main structure of any DApp [13].as the code deploy to the blockchain, the EVM can ensure that it will continue working, because of the terms enforce.It is necessary to notice as the smart contracts deploy to the blockchain system, they will be publicly visited and seen using associated addresses, transactions (timestamp, to_address, from_address, etc..).calling functions from a smart contract is available to any account whenever the following conditions are obtaining: a. known address of each smart contract.b.The caller function possesses enough balance to trigger.Additional value gives by the smart contracts, the code governing the business logic is presently in public (easily verifiable) and not mysterious as in typical server.

Proposed system and implementation
To implement national cryptocurrency, the following development tools are used: 1-Solidity, which is a novel programing language native to Ethereum, the second largest cryptocurrency by market capitalisation, released free in 2015.Ethereum isn't solely a cryptocurrency capable of storing price or creating payments, however a completely fully development platform for making what's referred to as a smart contract.For all intents and functions, a smart contract is a programmable written agreement of kinds, an independent middleman or a good decide capable of managing a financial transaction between varied parties and autonomously arbitrating a dispute. software management with Ethereum package manager (EthPM) and Node Package Manager(NPM), using the ERC190 standard. interacting console for straight contract communication. Build conformation pipeline with support for tight integral. Capable to run external script which executes scripts among Truffle environment.
3-Ganache is a personal blockchain that allows developers to create smart contracts, decentralized application (DApps), and test software that is available as a desktop application and command-line tool for Windows, Mac, and Linux [14].
4-MetaMask is an internet browser extension which permits you to access distribute web in internet browser.It permits user to execute Ethereum distributed application within internet browser while not operating an Ethereum full node [15].MetaMask implies a secure identity vault, came up with an interface to handle user identification on diverse sites and sign transactions before sent it to blockchain.MetaMask additionally allows users produce and administer their identification (through private key, local consumer wallet and hardware wallets, therefore once a distributed platform application needs to execute a transaction and transfer it to the blockchain, the consumer got a safe interface to check the transaction, before approved or rejected it.
5-Geth: The go-Ethereum client is usually named as geth, that is the instruction line interface for operating an Ethereum full node carry out by Go.By installing and running geth, you'll be able to participate within the Ethereum frontier live network and:  mine ether  exchange funds among addresses  make contracts and send exchanges  investigate block history The overall implementation of the system is shown in figure 2. 1-Contract directory: it's include tow smart contracts of the project that perform the core operation of the system and the contracts are: a. IQDtoken.sol:this is the basic and the most important contract which include the genisis parameters for the cryptocurrency and it inchage of write to and form the blockchain.thisfile determind the behavious of the cryptocurrency and most be implemented according to ERC-20 standerd,so it include: i. Name of the cryptocurrency which is "IQDtoken".ii.Symble of the cryptocurrency which is "IQD".iii.Standerd of the version of the system which is "v1.0"iv.TotalSupply of the system which is "1,000,000".v.It must be allow for transfer token from address to another.vi.It most be allow for transferFrom fuctionality in case of transfer on pehave of another account according to approval and within allowence.b.IQDtokensale.sol:this contract govern the IQD token during initial coin offering (ICO),and it possess the following functionality: i. Provision token to token sale contract.ii.Set the price of token in Wei.iii.Make sure that the contract has enugh tokens.iv.Assign an admin whom control the ICO.v. Keep track of token sold during ICO.vi.Transfer remining IQDtoken to admin befor ending ICO. vii.End the sale of ICO.c. Migrations.sol :Solidity file that helps in the deployment process.

Conclusion
implementing national cryptocurrency using Ethereum as a development platform that has smaller blockchain size and smaller transaction time than the original Ethereum public cryptocurrency in addition to the ability to customized the geneses file parameter which cannot be done in public Ethereum Network, by this implementation we have full control over the cryptocurrency during the development process and before the initial coin offer(ICO), Compatible with IRC-20 standard cryptocurrency could have a name, version, initial coin balance, gas limit and gas fess.

Figure 1 . 3 Figure 2 .
Figure 1.Block diagram for the system during the development process

Figure 3 .Figure 5 .
Figure 3. Initialized Admin account with zero balance 2-Truffle is developing environs, framework test and asset pipelines for Ethereum, target to turn out the Ethereum developing process easy.Truffle has the following features:  Compiling smart contracts, link up, binary management and deployment. Fast development by automated contracts testing. Scriptable, extensible and deployment. Migrations framework, extensible deployment and scriptable. Managing network to deploy any number of private and public networks.