Skip to content

Instantly share code, notes, and snippets.

@jejuro
Last active March 4, 2018 12:54
Show Gist options
  • Save jejuro/fb185eb95360db94ae087f4f1e31a9b8 to your computer and use it in GitHub Desktop.
Save jejuro/fb185eb95360db94ae087f4f1e31a9b8 to your computer and use it in GitHub Desktop.

Part II - Global monetary and banking infrastructure

You can see the related lectures(Korean) here.

Table of Contents

  1. Summary

  2. Writing Prototype

  3. Standard Cryptocurrency

  4. Financial Statements

  5. 잎 Nip

  6. 장 Jang

  7. Security

  8. Autonomous Bank

  9. 열매 Yeolmea

A brief description of the configuration and operating mechanisms of standard cryptocurrency and global autonomous banks.

The Openhash platform provides standard cryptocurrency called 잎 Nip and standard cryptosecurity called 열매 Yeolmae.

The standard cryptocurrency based on the OP has some peculiar features including;

  • It shall be issued by a governmental authority.
  • Battery included: that is to say, it has banking and market mechanisms inside itself. So, establishing both banking system and online/offline e-commerce system using the standard currency are quite easy.
  • It’s a currency rather than a token or virtual money like bitcoin.
  • Its value is tied to that of a fiat currency. That is, the standard currency issued by the Korean government has exact the same value as the fiat currency of Korea, KRW.
  • It’s powered by Proof of Credits rather than proof of work(bitcoin) or proof of state(a few alt coins).
  • The OP uses two different algorithms; one for ordering transactions, and the other for preventing forgery and modulation.
  • The unit of standard cryptocurrency is 잎 Nip, and the unit of standard cryptosecurity is 열매 Yeolmae. The former is issued by a governmental authority, and the latter by the Openhash platform itself.

1. Summary

The cryptocurrency based on the Openhash platform is referred to as standard currency or standard cryptocurrency. Since the meaning of cryptocurrency has been faded by many crypto tokens such as bitcoin, ethereum, and ripple etc., I will distinguish the Openhash cryptocurrency from current crypto tokens.

ABC is an open source(GNU) project, and ABC - Autonomous Banking Committee controls the source code by 2020. From 2021, the source code will be updated by crowdsourcing without management groups.

The API is written in Lua, the Cycle.js framework. You can download it from [SCR - Standard Cryptocurrency Repository] ().

1.1 Consolidated Financial Statements

Each bookkeeper(Onnuri, Supul, Namu) consolidated financial statements of its members.

  • The Onnuri server consolidates the financial statements of supuls all over the world.
  • A higher Supul server consolidates the financial statements of lower Supules in its domain.
  • A lower Supul server consolidates the financial statements of Namu in its domain.
  • A Namu server consolidates the financial statements of Gajies in its domain.

One Namu consists of one or more Gajies (which means Gajies), and a Gaji represents one account. In general,

  • An individual or a machine has one Gaji.
  • A company has a number of Gajies composing one namu.
  • One family can have one namu and many Gajies. In this case, the financial statements of each family member are consolidated into one Namu.

All market participants should have one Supul server as his/her registering domain. A Namu server is installed on a smartphone or PC, and runs a backup server on the Cloud Platform. The address of the namu server is the interface area of the IPv6 address.

Users participating in the Openhash standard currency platform can install ** the namu server ** on their smartphone or PC, or they can join the existing namu server. For example, in a typical enterprise, a single namu server can be assigned to a departmental or employee gaji, and a department or employee can enter the network by joining a pre-registered namu on a standard currency platform.

Each user who participates in the standard cryptocurrency platform is given one Gaji. Gajies are typically installed on PCs and smartphones, replacing conventional paper ledgers.

  • Gaji is the software that will record transactions for each market participant.
  • Gaji is similar to the conventional wallet for cryptographic money, but it is a financial statement including a cash flow statement, an income statement and a balance sheet.

Transactions are recorded according to the six principles (who, when, where, what, how, why). Generates a hash of the current transaction, with a hash of the previous transaction. This process is identical to the well-known Hash mechanism of cryptography.

All market participants, called Kyonu, using Nip prepare and maintain their financial statements. His/her income statement records the unique ID and transaction details of his/her transaction. And, bookkeepers, called Jignio, weaves all the financial statements of all the market participants in a nation, so the whole country constitutes one huge financial statement, thereby blocking the fraudulent accounting of individual market participants.

All items in the financial statements are Hash-linked, so if any item in one of the financial statements is modified or changed, all items in the subsequent financial statements will be invalidated. This mechanism is identical to the Hash algorithm in previous blockchain technologies.

Unlike a blockchain, Openhash includes transactional information in the transaction data, and the transactional item, as well as currency, is also tagged with hash of the previous owner.

Each of bookkeepers(gaji, namu, Supul, supul and onnuri) manages a single consolidated financial statement.

  • The financial statements of a gaji record transaction and accounting data of an individual or business entity.
  • The financial statements of a namu record those of several Supules, followed by the supul and onnuri. In addition, not only the flow of money but also the flow of goods are linked by a hash.
  • Therefore, in order to modulate any transaction data in any financial statement, all transaction data in the world connected to it should be modulated too.

Since an accounting data of an extreme end is gathered to the top of hierarchical bookkeepers, even the small transactions made in the very small towns of the globe are impossible to modulate.

1.2 잎 Nip - The unit of the standard cryptocurrency

The payment method for all transactions is the openhash cryptosystem is Nip. For example, if a Korean A who is traveling in Vietnam bought a rice noodle from Restaurant B, and if the price is 10,000 Vietnam Dong, equivalent to Korean 3,000 Won, the payment is from the smartphone of A to the smartphone of B. In order for such transactions to be possible, person A must purchase a certain amount of Nip in Korea, hold it in his/her banking account. Supul serves as an autonomous bank, which can lead to a zero exchange rate and money-transfer fee.

Market participants can exchange Nip with the fiat currency issued by the central government of each country. The exchange ratio between Nip and a fiat currency is always one to one.

1.3 열매 Yeolmae - the unit of the standard cryptosecurity

Some businesses that register products in the Openhash market and that follow some predefined rules can issue their stocks and debts, to be freely traded in the Openhash market. That is to say, the shares of business entities listed on the OP are products to trade as well. Those are called the standard cryptosecurity in contrast to cryptocurrency.

  • Its concept is quite simple: select hundreds of thousands of companies whose products are listed on the Openhash market, and buy some of their stocks and debts.
  • What companies to select and how much to buy their stocks respectively are determined by well know machine learning algorithms.
  • The Openhash security pool is composed of those stocks and debts.
  • The selection is proportional to the GDP size of each nation in the world economy. For example, Korea occupies 2% of the world economy. So, the ratio of the stocks and debts of Korean companies in the pool will be 2%.
  • The OP issues about 100 million Yeolmaes backed by the pool.
  • The value of Yeolmae is not fixed, but linked to the value of securities in the pool.
  • Market participants can determine the ratio between Nip and Yeolmae in his/her bank balance.
  • Market participants can select where to invest their balance. That is, they can select specific stocks and debts in the pool to invest.

The stock evaluation module uses the conventional Deep Learning algorithm, estimates the stock price of all businesses registered in the market, and discloses the information.

1.4 Market

Interestingly, the cryptocurrency of the OP had better be integrated with a market system, so called the Openhash market, and with a banking system, so called the Openhash bank. These market and bank are both online and offline.

The seller of an online shop which uses the Nip as the payment means must register the goods to be sold in the Openhash market in advance. The first seller of a particular product category pre-registers the Smart Contracts object containing the name of the product and trading conditions.

  • Name of the product
  • Properties
  • Methods
  • Payment terms
  • Delivery method
  • IPv6 address

In the marketplace, buyers can quickly obtain information on the manufacturer, date of manufacture, delivery and payment method of a particular product. For example, the first seller to sell a product named refrigerator must register refrigerator object in advance. Thereafter, the seller who sells different kinds of refrigerators can use the object registered by the first seller as it is or modify it. The properties and methods of the refrigerator object are constantly updated by numerous subsequent sellers.

Some products, such as cars, may be assigned IPv6 addresses. The web page assigned to this address records its history from the origin to the final consumer, which is git.

Refer to Whitepaper for the update mechanism of refrigerator objects.

1.5 Bank

While the first to third generation blockchain technologies have focused on replacing the central bank's role with virtual cryptocurrency, the Openhash standard currency is based on the monetary authority of a central bank's power, and hopes to do the role of a commercial bank.

  • For the time being, conventional commercial banks are expected to mediate between citizens and the Openhash bank.
  • Afterwards, Openhash autonomous bank will perform the role of conventional commercial banks.

There may be unemployment issues, but in the long run, it will increase the total production of society by reallocating the population, a socially rare resource, into a more efficient industrial sectors.

1.5.1 Deposit interest of Nip

Since Nip is exchanged with a Fiat Currency, the central bank can provide the owner of the Nip with the deposit interest proportional to the holding period and amount.

1.5.2 Loans of Nip

Market participants can accumulate his/her credit through a history of Nip usage. On the basis of the obtained credit information, the payable limit exceeding bank balance and the loan interest rate can be determined so that gaji can function as credit cards.

The Openhash platform assumes a national or governmental operator, but currently applies a market model for a limited time until individual countries accept the Openhash platform. The market model is to market the Supul operators who will operate the Supul server while ensuring proper profits, thereby constituting a global network and providing currency-related functions of central banks of their countries.

  • Recruitment of operators in the market to constitute a global Supul server network.
  • Exchange standard cryptocurrency with the national fiat currency held by citizens under a fixed exchange rate, and the obtained fiat currency shall be deposited in the authorized bank of each country.
  • Provide exchange services between countries.
  • Operate Clearing House which is described below.
  • For testing purposes, linux PC is used as a real server, and Google Cloud Platform is used as a virtual server.

2. Writing Prototype

Each country may apply its related laws and regulations in the form of Smart Contracts with respect to its domestic use of the standard currency assigned by ABC, and Smart Contracts shall be written in the Cycle.js API and Lua to enhance the interchangeability of Smart Contracts modules between countries and unifies the grammar.

The code described in this paper is a pseudo code written in the syntax of Lua and Cycle.js. The latter is for Frontend, and Lua for Backend.

All communications and records are subject to HTTPS encryption.

DB is operated as a pair of a central backup server (Google Cloud Platform, Firestore) and a torrent-based peer-to-peer distributed server, primarily Redis and Lua.

2.1 Initialization

On booting, main() is called to generate a certain amount of standard currency (Nip), assigns it to each country in proportion to the GDP of each country, and initializes the standard currency platform.


main() {

 //Issue 20 trillion Nip.

 const baseMoney: Number = 2e+12;

 const baseNip = issueNip (base);

 

 //allocate Standard Cryptocurrency among 193 nations registered to UN according to the GDP of each nation.

 allocateNip (IPP);


 //Initialize One Onnuri Server.

 initOnnuri ();


 //Initialize 193 Supul Servers for 193 nations.

 initSupul ();

 

 //Initialize 65,536 hierarchical supul Servers per 1 Supul Server of each nation.

 initsupul ();

}

Hereinafter, the withdrawal account as Input, and the deposit account as Output.

2.2 온누리 Onnuri

The standard currency platform is organized hierarchically from top to bottom, and each layer records transactions between nodes belonging to the child layer. That is, Onnuri records the transactions among Supules, a Supul records transactions among lower Supuls or Namus, a Namu records transactions between Gajies, and a Gaji records transactions of a person or a machine. A transaction is first recorded in Gaji, an electronic wallet, and some of the information is transferred to the Namu to which it belongs, the Supul to which the Namu belongs to, and the Onnuri. The degree or power of a higher tier server to access information within a lower tier server or an electronic wallet is governed by the rules of the individual sovereign country operating the standard currency platform.

The Onnuri server is managed by all the nations of UN. That is, each nation will have a copy of Onnuri server.

  • Onnuri servers are allocated one by one for each country and synchronize with each other.
  • In order to forge the data of Onnuri servers, more than 87 countries should collide.
  • Onnuri servers record transactions between 193 countries.
  • Since the expenditure of the Supul representing one country is the income of the Supul representing the other country, the balance of Onnuri is not changed.
  • Onnuri DB is recorded independently by each of the 193 member countries of the UN, and compares them periodically.

2.3 수풀 Supul

193 Supul servers are created, and each of them is allocated to each country listed in UN.


 // Generate 193 Supul servers and store them in Onnuri DB.

initOnnuri () {

 const supuls: List[] = generateSupuls();

 const onnuriDb = supuls;

}


 //Generate Supul Server on Google Cloud Platform

generateSupuls() {

}


// call if any part of a transaction belongs to another Supul.

onnuri(transaction) {

 // Balance of Onnuri shall not be changed.

 static onnuriBalance: double;

 

 const pay = transaction.payer;

 const receiver = transaction.receiver;

 const amount = transaction.amount;

 

 // Adjust the balances of Supuls which each traders belong to.

 payer.onnuri.credit -= transaction.amount;

 receiver.onnuri.debit += transaction.amount;

 

 // Check balance.

 checkBalance();

}


// Initialize Onnuri Finantial Statement

initOnnuriFS () {


};

A Supul server is responsible for one country or state, recording transactions involving two different lower tier servers. Transactions in which funds are transferred from one region to another are recorded by a Supul server, as the Onnuri module handles transactions between the two Supules.

Unlike the Onnuri server, Balance of the Supul server constantly changes because it is transferred from the account of a player belonging to one Supul to the account of a player belonging to another Supul. The Supul that recorded minus means the capital account deficit of the corresponding country, and the Supul which recorded the plus means the surplus of Capital balance.


// call if any part of a transaction belongs to another supul.


supul () {

 // Balance of Supul shall be changed.

 static supulBalance: double;

 

 const pay = transaction.payer;

 const receiver = transaction.receiver;

 const amount = transaction.amount;

 

 // Adjust the balances of Supuls which each traders belong to.

 payer.supul.credit -= transaction.amount;

 receiver.supul.debit += transaction.amount;

 

 // Confirm debit of Supul are same to credit of Supul.

 checkBalance();


};


// Initialize Supul Financial Statement

initSupulFS () {

};

One Supul server can creates up to 65,536 lower tier supul servers and assigns one to each city or county.


// Generate less than 65,536 supul Servers for the designated Supul.

generateGruturgi(nationalCode){

}

A higher tier server aggregates the stochastic variation of lower tier servers, and since the surplus of one server is the deficit of another, the total variance of servers in the same tier is always balanced.


// Check the balance of a supul server.

supulBalance(supulList);


// call if any part of a transaction belongs to another Namu.


supul () {

 // Balance of supul shall be changed.

 static supulBalance: double;

 

 const pay = transaction.payer;

 const receiver = transaction.receiver;

 const amount = transaction.amount;

 

 // Adjust the balances of supul which each traders belong to.

 payer.supul.credit -= transaction.amount;

 receiver.supul.debit += transaction.amount;

 

 // Confirm debit of supul are same to credit of supul.

 checkBalance();


}


// Initialize supul server.

initsupul () {

}


// Initialize supul B/S

initsupulBS() {

};

The lowest tier server stores more information than higher tier servers: two kinds of information.

  • Chatting
  • Transaction data

// Initialize Chat Server using Google Cloud Platform, Firestore.

initChatServer(){

};


// Initialize Transaction Server using Google Cloud Platform, Firestore.

initTxServer () {

};


2.4 나무 Namu

A Namu represents a group such as households or businesses. A Namu incorporates the deposit and withdrawal of the Gajies it manages. So, the surplus of one Namu is the deficit of another Namu. The surplus of all the Namus is the deficit of all the Namus in the world.


namu(){

 const pay = transaction.payer;

 const receiver = transaction.receiver;

 const amount = transaction.amount;

 

 // Adjust the balances of Namu which each traders belong to.

 payer.namu.credit -= transaction.amount;

 receiver.namu.debit += transaction.amount;

 

 // Confirm debit of Namu are same to credit of Namu.

 checkBalance();


}

2.5 가지 Gaji

One Namu consists of one or more Gajies, and Gajies correspond to the wallets of the blockchain. Financial information of individual players is recorded in Gaji, some of which is delivered to Namu, Supul and Onnuri.

  • Namu record transactions between two or more Gajies. If two trading Gajies belong to the same Namu, the Namu has nothing to record.
  • The lowest tier Supul records transactions between two Namus.

txn(contract: Contract){

 

 // Adjust the balances of Namu which each trader belongs to.

 payer.gaji.credit -= contract.amount;

 receiver.gaji.debit += contract.amount;

 

 // Confirm debit of Gaji are same to credit of Gaji.

 checkBalance();

}

3. The Standard Cryptocurrency

Standard currencies are defined by ABC, and are produced and distributed by national governments NCC - National Cryptocurrency Committee.

Standard currency units are 1, 10, 100, 1000, 10,000, 100,000 ... Etc., and the quantity of each is set separately.

3.1 Digital Note

Unlike bitcoins, standard currencies are digital currencies with IP addresses, not records.

For example of an IPv6 address, a currency unit is allocated to 4 bits of the 16-bit Subnet ID, and a unique ID of each issued digital note is assigned to an Interface ID 64 bits. For example, monetary unit 1 is 0001, 10 is 0010, 100 is 0011, and so on. Therefore, the unit of money can be expressed as 1 ~ 100,000,000,000,000,000.

Ownership of a note can be transferred between players described below, and since the total amount of money issued is measured in real time, if a forgery or falsification occurs, it is immediately detected.

The transfer of ownership of the currency is controlled by Smart Contract as described below.


// Describe the features of monetary units.

type MoneyUnit = {


}


money(){

const moneyUnit: MoneyUnit;

const address: IPv6Address;

let ownerKey: Key;

let receiverKey: Key;

let smartContract:SmartContract;

}


//Describe the properties of owner object.

type Owner = {

}

In the case of standard currencies, there is no transaction fee.

3.2 Record

In addition to the well known Lock and Unlock algorithm using private and public keys among traders in blockchain technologies, OP provides another transaction(that is, the change of ownership of money and products) mechanism to track the ownership of moneys and assets. In OP, the ownership of assets like cars, houses, land is tracked to automate the works of various regislation services such as 등기소.

Let's see how it works.

OP has no blocks. Each transaction is recorded in the webpage of the note, the book of the related server, and in the trader's bankbook .

3.2.1 Record on Players

As shown in the figure below, in the standard currencies, each bank account of Alice and Bob forms a tiny blockchain that records transactions. If the number of players are 100 millions, there are 100 million tiny blockchains. It is worth noting that the last hashes of the traders are included in the new transaction data. For example,

  • Assuming that the last transaction of Alice and Bob is represented by Hash 101 and Hash 102, a new transaction between them results in the new Hash 200 which includes Hash 101 and Hash 102.
  • Therefore, the final hash of the transaction recorded in the accounts of all the trading partners is the same.
  • Even if there are more than three traders, the same single hash is recorded in the books of all three traders.
  • Each bankbook is itself a small blockchain, and one hash is shared by at least two traders.
  • Therefore, the forgery and falsification of any one account will invalidate hash values recorded in trading partners related directly or indirectly.

3.2.2 Record on the webpate of each note

Ownership transfer of notes is recorded in at least four places at the time of transaction occurrence. The sender's electronic wallet Gaji, the recipient's electronic wallet Gaji, related tier server, and the web page assigned to the IP address of the currency being transferred.

Among them, the contents recorded in a note are described in detail.

All notes, including digital bills and coins, have unique IP addresses, such as IPv6 address, and the web page assigned to that address records the currency unit, the country of issue, the current owner, the history of past owners and so on. For example, if the Korean government issues 100 thousands of 100 Nip notes, each of these notes records information such as its ownership history on its web page.


moneyHistory(ipAddress){

}

n the case of a blockchain, the amount of data recorded for each transaction is different, and the recording fee is charged differently in proportion to the amount. However, the standard currency has no recording fee.


recordTxn(transanction){

const amount: Number;

const timestamp: Timestamp;

transaction.payer.balance: Number;

transaction.receiver.balance: Number;

}

The transfer of ownership is recorded on the related notes with the hash information recorded in the new owner's bankbook. For example, in the case of Alice paying 10 Nip to Bob and purchasing raw materials, Bob becomes the new owner of the note, and this change is written in the webpage of the note.

In the case of the standard currency, each issued note (digital bills and coins) has a unique IP address, the current owner information is displayed at the IP address of the note, and the new owner’s book obtains the pointer to the note. Each time when the owner of a note changes, a new hash value is generated and recorded on the webpage of the note.

For example, shown in the picture below, Alice's book has the pointers to the notes she owns.

Now, let's assume Alice paid a specific 10 Nip note to Bill. In addition, let's assume,

  • The serial number of the note paid to Bob from Alice is 1234567890.
  • The IP address of the note is 2001: 0db8: 85a3: 0000: 0000: 8a2e: 0370: 7334.
  • The last hash value of the note is SoVs2jLrSj2L513CCt137Pd1q2Tz45ercx.
  • The new hash value of the related transaction is 13CCt137Pd1q2TzSoVs2jLrSj2L545ercx.
  • The payee(Bob)'s public key is jLrSj2L545ercx13CCt137Pd1q2TzSoVs2

Now the new hash value of the note may become LrSj2L513CCSoVs2jt13745ercxPd1q2Tz, induced from the three hashes above. This hash value can't be changed as it is weaved to the involved transaction. The forgery of the note needs that of the related transaction too, and is JUST impossible due to the intrinsic property of OP.

Then, how can Bob prove his ownership before paying the note to payees in the future? By the well known Lock and Unlock algorithm using private and public keys among traders. Simple, isn't it?

3.3 Hierarchy of Recorders

In the case of standard currencies, transactions are reflected in blocks in real time by bookkeepers organized hierarchically, called 직녀 Jignio.

  • The bottom-most blockchain is the account book for each player, called 가지 Gaji.
  • A Namu blockchain operates on it.
  • A Supul blockchain operates on it.
  • Onnuri blockchain operates on it.

In the case of coin coins such as bitcoins, the UTXO mechanism solves the following problems.

  • Evidence that the payer owns a bank book.
  • The process of determining which of the currencies recorded in the owner’s wallet is to be spent.
  • The basis on which the new owner who received ownership can pay it.

The solution of standard currency is the blockchain hierarchy.

  • Create a transaction containing the final hash of each party participating in the transaction.
  • After all parties have signed, the contract is delivered to the related server.
  • The server adds the contract to Openhash Platform, and records the change of ownership of the assets(note, car and so on) related to the transaction.

money(){

const moneyUnit: MoneyUnit;

const address: IPv6Address;

let ownerKey: Key;

let receiverKey: Key;

let smartContract:SmartContract;

}

3.4 Transaction Fee

The transaction fees of Bitcoins are used to prevent Sybil Attacks, but standard currencies have no transaction fee. Instead, taxes from each country's tax law will replace the transaction fee. For example, a 10% VAT may be included in price.

3.5 Locktime

Bitcoin transactions are irreversible, so traders need some time before committing transactions. Locktime provides a time margin. However, the standard currency does not need to defer the settlement of the transaction because Dispute Arbitration Committee operates as that in the conventional market system, and traders can choose irreversible transaction and reversible transaction .

3.6 Locking Script and Unlocking Script

Bitcoin Script is a very simple scripting language. Scripts in standard currency are Lua and JavaScript​​(TypeScript, Elm, CoffeeScript etc.).

The Locking and Unlocking Scripts attached to the standard currency are almost identical to the previous blockchain. A locking script that restricts the use of unauthorized money is called a scriptPubKey (or pubkey script or witness script or cryptographic puzzle) and is attached to the output. Later, in order for a new money holder who has received this output to spend the currency, the previous owner must solve the cryptographic puzzle attached to the currency. When you solve the puzzle, the currency turns into a state that is expendable. The Unlocking Script (or Signature scripts or scriptSig or witness) performs the task of unpacking the puzzle.

Unlike previous blockchains, the same locking and unlocking algorithms apply to assets purchased in standard currencies. For example, if you purchase 100 square meters of land located in Hankyung-myeon in Cheju-do with 100 Nip, the process of changing owner of the land is also based on the locking and unlocking algorithms. Therefore, no registration at government is required.

3.7 m-of-n pubkey script

Like previous blockchains, there is a method to restrict the expenditure by requiring m consensus among n pubkeys.


multiSig(){

}

3.8 Escrow and Arbitration

Escrow needs third party intervention for safer transactions. For example, C can mediate or witness a transaction between A and B. The difference between blockchain and the standard currency is that the former designates a person as a third party, while the latter uses an AI (Artificial Intelligence) module. Details of the AI ​​module will be described later.

safeTx(){

}

3.9 Anonymity of Transactions

In blockchain, all transactions are written to the block unencrypted, and anonymous transactions are handled by the CoinJoin mechanism. In the case of standard currencies, all transactions are encrypted, so there is no need for a separate mechanism to hide private information.

Encrypted transaction data is provided to authorized institutions or individuals in accordance with laws and regulations. Laws and regulations are made by the collective decisions by citizens. The algorithm that systematically collects citizens' will is democracy.

Whether a particular authority or individual has the legal authority to view certain information is described in the AI section. The detailed procedures are determined by the court or described at AI module.

3.10 The Standard Wallet

In blockchain, the money received by a specific coin address is through the public key of the receiver, and the expenditure of money is approved by a combination of private & public keys. The standard wallet is quite similar to a banking app, and has a unique IP address. In order to avoid exposure of personal information, it is possible to replace the IP address with a dictionary word and present it to the payer.

When a specific note is spent, the pointer indicating the currency is deleted.

When a pointer to a note in the payer’s book is deleted, a new pointer is displayed in the receiver’s book.

Each note has a unique IP address. An web page or an web DB assigned to the address records a pointer to the current owner of the note.


book(){

}

3.11 Private Key

Blockchain generates private keys by generating random numbers.

In the standard currency, a private key is created in a combination of the following six methods.

  • Fingerprint
  • Iris
  • Voice
  • Handwritten signature
  • ID and PW
  • Offline office with insurance

Thus, unlike bitcoins, the standard currency is not lost or stolen.

It should be noted that, unlike the conventional bank system, there is no server that stores the private key of each player. In the standard currency, the same algorithm as the conventional blockchain is used to verify the authenticity of the private key.


generatePrivateKey(){

}

3.12 Recording Exchange rather than Payment

Like blockchain, it uses X.509 certificates and SSL encryption in conjunction with the Transaction Protocol. The characteristic of the standard currency is that it uses a color code instead of a QR code described in Part 1, Section 8).

As described above, the standard currency records not only the flow of money, but also the flow of goods and services. Therefore, it is an exchange, not just a payment. CoinJoin mechanism of blockchains is similar to trading in standard currencies.

The Tx data includes the following information.

  • A unique ID for each party participating in the transaction
  • Value provided by each party (goods, services, national currency, standard currency, etc.)
  • The division or attribution of value
  • Signature of each party
  • The final Hash recorded in each book of the parties

3.12.1 Forex

Exchange of standard currency with national currency (Fiat).


currencyExhange(){

}

3.12.2 Exchange Money with Goods

It is a typical commercial transaction.


eCommerce(){

}

3.12.3 Exchange Goods with Goods

It is bartering.


barter(){

}

3.13 Forex Risk

In the case of bitcoins, if the coin price is expected to fall, coin holders will promptly use their coin, and product sellers will be reluctant to receive coins. Conversely, if the price is expected to rise, coin holders will not use it. In any case, bitcoins and altcoins do not serve as a means of payment.

In addition, blockchain has design drawbacks. You can track the flow of the counterparties' funds, and there is the risk of double spending. Of course, there have been developed a few countermeasures.

  • Merge Avoidance: How to avoid fundraising
  • Last In, First Out (LIFO): Pass the risk of double spending to others
  • First In, First Out (FIFO): You risk the double spending

The value of standard currency is tied to the national fiat currency of its issuer, so there is no reason to spend quickly or not.

When using standard currencies in countries other than their issuing countries, Forex rules apply. However, there are no exchange or remittance fees.

Standard currencies not tied to the fiat currency of a particular country are provided in the form of 열매 Yeolmae described below.

3.14 Operating Modes

Simplified Payment Verification (SPV)

3.15 Propagation

As a way to propagate the presence of a new player to other players in the peer-to-peer network, blockchain uses a flooding mechanism to transfer the new information between the connected node nodes. Theoretically, within a few seconds, a node's information should propagate to all nodes participating in the network, but in reality it is impossible. For example, assuming that half of the world's population participates in a peer-to-peer network, in order for the transaction data of one node to propagate to all nodes of the world within a few seconds, all players must have hundreds of terabytes of memory space in their smartphones(full-node clients), and all nodes must have several hundred gigabytes of Internet bandwidth per second, consuming more than 1,000 nuclear power plants of average size .

The standard currency presents the hierarchical server algorithm, in which one node transmits transaction data to the server of its own region and neighbor nodes of the corresponding region. The former is based on the IPv6 protocol and the latter by the Gossip Protocol.


propogateTxn(txn: Transaction){

// Inform supul server of the transaction.

Const supulServer: IPv6Address;

httpRequest(supulServer, txn);


// Gossip the transaction.

gossip(txn);

}

3.16 Players

Players are natural persons, machines, programs and legal entities that have the power to own or transfer the ownership of money.

Each player is registered in one, exactly one address server.

When a player joins OP, the platform obtains his/her/its consent and private information such as name, address, or mobile phone number. It initializes the electronic wallet Gaji, which is installed in the player's terminal.

  • Retrieve private information, encrypt it,
  • Determine the address server and register the player in the DB of the server.

// Connect to the SCP website via a smartphone.

// When a user touches Register Button


register() {

 //Obtain user permission

 const permission: Permission = askPermission();

 

 // Store personalData

 const personalData: PersonalData = obtainPersonalData(permission);

 

 // Register to Address Server DB and User DB

 register(personalData);

 

 // init Wallet, Salary.

 const userGaji = initGaji(personalData)

 

 // install Gaji into the user smartphone or PC

 installGaji(userGaji)

}


When a transaction occurs, if the address servers of the two trading partners match, the transaction data is sent to the lowest Supul server which is in charge of the area where the transaction has occurred. If not, the server send it to its upper Supul server and so on.


// Send transaction data to Supul or Onnuri.

sendTxData () {

 

}


The standard currency is controlled by the state, and the state is controlled by the citizen. The stability of this platform is based on democracy, and democracy is the collective decision making of citizens.

The identity of the natural person among the player is expressed by face, fingerprint, voice, the iris, handwriting, name registered in the member country, cellular phone whose identity is confirmed, Internet telephone or wired telephone number, and XMPP messenger ID so on. In the case of a corporation, its identity is expressed by a certified corporation registration number, a business name and a corporation address.

  • During the beta test, players can join the network with their mobile phone number. For example, Hong Gil-Dong of Korea may register his smartphone number 010-1234-5678 with unique user ID (82-10-1234-5678).

  • The Supul server assigned to the area in which the address of Hong Kil-dong is located at the time of joining becomes the address server of Hong Kil-dong.


register network () {

// Obtain the phone number and generate peculiar user id.

generateID();


// Obtain personal information.

obtainPersonalInfo();


// Determine Address server and register user id.

initAddressServer ();

}

4. Financial Statements

All Gajies, Namus, Supules, and onnuri are themselves financial statements. The transactions that occurred are sequentially recorded in Ledger, Income Statement, Balance Sheet, Cash Flow Statement and Retained Earnings Statement.


ledger.incomeStatement.balanceSheet.cashFlow.retainedEarnings.subscribe();


ledger(contract: Contract){

}


incomeStatement(){

}


BALANCE SHEET () {

}


cashFlow(){

}


retainedEarnings(){

}



type Contract = {

 const date: Date;

 const location: Location;

 const pay: Pay;

 const receiver: Receiver;

 const amount: Number;

 const product: Product;

 const delivery: Delivery;

 const txnCode: SmartContract;

}

On the other hand, the accounting system of the standard currency is a blockchain application applied to the conventional double entry accounting principle. That is, all FS of players are hash-weaved together, resulting in no Split accounting.

4.1 Ledger

If A pays 100 Nip to B, and purchases a car, the books of A and B will be recorded as follows.

| A's journal | | | B's journal | |

| ------------- |: -------------: |: -------------::: --- ----------: |: -------------: |

| Car 100 | Cash 100 | | Cash 100 | Car 100 |

In terms of a standard currency, trading is the exchange of ownership of certain goods. If there is a unique URI for car(C) and note(N), it can be expressed as below:

URI of C | URI of N

The key advantage of this notation is that both accounting entities A and B can share the same record. In other words, A and B's journals keep the same data for the same transaction, add a previous hash to it, create a bunch of data, and extract a new hash from it.

-URI of C + The previous Hash of B => New hash of B -URI of N + The previous Hash of A => New hash of A

Then, what is recorded on the book of the car traded? Remember how we write down transaction data on the webpage of the note. The same Lock and Unlock process is done in the case of a car. -The new owner provides his/her public key to the old owner. -The old owner provide locked tx data to the new owner and the car itself.

As the car above is a traded asset like notes, the webpage of the car should keep the new hash generated from the transaction including Lock and Unlocking data.

<그림>

Notice that, different from blockchain, assets can be players which have their own books in OP. If the car above is a player of the transaction, it also needs Tx data from trading parties(A and B) to renew its book all the same way as A and B do using its own private and public keys.

In addition, each book constitutes a small blockchain, and the books of the trading partners are interlinked or weaved, making it impossible for anyone to counterfeit his/her book.


// Record Transaction onto the books of all players.

recordTx(players: player[]);

4.2 Players

You may remember there are many other players than humans. Cars also can be players. At the same time, a car is traded among people. That is, all can be both players and trading objects regardless of human or not. It seems bizarre, but natural as humans also are traded by headhunters in market.

4.3 Financial Statements

Based on the records shared by the players, each can generate their own financial statements.

5. 잎 Nip

Nip is linked to the value of the national currency. All sovereign states can issue Nip independently and implement their own monetary policy. The unit of standard currency issued by any country is the same as that of the national fiat currency of the country, and the exchange rate is 1: 1.

The representation of the standard currency adds a lowercase letter d (= digital) to the traditional national currency representation. For example, the standard currency of the Korean won (KRW) is dKRW.

5.1 Issuance of Nip

The issuer of leaves is the Standard Cryptocurrency Committee (SCC), and the distributors of them are central banks of countries. A central bank exchanges Nip with the national currency (Fiat Money) issued by the country at a 1: 1 exchange ratio.

In the distribution of leaves, trading partners are central banks and citizens.

// The amount of Nip given by SCC to the designated nation let balanceOfNip;

Nip(fiatMoney){

// Exchange Rate between Nip and Fiat Money const NipToFiatRate: Number;

exchangedNip = fiatMoney/NipToFiatRate;

// Record transaction txn(contract: Contract);

balanceOfNip -= exchangedNip; }

5.2 Use of Nip

The standard currency has the same value and legal status as the fiat currency, and can be used with the same mechanism. A transaction is concluded by a signature of two or more players. One-person transactions such as depreciation also have more than one player. For example, the players in depreciation transactions are the owner of the depreciated asset and the agency or organization that establishes the depreciation rules, and in Korea, the Accounting Standards Committee.

6. 장 Jang

Remember market is a place where assets are exchanged, and these exchanges are recorded by OP through the transaction mechanism described above: Both notes and other assets have their own Ledgers with unique IP addresses.

Any player has a seller status and can register goods they want to sell on the market of OP. After a player inputting a product name, OP automatically search in the dictionary whether there is a previous product inputted with the same name, and if there is, it is extracted from the dictionary. For example, if you want to sell a 'refrigerator', OP searches for 'refrigerator' in the dictionary and derive its properties when you input 'refrigerator' in the ‘Type of Product’ field at the OP market.

| Manufacturer | Date of manufacture | Capacity | Power consumption | Design | Shipping Method |

The seller may exclude some of the attributes of the searched product or add new attributes. If the item a seller want to sell is not retrieved from the dictionary, he/she must configure the first attribute set of the product type.


sell(){

 //obtain product name

 productName();


 //search product name

 searchProduct();


 //search standard property set

 searchStdProperties();


//Add or remove properties();

composeProduct();


//List product.

listProduct();


}

6.1 Unique ID and Temporary ID

Each player has two unique identities. The first is a telephone number that includes the country code and area code (or mobile carrier number). For example, if the Korean mobile phone number is 010-1234-5678, his unique ID is 82-10-1234-5678, and unique IDs can never overlap across the globe.

The second is the Jabber ID of XMPP Messenger, and no two players in the world can use the same ID.

As sometimes it is not desirable to expose phone numbers or Messenger IDs, OP offers a separate flexible temporary ID for players. The mechanism by which the temporary ID works is as follows. -Prepare a dictionary containing the vocabulary of a specific language. -Map the seller's or receiver's standard currency receipt address to a specific word randomly drawn from the dictionary. The withdrawn word is switched to the lock state not be withdrawn again by another player. -OP sends the word to the buyer or the computer device of the payee (Payer). -When the transaction is completed, unlock the relevant word and return it to the dictionary.

The phone numbers can be substituted by some unique words such as ‘Blue Segal’ or ‘Whitehorse’ so on. In any case, purchase, payment, shipping and taxation of goods registered in the market are completed by a single touch.

6.2 Reversibility

Unlike conventional blockchain-based cryptography, transactions in standard currencies are reversible and can be canceled by the operator of the sovereign Supul. The cancellation of the transaction is in the form of a reversed transaction in which the buyer and the seller are swapped, and the related decisions are subject to the arbitration committee operated by each country or each state.

6.3 Transaction History

Unlike blockchain that needs some waiting for a while before a completed transaction is published, transactions are immediately recorded on the Openhash platform and settled in real time.

For example, when Alice orders a pizza at a shop,

  • Alice touch the order button of a pizza she want at the website of shop, and provide her last hash on her Ledger as an evidence of her order.
  • The shop creates a new transaction data including both the hash of its last transaction and the hash of the Alice’s last transaction which she sent to the shop. Then, send it to Alice with the public key of the shop to receive payment.
  • Both sides generates hashes from the new transaction data, and if these hashes match, both sides sign the transaction.
  • Alice sends the specified Amount to the Receipt Address.
  • Both parties publicize this transaction(XMPP protocol and Gossip protocol).
  • Both sides record this transaction in their Ledgers.
  • Both sides reconcile their financial statements.

Components of the payment URL

Hash of this transaction: "KzpHBzqzX2dK9UA9JFP3Di4oQAweBwqgm" Product: "Pizza" Amount: "15" Recipient: "Pizza hut" Receipt Address: "OADi4wdK9UzpH9JFP3BzqmoQAzX2eBwqg" Payer: "Alice",

… Hash of Alice’s prior transaction: "HHBJFP3zqzX2A9Di4wedK9UzpBwqgQAmo"

Hash of Shop’s prior transaction: "MdK9UzpHBzqzX2BwqgmoQAA9JFP3Di4we"

6.4 Instantaneous Realization

In a conventional market, the value of a product is realized when the product is sold. However, the standard currency provides an immediate realization of value.

The market module estimates the value of the goods to be sold and immediately deposits some of the estimated value to the seller's account. In future, the difference between the amount paid and the realized amount is settled at the time when the sale is actually completed.

  • The module for estimating the value of the sales product is written in the form of DNN (Deep Neural Network).
  • All the transactions are first made between the platform and sellers, then between the platform and buyers, and finally the difference between these two kinds of transactions is settled regularly.
  • This process is continuously learned by the DNN, thus improving the accuracy of the estimation.

7. Security

The strength of the blockchain is that it is extremely difficult to forge or falsify transaction records, and the 4th generation blockchain Openhash offers a significantly stronger security system than previous blockchain technologies. Features of this security system include:

7.1 Coordinated Universal Time or World Atomic Time

The chronological order of transactions are determined by atomic clocks approved by ABC.

Onnuri Server assigned to country or state will select a certain number of countries randomly among the countries operating atomic clocks and synchronize with their electronic clocks to these atomic clocks. Supul servers and Namu servers in the country also synchronize with their Onnuri server.

The transaction timestamps of Gajies are consolidated into those of their affiliated Namus, and then consolidated into those of the lowest tier Supul server, into the upper tier Supul servers and ultimately into Onnuri. If a Gaji or a server forges or falsifies its timestamp, it can’t trade with other Gajies or servers because the timestamps of both parties must contradict each other. For example, -If A orders a product of B, the timestamp of A is attached to the order. -If B sends its public key to A to receive payment, the timestamp of B is attached.

Until now, there is no problem. But, the next time when both parties exchange data, the new timestamp must contradict to the previous ones. It can’t be determined who is responsible or who counterfeited or doesn’t calibrated his/her clocks, but the problematic side can’t trade another partners further.


 onnuriSync.supulSync.supulSynk.namuSync.gajiSync.subscribe();


7.2 Combined financial statements

The financial statements of Gajies are consolidated into the financial statements of their affiliated Namus, and then consolidated into the financial statements of the lowest tier Supul server, into the upper tier Supul servers and ultimately into Onnuri. If a server forges or falsifies its data, it is detected by its upper tier Supul server. There is no way to detect if the onion server is forged, but such forgeries needs the collision of more than ½ of the countries operating atomic clocks.


ledger.cashFlowStatement.incomeStatement.balanceSheet.retainedEarning.subscribe()


ledger(contract:Contract){

 return ledgerItem;

}


cashFlow(ledgerItem) {

}


incomeStatement(ledgerItem: LedgerItem) {

 return incomeStatementItem;

}


BALANCE SHEET () {

Return balanceSheetItem;

}



7.3 Proof of Credit

Let’s assume someone has written codes to draw machines into his/her conspiracy to do DDos attack to a specific Supul or Onnuri server. As machines can be players in OP not so different from humans, he/she can make numerous machines his/her alliance each of which has one voting power like human. Then, is it possible for him/her to break a consensus of OP?

Not at all.

Even if more than half of players including machines are coalesced, it is impossible to forge on the open hash platform due to the proof of credit.

If two players record the same transaction differently, the record with the higher credit level takes precedence. Each Gaji , Namu , and Supul have their own credit level, and the level calculation is determined by the credit chain in addition to the amount, volume and frequency of transactions. For example, if A purchases from B and B purchases from C, the credit level of A affects that of B, and that of B affects that of C. Credit levels are calculated periodically. The level change of A’s credit affects others who sold products to A. Simply put, when those who bought goods from me earn money, their profits come back to me as my refreshed credit. The credit of those who have more Nip and deal more often have higher credit rating than those who do not.

The Proof of Credits is that those with high social trusts have greater voting power than those without.



credit(member: Member) {

 // determine weights of average Nip balance and of transactions.

 static amountWeight;

 static txnWeight;


 //determine moving average balance of Nip.

 averageNip();


 //determing moving average transaction amount and frequency.

 averageTxn();


 //obtain the change of credit levels of all members who bought products from this member.

 creditChangeOfBuyers();


 //calculate the credit level of this member.

 calculateCredit();


}

7.4 Free-In-Forced-Out

Anyone and anything can become a player of OP. But, anyone or anything who/which violates the OP rule is expelled from the platform. The degree of violation of the rule is recorded as Penalty Score. When score reaches some point, then the player is removed.


penalty(member, reason){

  // Add penalty of reason to the penalty score of the member

  member.penaltyScore = reason.penalty;  

}

8. Autonomous Bank

While the previous blockchains aimed to provide the money issuing function of a central bank , the standard currency provides an autonomous bank without human and physical resources on commercial banks .

8.1 Deposit

The interest to be paid in proportion to the holding period and amount of Nip comes from the asset management. Players can divide and assign their Nip balance to investment and demand deposit. For example, if Alice has the balance of 1,000 Nips, she can put 300 Nips to demand deposit, and the remnant 700 Nips to investment deposit. Even more, she can decide where to invest her money.

Each Supul server invests funds to region it has jurisdiction. The investment projects of lower tier servers are more limited than those of higher tier servers. For example, a supul server allocated to a small county invests funds to local issues such as widening streets or planting trees alongside roads. On the other hand, a supul server representing a nation may invest funds to national R&D projects.

Onnuri server invests funds to global projects such as African Hunger Problem.


// Divide one’s Nip balance into three categories.

divideInvestBalance(member.balance) {


};

8.2 Loans and Credit Cards

The credit rate of a player includes a credit limit and a card-loan limit, and the credit level is determined by the mechanism described above. Specifically, the activity data of a player is input to the Deep Neural Network to calculate his/her credit rate. Activity data includes non-traditional indicators such as money-spending characteristics as well as traditional indicators such as the user's gender, age, education, nationality, occupation, and assets.


dividePayBalance() {


}

8.3 Invest

Because the standard currency is issued and legally backed by central or local governments, lower tier to higher tier Supuls may force their citizens to invest in specific projects. However, if a governmental authority imposes excessive restrictions on the investment activities of its residents, national confidence or credit level can be damaged.


// Supul can limit the investing decisions made by her people

limitInvest() {

}

The Supul that are entrusted with investment by the citizens of the region may carry out investment activities with their own algorithms, and the creation of such algorithms is based on the democratic decision of the citizens belonging to the Supul. If a Supul’s return from investment or the satisfaction of its citizens is lower than other Supuls’, then the citizens may vote to change the governance of the Supul. That’s why the standard currency is said to be a democracy-oriented currency .


// Gather democratic decisions
democracy(){
Return democracy;
};



supulInvest(democracy: Democracy){
}

9. 열매 Yeolmea

The investment assets entrusted to Onnuri are invested in securities including stocks and bonds and have the right to share the returns. The returns are paid in the form of dividends to Yeolmea, and the total amount of dividends is equal to the total amount of returns on the investment assets entrusted to Onnuri. Onnuri invests assets to high risk and high return venture, typically, rebuilding social infrastructures including; -Global Traffic/Logistic Infra -Global Aero-Logistic Infra -Global Super highway -Global Healthcare Infra -Global Education Infra -National Archive Infra -Global Autonomous Bank


tradeYeolmae(invest){
buy();
sell();
}


In addition to ventures, the investment module of Onnuri determines what/when to buy securities of companies which enlist their products on the market of OP. These investment decision is implemented by a typical Deep Neural Network.


onnuriInvest () {
}


9.1 Securities Valuation

The estimated price of the securities purchased by Onnuri Fund is mainly determined by the credit level of the issuer of the security concerned. The credit level is a weighted sum of national risk, industry risk, and firm risk as appropriate ratios , and such ratios are implemented as DNNs.


evaluateSecurity(){

}

9.2 Trading Securities

Every company that sells goods in the market can sell its own stocks and bonds. The purchaser is Onnuri, Supul, or Gaji.


Copyright (C) <2017> <주피터 Jupeter> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.0. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment