e-Government of the future
Is it possible to have a situation, where anyone can safely write a code directly in an interface of electronic government?
An e-Government is a method of providing information and rendering an already formed set of public services to citizens, businesses, government branches and government officials. In e-Government, there is minimum personal interaction between the state and the applicant. Here, information technology is used to the maximum extent possible.
A smart contract is an electronic algorithm that describes a set of conditions that require certain events in the real world or digital systems for them to be implemented. Implementation of smart contracts requires a decentralized environment that completely excludes human factor. A cryptocurrency is required for a smart contract to transfer costs.
Supporters of smart contracts argue that many types of contractual relationships can be partially or completely “self-executing” and self-sufficient. Cryptography-based smart contracts can provide better security than the traditional contracts, which are based on rights. They can also reduce other transaction costs in contracts and possible legal costs.
“Very high transaction costs can prevent implementation of economic action. Social and state institutions can reduce these costs through formal rules and informal norms.”
As the years go by, these transaction costs are gradually being reduced thanks to the creation of various platforms like “Alibaba”, the opportunity to communicate via messengers, interaction with the government through websites, etc.
Given that smart contracts can help reduce costs, it is logical to assume that they too will very soon enter our life just like smartphones, social networks, e-Government, distance education and teleworking did. Anything that cuts costs will sooner or later become a mainstream.
For smart contracts in Ethereum and other platforms, there is a problem that nullifies all their advantages. If you fit into a wrong contract, then you’re “trapped” — just like The DAO members are “trapped”. But then the problem was solved with the involvement of Etherium developers, led by Ethereum’s founder Vitalik Buterin, in effect, assuming the functions of a supreme power. Vitalik proposed a vote: to refund money to the victims or leave everything as it is. Imagine that a businessman is told that he needs to sign a contract worth $1 billion, but if something goes wrong and there is a typo in the contract, the 23-year-old Canadian citizen Vitalik Buterin will figure everything out and resolve the situation.
Such issues should be addressed not by software developers but rather by legally elected authorities in one’s country or a state-independent judicial system — depending on the particular country.
But this problem should not be solved in a straight forward manner.
Hyperledger and Corda(R3) — what are they and what’s their purpose?
In a nutshell, they facilitate data exchange between companies or banks that do not trust each other. It is quite possible to replace them with the usual central server and logging. If a central server is to be owned by a major bank trusted by everyone, then that would even be better, because there would be no need to spend money on infrastructure maintenance.
The main shortcoming of Hyperledger and Corda is that they merge companies into different unrelated groups. It would be impossible to write a smart contract that would handle data from different groups — only if through crutches in the form of manual data entry into the contract or through a special server that collects data from external sources. In effect, it means that when the virtual machine limits are exceeded, the same problem encountered by Etherium will surface. There are no provisions for creation of a global association in Hyperledger and Corda since there are no fees for resources in them, and the architecture is not adapted to this.
In this news, you can apparently see something innovative. But imagine that the documents will be stored not on an e-Government server but on the servers of departments. To maintain these servers, you need to hire specialists, pay for the channel and for electricity, modernize the out-of-service equipment and so on. It is of course encouraging that no one will be able to forge a scan copy of a document. However, the probability of faking such documents on e-government servers is also low. With this approach, the UAE can spend huge amounts of money by 2020 — but instead of them reducing costs, they will end up increasing them.
Let’s imagine that it is possible to build everything from scratch. How should the kernel of the architecture be built so that transaction costs could be reduced to the lowest possible minimum, while ensuring proper level of security for the system itself?
In our architecture versions, we see 4 main columns:
1. Smart contracts
Smart contracts for solving such a problem are very useful tools that should be used. But in order to use this tool in an optimal way, one more instrument is needed — the state. The state must take the responsibility of creating institutions that will resolve possible disputable situations.
Citizens empower the state with super rights during elections, unless, of course, the form of government is a monarchical system :)
The smart contracts from which the entire e-government backend will be built look like this:
data/conditions/action — here, I think, everything is approximately clear. It is the same with Ethereum and others. In fact, it’s just a program code. But the conditions under which it can be changed can be considered in more detail.
On an ordinary hosting, there is a PHP code that only the reader and the hosting admin can change. Some programmers, system admin (and maybe someone else) have access to the servers of classical e-government systems. If someone changes something, wipes out the logs, and then it turns out that everyone forgot about VCS, then you can do a lot of dirty tricks without being caught. To protect against such situations, all changes are permanently stored in the blockchain. And if there is no right to change, then nothing can be changed. An exception here is the super rights. But if someone with a super right adds at least one comma to a contract code, this too will forever be stored in the blockchain. In this case, the author and date of such changes will be recorded.
Payment for consumed resources
Who will pay for the work of a smart contract? A smart contract can have cycles and database queries with a billion rows.
We have every contract linked to a purse. In the case of Russia, it will be a ruble-based purse. A purse can have many owners. The owners can be temporary, for example, government officials. Therefore, for such purses, in “debiting conditions” a smart contact is indicated that can check the presence of a person in some kind of a registry and then debit the funds. As a result, the purse of some department or fund can be linked to a smart contract, etc. Inside the contact itself, you can deduct the money from the person calling the contract (if this amount is deducted by that person).
An example of a smart contract that simply updates data in the registry of citizens:
To change such a contract, you need to pass through a verification process in smart contract MainConditions. When the contract is implemented, funds for resources will be deducted from the purse 0875–3553–1112–8181–5545.
If you are using a classic DBMS, then with the logging switched-off, you can safely change data through the console and no one would notice it. All you need to do is to agree on access to the server in e-Government. To reduce the likelihood of such an incident, serious regulation at the physical level is required, which, they say, is often not observed.
This problem is solved at the kernel level.
Just like with smart contracts, there are rights — the right to change, view, add new rows and columns. And if you have no rights, then you will not be able to change or view anything. An exception is super rights. For registries, any action is recorded in the blockchain.
For added security, interfaces should also be controlled. Otherwise, if someone gains access to the server where there is no VCS, the person will be able to replace the data entry forms, and then cover up his tracks.
It should be noted that these pages will be created not only by state bodies, but also by companies and ordinary citizens. A company may want to create a catalog of goods. Someone may create a platform, where people can sell their goods. Someone else may create an analogue of Alibaba, a directory of homeowners, etc..
Payment for consumed resources
But there is one problem here. Someone must pay for each database query. If the state will be the person to pay, then what happens if someone constantly pulls hundreds of millions of rows out of the database, at the same time overloading the server? It is logical to assume that the creator of the page or group of creators (as for usual cloud hosting) should pay. But then competitors will constantly visit the company’s webpages and intentionally consume resources. For protection, heavy pages can be placed under private access and access granted only under the condition that the page visitors would be the ones to pay for the resources consumed. In addition, page owners could be allowed to block access to free pages for citizens whose F5 key (CMD+r) is jammed. But in most cases, the costs would be little, and thus there would be no need to think about paying and blocking.
Readers who are very familiar with blockchain technology will be certainly wondering what would serve as the nodes.
It is unacceptable to store state data in an open form at the moment. Even if we encrypt them and leave only the ID on the outside, you can still be able to find out who is who from the history of transactions. Personally, I am convinced that the future lies in an open blockchain, but in the current realities we can only allow a closed type for the time being.
A node is a data center. The blocks are signed in turn once per second. The number of data centers should be more than three. If there are only two of them, then in the case of a fork, it would be impossible to know which elements have the correct data. You would have to rebuild the database from the very first block.
That is, if someone wants to — through the console — write “x=1” at the place where x was 0 in the database, and then refer to this value from the code of the smart contract, then the transaction will not be successful in all other nodes. And at that moment, if someone writes “if x==0” in the contract code, then the compromised node will not be able to accept such a block, while the rest will accept it. As a result, those who accepted will work in their branch of the blockchain, and the compromised node in its own. This will be displayed in the router in the form of different hashes.
Now the curious question is: who will be the owner of the data center — the state or a private company?
The state will be able to set up access rights to registries, create smart laws regulating the rights and observe how companies and citizens build their projects around the registries and smart laws, create new forms of business, various platforms, ERP, etc.
Since data cannot be altered, reliable reports are guaranteed and they would be used to make forecasts, carry out optimization and other actions — using AI. Private keys can be issued not only to people, but also to devices, so that IoT does not stand aside but participate within a single information space.
In this article, I have described the architecture that would facilitate implementation of smart contracts in an e-Government system. This could lead to significant reduction in bureaucracy and accelerate all economic processes.