
eGaaS (Electronic Government as a Service) is a digital ecosystem designed to implement the idea of e-government. At the same time, the term “e-government” in eGaaS is not interpreted in the narrow sense, as just an online service to provide services to citizens or a mechanism for automating government activities, but is understood as a
holistic digital ecosystem that unites the activities of all spheres of the state: government institutions, Finance and social services . The eGaaS ecosystem includes global registries and software tools for building government, private, and public user applications and platforms based on smart contracts.
The eGaaS ecosystem has a multi-level rights management system for creating and editing registries, contracts and interfaces. To control the access rights to the elements of the ecosystem, special contracts are used -
smart laws , thanks to which the rights control system is flexibly adjustable and, most importantly, allows you to automatically track the transfer of access rights.
The blockchain technology is used as a software solution for building the eGaaS ecosystem. The main advantages of the blockchain for the implementation of e-government are:
')
- maximum data storage reliability, which is achieved using crypto-algorithms and distributed registry storage,
- keeping a history of all registry changes with the fixation of subjects who had access to the data.
Blockchain eGaaS
Technically, the digital ecosystem eGaaS is a peer-to-peer network, the nodes of which are data centers (DPCs), each of which contains a complete copy of the blockchain. Nodes form blocks in turn with a period of not more than a second. Efficiency of the ecosystem can support one node. The remaining nodes provide uninterrupted operation of the network and protection against unauthorized data changes.

The eGaaS ecosystem, deployed within one state, is closed - access to network resources is possible only for users who have private keys. That does not exclude the subsequent possibility of including the state network in the international one.
Registries
The basis of the ecosystem consists of registers of objects involved in legal, financial and economic relations. These are registers of individuals and legal entities, real estate, households, securities, licenses, etc. The most important tool for managing the ecosystem and the applications created on its basis is a multi-level mechanism for managing access rights to registries. Rights are controlled:
- to read, modify and add attributes (columns),
- to read, change and add entries (lines),
- to change the rights listed above.
The rights to access registries can be granted to individuals (indicating their id from the register of persons), certain roles (controlled by the presence of an id of a person in the job registry), as well as persons and roles combined with various conditions. Provision is made for granting access to registry elements only for specific contracts / applications.


Thus, through the construction of a multi-level system of rights, the division of competences among applications of different departments, industries and organizations is realized.
Smart contracts
Following the tradition in the blockchain community, eGaaS software modules that work with registries are called
smart contracts (or simply
contracts ). Contracts are structural elements in building applications and platforms. For writing contracts, an ecosystem-based scripting language is used with fast compilation into byte-code. The language contains the necessary set of functions for creating registries and performing all types of transactions with entries in them.
Contracts are functionally complete pieces of code that provide:
- receiving input data from a user or another contract (data section),
- analysis of the correctness of the data and verification of the conditions of the contract (conditions section)
- performing the necessary transactions (action section).


To prevent the execution of contracts that could cause damage to the user (for example, to transfer money) without his knowledge, a contract signing mechanism is used. So-called signed contracts cannot be executed without the need for confirmation by the user.
The contract description must include an indication of the right to change it. The entire history of changes and the launch of contracts is stored in the blockchain.
Smart laws
A special role in the eGaaS ecosystem is played by special contracts defining:
- terms of contracts,
- access of users and contracts to registries,
- rights to change registries, contracts and interfaces.
Such contracts, which, in fact, perform the role of regulatory documents, are called
smart laws . Smart laws contain the conditions and restrictions prescribed by state law.
The obligation to comply with smart laws is guaranteed by using them as common for the ecosystem conditions of access to registries. Operations controlled by smart laws cannot be performed by any user application while ignoring restrictions specified in laws (for example, control of licenses, etc.) and / or bypassing the execution of special transactions (for example, making tax deductions).
If necessary (in the case of legal ambiguity), a special condition is included in the smart law, requiring a decision by an authorized person with a digital signature confirming the decision.
To protect the ecosystem from the consequences of errors and vulnerabilities (inevitable in the software code of user applications), a procedure is provided to stop the execution and amendment of any contracts while ignoring the rights assigned by their authors. These are the so-called exclusive rights granted to certain roles or collegial bodies using special smart laws.

Interfaces
In order to eliminate manipulations with the reflection of data on the user side, the interfaces providing the operation of smart contracts are also saved in the blockchain. Pages and application menus, as well as registries and contracts, have an indication of a smart contract, which specifies the conditions for their change.

Page templates are created using a set of functions that can be viewed as a specialized language for creating interfaces — the eGaaS application template engine. The functions of the template engine are consistent with the language of writing contracts, which greatly simplifies the creation of applications. The template language provides:
- getting data from registries,
- presentation of data in the form of tables and diagrams (with the connection of additional widgets),
- building data entry forms for contracts,
- creating a multi-level menu
- implementation of multilanguage.

The template language creates interfaces that were originally adapted to run applications on mobile devices.
Applications
The eGaaS ecosystem application is a standalone software solution for performing a specific action or a variety of actions within a particular activity. The application consists of:
- contracts implementing its functionality,
- database tables needed to store operational data
- pages and menus providing data entry and display.
The execution of contracts in the application is triggered by user actions, other contracts, and access to registry data (for checking access rights).

The composition of the application is not fixed and implies the possibility of expansion by adding new contracts, pages and tables.
EGaaS software client
Applications are written using the eGaaS software client (
code on gitHub ), which provides the following using system interfaces and editors:
- Creating tables / registers
- Creating and editing contracts,
- Creating and editing pages and menus,
- Setting and editing access conditions for tables, contracts, pages and menus,
- Enter and edit language resources for the implementation of multilingual.
The eGaaS software client is also used for user access to applications, ensuring their identification by entering a private key.
Ecosystem safety
The safety of the eGaaS ecosystem is provided by the previously described mechanisms:
- the use of blockchain technology, excluding changes in the transactions;
- storing copies of the blockchain, and, consequently, of all registries, contracts and interfaces on each node of the network;
- support for a multi-level system of managing access rights to resources using smart laws, which contains the exclusive rights mechanism;
- protection against unauthorized launch of contracts using a special signature;
- saving interfaces in blockchain.
To protect the ecosystem from attacks and overloads, a mechanism for paying for tokens is used. The fulfillment of the contract requires the cancellation of tokens from the purse specified during its activation. For end users, working with applications is free (if we are not talking about paid services).
Conclusion
The eGaaS digital ecosystem, built on the blockchain technology, containing a multi-level and highly customizable mechanism for managing access rights to resources based on smart laws, is a modern tool for implementing e-government and the digital economy, both in a single country and at the interstate level.