Authors: Sofia Terzi (sterzi@iti.gr, sofiaterzi@csd.auth.gr), Konstantinos Votis (kvotis@iti.gr), Dimitrios Tzovaras (dimitrios.tzovaras@iti.gr), Ioannis Stamelos (stamelos@csd.auth.gr), Kelly Cooper (kellycooper.2ds@gmail.com)
Blockchain 3.0 Smart Contracts in E-Government 3.0 Applications
Abstract
The adoption of Information Communication Technologies (ICT) and Web 3.0 contributes to the e-government sector by transforming how public administrations provide advanced and innovative services to interact with citizens. Blockchain (BC) and Artificial Intelligence (AI) disruptive technologies will reshape how we live, work, and interact with government sectors and industries. This paper presents how Blockchain 3.0 and Artificial Intelligence enhance robust, secure, scalable, and authenticity provenance solutions. Two validation scenarios are analyzed to present how blockchain smart contracts and AI agents support energy and health-oriented e-government services.
Keywords-blockchain 3.0; smart contracts; e-government 3.0; artificial intelligence; energy; e-health; IoT; web 3.0;
Introduction
Blockchain (BC) technology is recognized as a critical, disruptive technology for many industries and applications. Starting with Bitcoin [7], a finance-oriented extremely ingenious distributed shared ledger and peer-to-peer value transfer technology, BC established trust between unknown stakeholders and automated payments. Bitcoin reformed the finance and supply chain industry by shortening the time needed to complete time-consuming processes and removing nearly all intermediaries.
Blockchain technology for financial payments automation without intermediaries is known as Blockchain 1.0. The technology acknowledged as Blockchain 2.0 followed with the Ethereum project [8], which differed from BC 1.0 with its support for smart contracts (SC). Other BC 2.0 technology projects include Hyperledger’s HL Fabric, Sawtooth, Iroha [9], and R3’s Corda [10]. Smart contracts (SC) are computer programs written to run on a blockchain and provide security and automation systems, making it possible for participating parties to agree upon certain conditions and actions to be performed when the conditions are met. These features of SCs reshape supply chain processes by enabling additional on-chain actions such as assets tracking and, in parallel, equip BCs with necessary characteristics for business cases outside of the supply chain. Blockchain is now used in industries such as healthcare [1][2], education [3], government [4], charities [5], real estate [6], insurance [16], and banking [15]. This expanded field of applications supported by BC is called Blockchain 3.0 because solutions are not restricted to finance actions and assets transfer [18] [19]. With the rise of Blockchain 3.0 technology, based on Directed Acyclic Graph (DAG) data structures [39], BC systems are more efficient, scalable, highly interoperable, and offer a better user experience. Among these sectors, government use cases are of special interest due to the implications they introduce when adopting a BC infrastructure. These implications may include internal issues related to a government such as politicians’ inaction and opposition, or external issues such as digital transformation laws and sensitive citizens’ and civil servants’ personal data [17]. The BC’s characteristics of decentralization provide zero down-time, ensure tamper-proof data and non-repudiation with immutability, implement security with cryptography to establish trust between participating parties, and utilize consensus algorithms for data integrity, verification, and scalability on private and permissioned blockchains [20].
Blockchain 3.0 technology supports the evolution for E-Government (EG) to become Web 3.0 oriented by providing the infrastructure, services, and processes needed alongside Information and Communication Technologies [21] such as Artificial Intelligence (AI) agents to secure and enhance communication between governments, businesses, and citizens [22]. EG 3.0 is totally dependent on Information Communication Technologies (ICT) to evolve along with Web 3.0 technologies, such as blockchain, artificial intelligence, semantic web and text analytics, machine learning, internet of things, and big data analytics [23].
This paper examines BC 3.0 and SC characteristics and features expected to contribute to EG 3.0 applications and offers selected best practices for how to incorporate BC 3.0 and SC into the design and implementation of ICT Web 3.0 e-government solutions.
Blockchain
The two major forms of blockchain implementations are public permissionless and private permissioned. The following sections present their most important characteristics regarding EG 3.0.
Permissionless Blockchains
Permissionless BCs were the first generation of Distributed Ledger Technology (DLT) to provide decentralized ledgers as opposed to centralized databases. Bitcoin and Ethereum are the most known representatives of permissionless BCs. Their premise is that all transactions are transparent to every participant and are written on the ledger only after a consensus of the majority of peers is achieved. Each participant shares an identical copy of this data, called state, that is formed of blocks connected to each other through cryptographic hashes. This architecture makes it almost impossible to change or trick others about the data state or take advantage of assets exchanged or discarded without notice by other peers. A disadvantage of permissionless blockchains is they do not support any control over who enters or leaves the network. This lack of control can be detrimental for security and may lead to energy-draining and time-consuming block generation techniques [11] to enforce security. The potential side effects of block generation include system scalability and speed.
Permissionless BCs can be ideal for EG 3.0 applications when data must be public and transparent. Such use cases may include the education sector verified and shared certificates, degrees, and diplomas issued by governmental organizations and academic institutions [40][41]. Other use cases include publishing voting results and disseminating publicly available documents and copyrights.
Permissioned Blockchains
Due to BC’s unique characteristics of immutability and decentralization, blockchain technology evolved beyond BC 1.0 to business priorities such as asset tracking and logging, consent and agreement enforcement and monitoring, and identity authentication and authorization. Permissionless blockchains achieve a great deal of decentralization; however, they can not guarantee the privacy and safety needed for sensitive citizen and government data. The lack of control over permissionless BCs and the exit and entry of network participants make documents, records, historical data, and transactions containing citizens’ data visible.
Permissioned blockchains, such as Hyperledger (HL) Fabric, answer the need for private, decentralized, secure, and verifiable transactions among governments, citizens, and businesses. Although all transactions are written through smart contracts to the ledger, as they are in BC 1.0, permission must be given to access any data. On permissioned BCs, participants are strictly controlled by a central authority. In an EG use case, this may be a ministry or an independent authority. Blockchain policies exist on the network to grant permission to stakeholders to perform specific actions. For example, a citizen must be informed that a public administration organization requests specified data and the citizen must consent for access to be granted. These requests and consent actions are written on the blockchain to provide transparency for participants. Permissioned BCs address the need for privacy, scalability, security, and speed, although compromises are made in decentralization. When a central authority is introduced to authorize the private network’s participants, decentralization is hindered and a BC controlling authority accesses the network [12].
Permissioned BCs are ideal for governmental applications that require a level of security such as an internal exchange of documents among public organizations for inventories, registries, or other private records.
Smart Contracts
Smart Contracts (SC) [13] are computer programs immutably written on the blockchain and called by BC participants. SCs provide automation and control flow logic to any system BCs support. Smart contracts must be treated as software functions in every aspect and smart contract BC engines must be deterministic. The determinism of SCs is the characteristic that maintains the ledger at a stable, consistent state, enforces transaction finality, and avoids soft and hard forks [14]. The determinism of SC’s actions is usually left to the developer. Thus, she must ensure automated actions are executed as planned and the results of these actions leave the data in a consistent state, regardless of the node(s) they are executed on. SC’s actions must achieve the same result each time the SC is executed. In the writers’ opinions, derived from empiricism, smart contracts can be categorized into three major categories:
- Static
- Dynamic
- Oracle driven
Depending on the specific use case to be implemented, the developer designs either dynamic, static, or oracle driven smart contracts. A definition of each, below, explores their characteristics to assist researchers, architects, and developers as they determine which is appropriate per use case.
Static standard output
Static SCs do not call other smart contracts, do not reside on human interaction, take place in one-step, and never change their predefined number of actions. Static SCs perform primitive math operations such as addition, subtraction, multiplication, and division. Other SCs can call, retrieve, and consume the results of their operation. All SCs receive parameters to perform actions and are somehow dynamic. However, there are no additional conditions embedded in static SCs to change their path of action. Math operations consistently reach the same result and operators follow the same precedence rules every time. SCs can return a "yes/no" response to a specific question or return a standard image when an action is triggered. An EG 3.0 application example is a function that accepts a verification request for an academic diploma, looks to the ledger for the diploma holder, issues the institution name and date of issuance, and returns the result to the requester.
Dynamic non-standard output
Dynamic SCs embed various rules that allow them to perform different actions. Examples of dynamic SCs include functions that monitor certain conditions and trigger intended actions. For example, when a dynamic SC monitors electricity consumption and temperatures logged on the BC of an energy-smart building. The dynamic SC includes thresholds for heating and consumption measurements to adjust temperatures in an eco-friendly way designed to avoid excessive electricity consumption and cost. The following pseudocode offers the logic behind monitoring and execution:
if room_temperature < 18 Celcius {
if electricity_consumption < 25 Watt
then turn_on air_conditioner
else send_message: "The daily
electricity consumption threshold has been reached. Would you like to turn on the A/C?"
if user_answer == ‘YES’ then
turn_on air_conditioner
else do_nothing }
if room_temperature > 25 Celcius {
if electricity_consumption < 25 Watt
then turn_on heating_unit
else send_message: "The daily electricity
consumption threshold has been reached. Would you like to turn on the heating_unit?"
if user_answer == ‘YES’ then
turn_on heating_unit
else do_nothing }
This dynamic SC, although deterministic, follows a non-static conditioned flow that shows how a dynamic SC might be formed and how it can act. The code is simplistic and computer functions can be long and complex. Additionally, the example involves human interaction which, on occasion, may hinder or cancel the dynamic action feature of the SC. Human input is considered dynamic in terms of a non-standard, condition-driven final action. The dynamic nature of SCs may be controlled with machine-to-machine (M2M) actions. Unpredictable outcomes may occur if a developer’s design and implementation of the SC are erroneous, incomplete, or non-deterministic.
Another approach to dynamic SC EG 3.0 applications is to interconnect public administrations that request to exchange citizen data. For example, if a tax service requests access to citizen land titles held by a land registry service. A dynamic SC supplied with a tax service VAT number may access land titles tied to that VAT number, if appropriate citizen permissions are in place. If a universal BC ledger contains land titles for all citizens, a dynamic SC may help to confront fraud and tax evasion and mediate the secure exchange of data between nations.
Oracle driven
Both static and dynamic SCs handle data that resides on the BC. Oracle, the third major category of SC, is designed to work with data from sources external to the BC. Oracle SCs are dynamic and include information brought in by the so-called AI oracles, which are also smart contracts. OracleSCs act as AI agents with the ability to request information from the real world and write it on the blockchain for other smart contracts to consume [24]. What is special about the oracle SC category is that SCs are generally not allowed to incorporate data external to the BC due to the determinism of BC functions. Determinism states the same result must be returned each time an SC function is called and external resources are often subject to change. Determinism is typically enforced by utilizing data that exists as the ledger’s state. An exception is made through oracles to write data on the BC that represents the ledger state at the exact time the data is written on the ledger.
AI oracle SCs apply EG 3.0 to law applications. For example, laws for inheritance can change and notaries or other public servants in an oversight role must be formally informed regarding issues such as legacy transfer. An AI oracle accesses information from a government repository and writes to the BC when a specific law changes. After this, a notification is sent through a BC 3.0 application to prove date and time sent, to inform interested parties, and to request and record confirmation of receipt on the BC.
E-Government 3.0
EG, by [25] definition, is the use of ICT to provide a means for governments, citizens, and businesses to interact, communicate, share information, and deliver services to various stakeholders. EG 1.0 utilized the World Wide Web and available ICTs to strive toward efficiency [26]. EG 2.0, through portal services supported by Web 2.0 technologies, became more citizen-centric, promoting citizen participation and enhancing e-democracy [27]. The technological evolution shaping EG infers EG 3.0 will use Web 3.0 ICTs such as distributed ledger technology (DLT), AI, Semantic Web, and the World Wide Virtual Web [20][28].
Artificial Intelligence is a promising and disruptive technology. AI’s technological ability to equip machines with cognitive capabilities that learn, infer, and adapt per consumed data is reinforced by the amount of information produced by smart devices, social media, and web applications [29]. One problem governments, organizations, and companies face in leveraging this amount of information is centralization and provenance, the latter related to information source legitimacy and authenticity. Data in AI projects are centrally controlled and can be tampered with. For example, Microsoft’s AI Twitter-based bot project was overwhelmed with racist remarks which, unfortunately, bots repeated to users [30].
One argument under consideration [22] offers AI as the solution to major governmental obstacles, particularly related to issues such as resource allocation, large datasets, experts shortage, predictable scenarios, procedural and repetitive tasks, and diverse data aggregation and summarization. Crucial to research is an analysis of how to overcome centralization, provenance, and authenticity problems. The combination of BC and AI technologies address current centralization problems and, in parallel, provide solutions for resource optimization and return private, personal data control back to their respective owners in a distributed, decentralized, and democratized manner [31].
The remainder of this paper examines two EG 3.0 scenarios supported by BC 3.0 and AI technology, the purpose of which is to provide EG stakeholders and policymakers avenues to exploit current industry BC and AI applications for governmental, public, and social good.
Energy data – Scenario 1
In recent years, digital smart city governance with ICT expanded and regional research addressed the increased energy demand that emanated from the multiplication and complexity of Internet of Things (IoT) devices. It became crucial for local governments to practice energy management strategies and use available energy efficiently [32]. A modern smart city applies smart technologies to its infrastructures and to citizen residences. The EG 3.0 scenario includes IoT devices, installed at citizen residences, that produce energy; these citizens are referred to as prosumers. This ability of energy consumers to produce energy from renewable sources and distribute that energy, through smart grids as prosumers, increases the difficulty of national energy management. However, prosumers also create the opportunity for smart city energy sustainability and efficiency when citizen produced energy is successfully modeled and incorporated into city energy systems along with energy related to transportation and facilities [33]. Energy management is critical; the European Commission, in the last two years, published two directives for energy efficiency goals with a 20% energy savings target by 2020 and a 30% energy efficiency target for 2030. Additional, specific national targets include lowering energy bills, reducing nation’ reliance on external suppliers, and eco-friendly protecting the environment [42][43]. EG 3.0 supports citizen-sourcing, increases efficiency in all phases of the energy supply, and leads energy sector management. BC 3.0 technology, in conjunction with AI, provides authentication, decentralized intelligence, security, and collective decision making.
In EG 3.0, IoT devices produce energy data that is stored on a private permissioned blockchain. Data stored on a BC is tamper-proof; it is cryptographically immutable and authenticated because each transaction is digitally signed. Energy data is considered confidential, security concerns must be mitigated with a private permissioned BC. Know Your Customer (KYC) compliance is enforced through permission policies on the BC network; each citizen determines what personal information or energy production data is shared. Additional security is realized when prosumer registration applicants follow a strict protocol and participate in local energy networks logged on the BC. This prosumer energy approach is automated with Dynamic SCs controlling the processes of IoT data logging, registration and approval logging, and available energy dispatching and monitoring.
A SC collects energy consumption and production measurements from prosumer IoT devices and logs them on the blockchain. The prosumer provides the BC login identity issued to her. This self-sovereign identity (SSI) ensures secure entry and prosumer user control [44]. A SC dispatches surplus energy from a prosumer residence to the main energy system or to a citizen-sourced smart grid. If, for example, daily consumption need is 14kWh and the SC detects the power produced from renewable sources exceeds 15kWh, an action automatically triggers and dispatches this surplus power to a pre-identified local energy system. A dynamic smart contract deposits the required, predefined payment for the energy dispatched to the prosumer’s account. Oracle-based SCs inform citizens how their energy dispatching can be more profitable and provide incentives for participants on the energy network. Smart grids, informed by local policies, consider geographic factors, energy needs, and building production capabilities. AI agents operate at citizen residences as collective decision-making mechanisms that apply Swarm Intelligence (SI) and achieve swarm goals [34]. SI calculates how much energy can be dispatched to a city’s central energy system and how much energy is available to be traded among smart grid participants. AI EG applications read data written on the BC and forecast city energy needs for hours, days, or months. AI analyzes data for trends or peak hours. The results and metadata from AI analyses are grouped per district to help governments and policymakers create more efficient energy management strategies as they achieve local and national goals.
Health data – Scenario 2
National Healthcare systems are a sector where e-health strategies must be adopted for governments to control excessive healthcare costs [35]. Healthcare systems hold massive amounts of confidential data; problems arising in processing and analyzing this big data are solvable with AI. Research shows older adults struggle to use e-health systems [36] [37]. With AI chatbots speech recognition support older adult questions and inquiries; chatbots can provide responses and guidance. AI agents also support patient forms completion and submittal to appropriate government departments [38]. A permissioned BC 3.0 secures the confidentiality and authenticity of private e-health data. EG 3.0 provides solutions to e-health priorities by utilizing ICT and Web 3.0 to transform legacy systems, increase their efficiency and effectiveness, decrease costs, and provide citizen-centric health care services [36].
The EG ecosystem includes IoT wearables that send patient data, such as heart rate or blood pressure, to a private, permissioned BC that ensures data security, authenticity, and confidentiality. When a doctor requests access to patient records and data, the BC triggers an SC and the action logs on the BC. The SC then forwards the doctor’s request message to the patient and the patient approves data access for the doctor. The SC writes patient approval or denial on the BC. This way a complete tracking system for requests and consent responses is formed. This secure process applies to e-health records exchanged at national or international levels with intact end-to-end security.
Further Research
We acknowledge restrictions apply
______________________________________________________________________________________________________________________________________________________________
|| Google Drive DOC to add comments and contribute: https://drive.google.com/open?id=14fBkS-IPvFTAvB4zkwLbw6n5aWF6EhWi ||
|| For write access on the Google doc please send an email to sterzi@iti.gr ||
_____________________________________________________________________________________________________________________________________________________________
Authors: Sofia Terzi (sterzi@iti.gr, sofiaterzi@csd.auth.gr), Konstantinos Votis (kvotis@iti.gr), Stamelos Ioannis (stamelos@csd.auth.gr)
Abstract—The adoption of Information Communication Technologies (ICT) and Web 3.0 have the potential to impact in the e-government sector by transforming the way public administrations provide advanced and innovative services but also the way citizens interact with them. In this direction, Blockchain and Artificial Intelligence (AI) are nowadays among the most disruptive technologies and will fundamentally reshape how we live, work, and interact with the government sector and industries as well, due to the unique features they bring. In this paper we present how Blockchain 3.0 and Artificial Intelligence can enhance the available means for robust, secure, scalable and authenticity provenance solutions. Consequently, two validation scenarios are analyzed in order to present how the blockchain smart contracts and AI agents can be used practically to support energy and health oriented e-government services.
Keywords-blockchain 3.0; smart contracts; e-government 3.0; artificial intelligence; energy; e-health; IoT; web 3.0;
I. Introduction
Blockchain (BC) technology has been nowadays characterized as a critical and important disruptive technology for many industries and applications. Starting with Bitcoin [7] which is a finance oriented extremely ingenious distributed shared ledger and peer-to-peer value transfer technology, BC established trust between unknown stakeholders and automation of payments. Bitcoin reformed the finance and supply chain industry by shortening the time needed to complete time-consuming processes as well as removed almost all intermediaries.
This kind of blockchain technology for financial payments automation without intermediaries is known as Blockchain 1.0. The technology acknowledged as Blockchain 2.0 followed with the Ethereum project [8], which differed from BC 1.0 because of its support to smart contracts (SC) usage. Other BC 2.0 technology projects followed, such as Hyperledger’s HL Fabric, Sawtooth, Iroha [9] and R3’s Corda [10] to name a few. Smart Contracts (SC) are computer programs written and run on the blockchain to provide security and automation to the system, making it possible for participating parties to agree upon certain conditions and according actions to be performed when these conditions are met. These features of SCs reshaped even more the supply chain processes by enabling additional on-chain actions as assets tracking, and in parallel, equipped BCs with the necessary characteristics to be used in other business cases, apart from the supply chain. Actually, BC is now used in many industries such as healthcare [1][2], education [3], government [4], charities [5], real estate [6], insurance [16] and banking [15]. This expanded field of applications supported by BC is actually called Blockchain 3.0, because solutions are no longer restricted to finance actions and assets transfer, but include the above-mentioned sectors and according expanded actions to support the logic behind them [18] [19]. So, with the rise of Blockchain 3.0 technology (2019) based on DAG data structures such as Byteball and IOTA, Blockchain systems are more efficient, scalable, highly interoperable, and have a better user experience than before. Among these sectors, government use cases are of special interest, because of the implications they introduce when adopting BC infrastructure to support them.With the rise of Blockchain 3.0 technology based on Directed Acyclic Graph DAG data structures [39], BC systems are more efficient, scalable, highly interoperable, and have a better user experience than before. Among the abovementioned sectors, government use cases are of special interest, because of the implications they introduce when adopting BC infrastructure to support them. These implications are coming from internal ones related to governmental issues such as politicians’ inaction and opposition, as well as external ones such as the unready for digital transformation laws and sensitive citizens’ and civil servants’ personal data [17]. The BC’s characteristics of decentralization providing zero down-time, immutability ensuring tamper-proof data, non-repudiation and security implemented with cryptography establishing trust between participating parties, consensus algorithms for data integrity, verification and satisfying scalability on private and permissioned blockchains [20] can be both accelerators and obstacles when applied to e-government EG applications.
It is obvious that BC 3.0 technology will support the evolution for EG to become Web 3.0 oriented, by providing the infrastructure, services and processes needed along with other Information and Communication Technologies [21] as Artificial Intelligence (AI) agents to secure and enhance communication between governments, businesses, and citizens [22]. EG 3.0 is totally depended to ICT and it evolves along with Web 3.0 technologies, which include but are not limited to blockchain, artificial intelligence, semantic web and text analytics, machine learning, internet of things, and big data analytics [23].
This paper will examine BC 3.0 and SC characteristics and features that are expected to affect EG 3.0 applications, as well as best practices on how to incorporate them while designing and implementing ICT Web 3.0 e-government solutions.
II. Blockchain
The two major forms of blockchain implementations are public permissionless and private permissioned BCs. The following sections will present the most important characteristics regarding EG 3.0 of both.
A. Permissionless Blockchains
Permissionless BCs were the first generation of Distributed Ledger Technology DLT to provide decentralization as opposed to centralized databases. Bitcoin and Ethereum are the most known representatives of this kind of BCs. The concept is that all transactions are transparent to every participant and written on the ledger only after a consensus of the majority of peers has been achieved. Each participant shares an identical copy of this data called state, which is formed of blocks connected to each other through cryptographic hashes. This architecture makes it almost impossible to everyone to make even a small change to trick others about the data state and take advantage of the assets being exchanged without being noticed and the potential change being discarded by the other peers. A disadvantage of permissionless blockchains is that they do not have any control over who enters or leaves the network, this can be detrimental to security, driving to energy and time-consuming block generation techniques [11] in order to enforce security. The effect of such block generation techniques has the side effect the system to sacrifice its scalability and speed.
Nevertheless, permissionless BCs can be ideal for EG 3.0 applications when data must be public and transparent. Such use cases can be at the education area regarding certificates, degrees and diplomas issued by governmental organizations and academic institutions in order to be worldwide available, shared and verifiable [40][41]. Other uses can be the publishing of voting results, publicly available documents and copyrights.
B. Permissioned Blockchains
Due to BC’s unique characteristics and especially the immutability and decentralization as argued before, the technology moved beyond the cryptocurrency aspect to cover other business needs such as asset tracking and logging, consent and agreement enforcement and monitoring, identity authentication and authorization. The problem with permissionless blockchains is that although they achieve a great deal of decentralization they can not guarantee the privacy and safety needed when dealing with sensitive citizen and government data. This is a direct result mainly from the lack of control on permissionless BCs of who can enter and leave the network at any time, making the complete history visible including confidential documents and records, as well as transactions containing personal citizens’ data.
Permissioned Blockchains as HL Fabric answered the need for private and at the same time decentralized, secure, verifiable transactions between governments, citizens and businesses. The difference from the permissionless BC is that although all transactions are still written through smart contracts to the ledger, if someone needs to have access to the information permissions have to be given. A key aspect on permissioned BCs is that the participants are strictly controlled by a central authority, in an EG case a ministry or an independent authority. The participation to the network is completely controlled as well as who can do what with the ledger’s data. Blockchain policies exist on the network to grant permissions to stakeholders to perform specific actions. In example a citizen must be informed tha a public administration service wants to access her or his data and must consent, otherwise the access is not allowed. These actions are written on the blockchain, providing transparency but only to the participants that have the appropriate permission, in this case the specific public administration that requested the data and the specific citizen. Although permissioned BCs answer the need for privacy, scalability, security and speed some compromises have to be made in the terms of decentralization. Because a central authority is introduced to authorize the private network’s participants the decentralization is hindered and a BC controlling authority is introduced to the network [12].
Permissioned BC are ideal for governmental applications that require a level of security. It can be used for example to support the internal exchange of documents between public organization, keep track of inventories, registry or other private records.
III. Smart Contracts
Smart Contracts SC [13] are computer programs that are immutably written on the blockchain, can be called by the BC’s users. They provide the automation and control flow logic to any system BCs supports. Smart contracts must be treated as software functions in every aspect and smart contract BC engines must be deterministic. Determinism of SCs is the characteristic that maintains the ledger at a stable consistent state and is necessary to enforce transactions finality and avoid soft and hard forks [14]. The determinism of SC’s actions is usually left to the developer. Thus, she must make sure that the automated actions are executed as planned and the results of these actions leave the data in a consistent state, despite the node they are executed on. Also, the SC’s actions must have the same result each time the SC is executed. In the writers’ opinion, which derives from empiricism, smart contracts can be categorized in three major kinds
- Static,
- Dynamic,
- Oracle driven
Depending on the kind of the specific use case that has to be implemented, the developer designs either dynamic, or static or oracle driven smart contracts. Following, is a definition of each to explain the different characteristics in order to help researchers, architects and developers to decide which is the appropriate one in their case.
A. Static standard output
Static SCs are the ones that do not call other smart contracts, do not reside on human interaction, include only one-step and are never going to change the predefined number of steps or actions. These are for example primitive math operations. Such SCs perform operations as addition, subtraction, multiplication and division. Other SCs can call them, retrieve and consume the result of this operation. All SCs receive parameters to perform their actions and from this point of view, they are somehow dynamic. However, there are no additional conditions embedded in this kind of SCs to change their path of actions. Math operations give each time the same result and operators follow the same precedence rules every time. Another kind of these SCs can also be a ‘yes/no” response to a specific question or a standard image returned when a button is pressed. An EG 3.0 application’s example is a function that accepts a verification number of an academic diploma and looks on the ledger for the diploma holder, the issuing institution and the date of issuance and return the result to the requester.
B. Dynamic non-standard output
Dynamic are all the SCs that embed various rules allowing them to perform different actions according to these rules. Examples of such SCs are functions that monitor certain conditions and trigger according actions. This can happen i.e. when a SC is utilized to monitor the electricity consumption and temperature logged on the BC of an energy smart building. The SC includes thresholds for different heating and consumption measurements in order to adjust the temperature in an eco-friendly way, avoiding excessive electricity consumption and costs. The following pseudocode can be part of the smart contract’s definition showing the logic behind monitoring and execution
if room_temperature < 18 Celcius {
if electricity_consumption < 25 Watt
then turn_on air_condition
else send_message: "The daily
electricity consumption threshold has been reached. Would you like to turn on the A/C?"
if user_answer == ‘YES’ then
turn_on air_condition
else do_nothing
}
if room_temperature > 25 Celcius {
if electricity_consumption < 25 Watt
then turn_on heating_unit
else send_message: "The daily electricity
consumption threshold has been reached. Would you like to turn on the heating_unit?"
if user_answer == ‘YES’ then
turn_on heating_unit
else do_nothing
}
This SC although deterministic, follows a non-static conditioned flow, which shows how a dynamic SC might be formed and how it can act. The aforementioned code is very simplistic but computer functions can be long and very complex. Additionally it involves human interaction, which in certain occasions could hinder or cancel the dynamic action feature of SCs. In our perspective the human input is considered dynamic to the terms of non-standard, condition driven final action. There are also other occasions where the dynamic nature of SCs is controlled by machine-to-machine M2M actions. This M2M interactions can have unpredictable outcomes when the developer’s design and implementation of the SC is erroneous, incomplete, or non-deterministic.
Another area of EG 3.0 applications that dynamic SCs can be used is to interconnect public administrations that need to exchange citizen data. For example, if the tax service wants to gain access to a citizen’s land titles which are kept by the land registry service, then a smart contract supplied with a VAT number from the tax service could look the land titles tied with this VAT number and return them to the tax service officer if he had the appropriate permissions. If a universal BC ledger containing the land titles for all citizens, then this could help to confront fraud and tax evasion and mediate the secure exchange of data between nations.
C. Oracle driven
Both Static and Dynamic SCs handle data that resides on the BC itself. The third major category of SCs is the oracle driven ones which can handle data coming from sources external to the BC. This kind of SCs are dynamic in every way plus they include information brought into the system by the so-called AI oracles, which are smart contracts themselves. This special kind of SCs act as AI agents with the ability to inquire information from the real world and write it on the blockchain in order other smart contracts to consume it [24]. What is special about this SC category compared to the other is that SCs in general are not allowed to incorporate data external to the BC. The reason for this restriction is the determinism of BC functions. Determinism as argued before include the fact that the same result must be returned each time a SCs function is called, thus, we cannot reside to external resources which are subject to change. Thus, we mainly enforce determinism by using only data that currently exists on our ledger’s state. An exception to this is made through the oracles, by writing data on the BC to represent how this data was exactly at the time it was written on the ledger.
AI oracle driven SCs can be used in EG 3.0 law applications. For example, laws for inheritance can change and notaries or other public servants that are involved into the procedures regarding the transfer of the legacy to the legal inheritor must be formally informed. The oracle can look up information from a governmental repository and write to the BC when a specific law changes. After that a notification can be send through a BC 3.0 application to prove the date and time it was sent to inform the interested parties as well as ask and record on the BC their confirmation of receival.
IV. e-government 3.0
According to [25] definition, EG is the use of ICT to provide the means for governments, citizens and businesses to interact, communicate, share information and deliver services to the various stakeholders. EG 1.0 utilized the World Wide Web and available by then ICTs to become more efficient than it used to be [26]. EG 2.0 through portal services supported by Web 2.0 technologies became more citizen-centric, promoting citizens’ participation and enhancing e-democracy [27]. It becomes almost obvious by observing the technological evolution shaping EG, that EG 3.0 will use Web 3.0 ICTs such as DLT, AI, Semantic Web and World Wide Virtual Web [20][28].
Artificial Intelligence is another promising and disruptive technological field. The AI’s technological ability to equip machines with the cognitive capabilities to learn, infer and adapt depending on the consumed data is reinforced by the huge amount of information produced nowadays by smart devices, social media and web applications [29]. The problems governments, organizations and companies face while trying to leverage such huge amount of information is the centralization of data as well as the provenance of source legitimacy and authenticity. The data used in AI projects is centrally controlled, can be tampered and prominent to narrow not conscious emotionally driven AI, as the Microsoft’s AI twitter based bot project showed when it was overwhelmed with racist remarks which unfortunately repeated back to the users [30].
Taking under consideration [22] which argues that AI is thought as the solution of major governmental obstacles and specifically for resource allocation, large datasets, experts shortage, predictable scenarios, procedural and repetitive tasks, diverse data aggregation and summarization, it is crucial to research how to overcome the centralization, provenance and authenticity problems. The combination of BC and AI technologies can solve current centralization problems while in parallel can provide solutions for resource optimization and return private personal data control back to their respective owners in a distributed, decentralized and democratized manner [31].
The rest of this paper will examine two EG 3.0 scenarios supported by BC 3.0 and AI technology in order to provide EG stakeholders and policy makers ways to exploit current industry BC and AI applications for governmental, public and social good.
A. Energy data – Scenario1
Governance of smart cities has been digitally enhanced during the last years by the use of ICT so key areas became subjects of research because of the increasing energy demands deriving from multiplication and complexity of the IoT devices. It became crucial for local governments to practice energy management strategies to use the available energy efficiently [32]. A modern smart city is a combination of smart technologies applied to its infrastructures and to citizens’ residences at building or even at home level. The ability of energy consumers to produce energy from renewable sources and distribute it through smart grids becoming thus prosumers increased the difficulty of national energy management techniques. However, in parallel it created an opportunity to make a smart city more sustainable and energy efficient if the additional produced energy is successfully modelled and incorporated to the city’s energy system, along with other energy elements as transportation and facilities [33]. This is so crucial that European Commission has published in the last years two directives for energy efficiency goals for a 20% energy savings target by 2020 and 30% energy efficiency target for 2030 along with specific national targets focusing on lowering energy bills, reducing nations reliance on external suppliers and becoming eco-friendlier protecting the environment [42][43]. With managing energy smart cities and supporting citizen-sourcing to achieve increased efficiency at all phases of the energy chain, the EG 3.0 will play a crucial role in the energy sector. BC 3.0 technology used in conjunction with AI provides authentication, decentralized intelligence, security and collective decision making.
The EG scenario is applied to a city, and includes IoT devices installed at citizens houses who are also prosumers. The IoT devices produce energy data which is stored on a private permissioned blockchain. As argued before the data stored on a BC is tamper-proof because it is cryptographically immutable and authenticated as each transaction is digitally signed. Energy data is considered confidential though, so the security concerns must be mitigated by using a private BC. The Know Your Customer KYC principle is provided through the permission policies enforced on the BC network by setting each citizen in charge of what is shared, either regarding personal data or energy production. More security can be enforced if the registration of prosumers follows a strict protocol, where the registration applications to participate at the local energy network and approvals from the city ’s local government are also logged on the BC. The whole process is automated through the use of Dynamic SCs controlling the processes of IoT data logging, registration and approval logging, available energy dispatching and monitoring.
A SC is used for gathering energy consumption and production measurements form the citizen’s IoT devices in order to log them on the blockchain. The citizen has to provide the BC identity that has been issued to her in order to login. This identity can be self-sovereign in order to be secure and remain at user’s control [44]. A SC is used for dispatching of the extra energy from a citizen’s residence to the main energy system or to the citizen-sourced smart grid she participates. If, for example, daily consumption needs are 14kWh and the SC detects that the power produced from renewable sources exceeds 15kWh, it can automatically trigger an action in order to dispatch this available power to the local energy system. In addition, there must be a dynamic smart contract to deposit the predefined amount of money for the energy dispatched by the citizen. Oracle based SCs can inform citizens when the energy dispatching can be more profitable, to provide incentives for participating to the energy network. Smart grids can be formed by local policies taking under consideration geographic factors, energy needs, and building production capabilities. AI agents will run at the citizens residences forming a collective decision making mechanism to apply Swarm Intelligence SI and achieve a swarm goal [34], programmed to decide how much energy can be dispatched to the city’s central energy system and how much energy can be traded among the participants on a smart grid. AI EG applications can read the data written on the BC and make forecasting of city’s energy needs for the next hours, days or even months. AI can also analyze the data and recognize trends and peak hours. The results and metadata from AI analyses can be grouped per district to help governments and policy makers create more efficient energy management strategies and achieve local and national goals.
Following is the pseudocode of two BC 3.0 SCs. The first one is for gathering energy consumption and production measurements form the citizen’s IoT devices in order to log them on the blockchain. The second is for energy dispatching of the excessive energy from a citizen’s residence to the main energy system, after checking the total consumption and total production which have previously been written on the blockchain. Both SCs are implemented on a private blockchain framework and take action every five seconds.
define SC_measurements():
while True:{
CurrentConsumption = IoT.get_measurements
sign transaction(client_addr, CurrentConsumption )
write to BC(client_addr, CurrentConsumption )
CurrentProduction = IoT.get_production
sign transaction(client_addr, CurrentProduction )
write to BC(client_addr, CurrentProduction )
}
define SC_energy_dispatch(client_addr):
while True:{
energyConsumption = read BC.CurrentCons(client_addr)
energyProd = read BC.CurrentProd(client_addr)
if energyProduction > 10watt then
if energyConsumption < energyProduction then
dispatch = energyProduction – energyConsumption
sign transaction{client_addr, dispatch}
write to BC{client_addr, dispatch}
}
B. Health data - Scenario 2
National Healthcare systems is another sector where e-health strategies must be adopted for governments to control excessive healthcare costs [35]. Healthcare systems include huge amount of data that are mostly confidential, thus, problems arise when trying to process and analyze those big data and AI is a perfect match to provide solutions to these problems. As research shows it is hard for older adults to use the e-health systems [36] [37]. By using AI chatbots, older people can use speech recognition to make questions and inquiries and the chatbots can provide guidance and responses. Another use for AI agents will be to get citizens’ filled forms and forward them to the appropriate government department [38]. As for the confidentiality and authenticity problems of the private e-health data, a permissioned BC 3.0 as it has been already described can provide the means to confront them. This way EG 3.0 can provide solutions to the e-health necessities by utilizing ICT and Web 3.0 to transform the legacy systems, in order to increase the efficiency and effectiveness of these systems, decrease costs and provide more citizen-centric health care services [36].
The EG scenario includes IoT wearables that send patient data, i.e. heart beats or blood pressure, to a private permissioned BC. This ensures the data’s security, authenticity and confidentiality. When a doctor wants to access the patients’ BC data she makes a request, which triggers a SC and this request is logged on the BC. The SC sends an information message to the patient and if the patient agrees to give access to the doctor the doctor gains access to the patient’s data. The SC writes on the BC the patients answer either it was positive or negative. This way a complete tracking system for requests and consent responses is formed. We can consider how useful and secure this can be when e-health records must be exchanged between countries at a national or international level with end-to-end security.
We can see an outline of three of BC 3.0 SC's pseudocode below:
define SC_health_data():
while True:{
H_Data = IoT.get_heart_rates
sign transaction(client_addr, H_Data)
write to BC(client_addr, H_Data)
}
define SC_doctor_access():
request read BC.H_Data(client_addr)
sign transaction(doctor_addr, request, client_addr)
write to BC(doctor_addr, request, client_addr)
send inform_consent(client_addr, request, doctor_addr)
}
define SC_patient_consent(doctor_addr, request):
read BC.doctor_request(doctor_addr, request)
inquire response_from_patient
if response == ‘YES’ then grant_access(doctor_addr for request)
sign transaction(client_addr, response)
write to BC(client_addr, response)
}
V. Further Research
We acknowledge that there are restrictions in our research, mainly due to the different energy and e-health implementations among countries in Europe. Our research focuses on governments and citizens, and further research has to be made in order to include results and effects on will include applications and results with public administrations and civil servants. The scenarios demonstrated are focused focus on BC 3.0 support. Thus, EG scenarios that include additional Web 3.0 technologies must be designed, developed, and tested. We hope to be able to contribute more on these subjects as our research projects are still work in progress.
References
- A Case Study for Blockchain in Healthcare: “MedRec” prototype for electronic healthrecords health records and medical research data White Paper, Ariel Ekblaw, Asaph Azaria, John D. Halamka, MD, Andrew Lippman, 2016
- Suveen Suveen Angraal, MBBS; Harlan M. Krumholz, MD, SM; Wade LL. Schulz, MD, PhD, Blockchain Technology Applications in Health in Health Care, 2017, DOI: 10.1161/CIRCOUTCOMES.117.003800
- Grech, A. and Camilleri, A. F. (2017) Blockchain in Education. Inamorato dos Santos, A. (ed.) EUR 28778 EN; doi: 10.2760/60649
- Svein Ølnes, Jolien Ubacht, Marijn Janssen, Blockchain in government: Benefits and implications of distributed ledger technology for information sharing, Government Information Quarterly, Volume 34, Issue 3, 2017, Pages 355-364, ISSN 0740-624X, https://doi.org/10.1016/j.giq.2017.09.007
- Jayasinghe D., Cobourne S., Markantonakis K., Akram R.N., Mayes K. (2018) Philanthropy on the Blockchain. In: Hancke G., Damiani E. (eds) Information Security Theory and Practice. WISTP 2017. Lecture Notes in Computer Science, vol 10741. Springer, Cham, DOI https://doi.org/10.1007/978-3-319-93524-9_2
- Karamitsos, I., Papadaki, M. and Barghuthi, N. (2018) Design of the Blockchain Smart Contract: A Use Case for Real Estate. Journal of Information Security, 9, 177-190. doi: 10.4236/jis.2018.93013
- Nakamoto, S. (2018) Bitcoin: A Peer-to-Peer Electronic Cash System, https://bitcoin.org/bitcoin.pdf
- Buterin, V. (2013). Ethereum White Paper: A next-generation smart contract and decentralized application platform, retrieved from https://github.com/ethereum/wiki/wiki/White-Paper
- Hyperledger Hyperledger Architecture, Volume 1, retrieved from https://www.hyperledger.org/wp-content/uploads/2017/08/Hyperledger_Arch_WG_Paper_1_Consensus.pdf
- Richard Gendal Brown, “The Corda Platform: An Introduction”, 2018, retrieved from https://www.corda.net/content/corda-platform-whitepaper.pdf
- Proof Proof of work, retrieved from https://en.bitcoin.it/wiki/Proof_of_work
- K. Wüst and A. Gervais, "Do you Need a Blockchain?," 2018 Crypto Valley Conference on Blockchain Technology (CVCBT), Zug, 2018, pp. 45-54. doi: 10.1109/CVCBT.2018.00011
- Nick Szabo, " Smart Contracts: Building Blocks for Digital Markets”, 1996, retrieved from http://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart_contracts_2.html
- K. Christidis and M. Devetsikiotis, "Blockchains and Smart Contracts for the Internet of Things," in IEEE Access, vol. 4, pp. 2292-2303, 2016. doi: 10.1109/ACCESS.2016.2566339
- Peters G.W., Panayi E. (2016) Understanding Modern Banking Ledgers Through Blockchain Technologies: Future of Transaction Processing and Smart Contracts on the Internet of Money. In: Tasca P., Aste T., Pelizzon L., Perony N. (eds) Banking Beyond Banks and Money. New Economic Windows. Springer, Cham, https://doi.org/10.1007/978-3-319-42448-4_13
- Gatteschi, V.; Lamberti, F.; Demartini, C.; Pranteda, C.; Santamaría, V. Blockchain and Smart Contracts for Insurance: Is the Technology Mature Enough? Future Internet 2018, 10, 20, https://doi.org/10.3390/fi10020020
- Svein Ølnes, Jolien Ubacht, Marijn Janssen, nBlockchain Blockchain in government: Benefits and implications of distributed ledger technology for information sharing, Government Information Quarterly, Volume 34, Issue 3, 2017, Pages 355-364, ISSN 0740-624X, https://doi.org/10.1016/j.giq.2017.09.007
- V. Gatteschi, F. Lamberti, C. Demartini, C. Pranteda and V. Santamaría, "To Blockchain or Not to Blockchain: That Is the Question," in IT Professional, vol. 20, no. 2, pp. 62-74, Mar./Apr. 2018. doi: 10.1109/MITP.2018.021921652
- Melanie Swan, Blockchain: Blueprint for a New Economy, 2015, O’Reilly
- Dmitry Efanov, Pavel Roschin, The All-Pervasiveness of the Blockchain Technology, Procedia Computer Science, Volume 123, 2018, Pages 116-121, ISSN 1877-0509, https://doi.org/10.1016/j.procs.2018.01.019
- Meyerhoff Nielsen M. (2017) Governance Failure in Light of Government 3.0: Foundations for Building Next Generation e-government Maturity Models. In: Ojo A., Millard J. (eds) Government 3.0 – Next Generation Government Technology Infrastructure and Services. Public Administration and Information Technology, vol 32. Springer, Cham, https://doi.org/10.1007/978-3-319-63743-3_4
- A. Androutsopoulou, N. Karacapilidis, E. Loukis, Y. Charalabidis, Transforming the communication between citizens and government through AI-guided chatbots, Government Information Quarterly, Volume 36, Issue 2, 2019, Pages 358-367, ISSN 0740-624X, https://doi.org/10.1016/j.giq.2018.10.001
- Yli-Huumo, Jesse & Päivärinta, Tero & Rinne, Juho & Smolander, Kari. (2018). Suomi.fi - Towards Government 3.0 with a National Service Platform
- F. Daniel and L. Guida, "A Service-Oriented Perspective on Blockchain Smart Contracts," in IEEE Internet Computing, vol. 23, no. 1, pp. 46-53, 1 Jan.-Feb. 2019. doi: 10.1109/MIC.2018.2890624
- United Nations E-Government Knowledgebase,
“A General Framework for E-Government: Definition - Maturity Challenges, Opportunities, and Success”, 2010, retrieved from https://publicadministration.un.org/egovkb/en-us/Resources/E-Government-Survey-in-Media/ID/1376/A-General-Framework-for-E-Government-Definition--Maturity-Challenges-Opportunities-and-Success - M. A. Wimmer, A. Ronzhyn, G. Viale Pereira, Y. Charalabidis, H. Alexopoulos “Workshop: Roadmapping. Government. 3.0”, 2018, Proceedings of the International Conference EGOV-CeDEM-ePart 2018 2018
- Po-Ling Sun, Cheng-Yuan Ku, Dong-Her Shih, An implementation framework for E-Government 2.0, Telematics and Informatics, Volume 32, Issue 3, 2015, Pages 504-520, ISSN 0736-5853, https://doi.org/10.1016/j.tele.2014.12.003
- “Is Web 3.0 Really a Thing? A Brief Intro to Web 3.0 and What to Expect” , 2018, retrieved from from https://www.lifewire.com/what-is-web-3-0-3486623
- K. Salah, M. H. U. Rehman, N. Nizamuddin and A. Al-Fuqaha, "Blockchain for AI: Review and Open Research Challenges," in IEEE Access, vol. 7, pp. 10127-10149, 2019. doi: 10.1109/ACCESS.2018.2890507
- Diversifying Data With Artificial Intelligence And Blockchain Technology, 2018, retrieved from from https://www.forbes.com/sites/rachelwolfson/2018/11/20/diversifying-data-with-artificial-intelligence-and-blockchain-technology/#71272a104dad
- Gabriel Axel Montes, Ben Goertzel, Distributed, decentralized, and democratized artificial intelligence, Technological Forecasting and Social Change, Volume 141, 2019, Pages 354-358, ISSN 0040-1625, https://doi.org/10.1016/j.techfore.2018.11.010
- Ejaz, W., Naeem, M., Shahid, A., Anpalagan, A., & Jo, M. (2017). Efficient energy management for the internet of things in smart cities. IEEE COMMUNICATIONS MAGAZINE, 55(1), 84–91.
- C.F. Calvillo, A. Sánchez-Miralles, J. Villar, Energy management and planning in smart cities, Renewable and Sustainable Energy Reviews, Volume 55, 2016, Pages 273-287, ISSN 1364-0321,https://doi.org/10.1016/j.rser.2015.10.133.
- Chamanbaz M., Mateo D., Zoss B. M., Tokić G., Wilhelm E., Bouffanais R., Yue D. K. P., Swarm-Enabling Technology for Multi-Robot Systems , Frontiers in Robotics and AI, Volume 4, 2017, page 12, DOI=10.3389/frobt.2017.00012 00012
- C. E. Jiménez, A. Solanas and F. Falcone, "E-Government Interoperability: Linking Open and Smart Government," in Computer, vol. 47, no. 10, pp. 22-24, Oct. 2014. doi: 10.1109/MC.2014.281 281
- Gianluca Quaglio, Claudio Dario, Panos Stafylas, Madis Tiik, Sarah McCormack, Pēteris Zilgalvis, Marco d’Angelantonio, Theodoros Karapiperis, Claudio Saccavini, Eva Kaili, Luigi Bertinato, John Bowis, Wendy L. Currie, Alexander Hoerbst, E-Health in Europe: Current situation and challenges ahead, Health Policy and Technology, Volume 5, Issue 4, 2016, Pages 314-317, ISSN 2211-8837, https://doi.org/10.1016/j.hlpt.2016.07.010.
- Tsipi Heart, Efrat Kalderon, Older adults: Are they ready to adopt health-related ICT?, International Journal of Medical Informatics, Volume 82, Issue 11, 2013, Pages e209-e231, ISSN 1386-5056, https://doi.org/10.1016/j.ijmedinf.2011.03.002.
- Wang, Weiyu and Siau, Keng L., "Living with Artificial Intelligence: Developing a Theory on Trust in Health Chatbots - Research in Progress" (2018). SIGHCI 2018 Proceedings. 4. https://aisel.aisnet.org/sighci2018/4
- Directed acyclic graph, retrieved from https://en.wikipedia.org/wiki/Directed_acyclic_graph
- Blockcert, The open standard for Blockchain Credentials, retrieved from https://www.blockcerts.org/
- MIT Digital Certificates Project, retrieved from http://certificates.media.mit.edu/
- Energy Efficiency Directive 2012-2016, retireved retrieved from https://ec.europa.eu/energy/en/topics/energy-efficiency/energy-efficiency-directive
- Energy Efficiency Directive 2020-2030, retireved retrieved from https://ec.europa.eu/energy/en/topics/energy-efficiency
- Sovrin Foundation, 2016, The Inevitable Rise of Self-Sovereign Identity, retrieved from https://sovrin.org/wp-content/uploads/2017/06/The-Inevitable-Rise-of-Self-Sovereign-Identity.pdf