Conference PaperPDF Available

Evaluation of Logic-Based Smart Contracts for Blockchain Systems

Authors:

Abstract and Figures

While procedural languages are commonly used to program smart contracts in blockchain systems, logic-based languages may be interesting alternatives. In this paper, we inspect what are the possible legal and technical (dis)advantages of logic-based smart contracts in light of common activities featuring ordinary contracts, then we provide insights on how to use such logic-based smart contracts in combination with blockchain systems. These insights lead us to emphasize a fundamental challenge-algorithms for logic approaches have to be efficient, but they also need to be literally cheap as measured within the environment where they are deployed and according to its economic rules. We illustrate this with different algorithms from defeasible logic-based frameworks.
Content may be subject to copyright.
Evaluation of Logic-Based Smart Contracts
for Blockchain Systems
Florian Idelberger1(B
), Guido Governatori2(B
),
egis Riveret2(B
), and Giovanni Sartor1(B
)
1European University Institute, Fiesole, Italy
{florian.idelberger,Giovanni.Sartor}@eui.eu
2Data61 - CSIRO - NICTA, Brisbane, Australia
{guido.governatori,regis.riveret}@data61.csiro.au
Abstract. While procedural languages are commonly used to program
smart contracts in blockchain systems, logic-based languages may be
interesting alternatives. In this paper, we inspect what are the possi-
ble legal and technical (dis)advantages of logic-based smart contracts in
light of common activities featuring ordinary contracts, then we provide
insights on how to use such logic-based smart contracts in combination
with blockchain systems. These insights lead us to emphasize a funda-
mental challenge - algorithms for logic approaches have to be efficient,
but they also need to be literally cheap as measured within the envi-
ronment where they are deployed and according to its economic rules.
We illustrate this with different algorithms from defeasible logic-based
frameworks.
Keywords: Smart contract ·Blockchain ·Programming paradigm ·
Logic
1 Introduction
A smart contract is a computer program that both expresses the contents of
a contractual agreement and operates the implementation of that content, on
the basis of triggers provided by the users or extracted from the environment.
Smart contracts are currently promoted as means to leverage efficiency, security
and impartiality in the execution of an agreement, thereby reducing the costs in
implementing contracts and increasing trust between parties.
While imperative languages, especially procedural languages, are mostly used
to code smart contracts in current blockchain platforms, declarative languages
for such contracts, and in particular logic-based rule languages, should also be
considered to better represent and reason upon them, towards a concept that
we may call declarative smart contracts, in particular the concept of logic-based
smart contracts.
Combinations of logic frameworks and blockchain systems may lead to smart
contracts that are easier to work with for jurists and developers and have tech-
nical advantages over procedural coding of the contracts. These combinations
may also lead to new opportunities for applications for these logic frameworks.
F. Idelberger et al.
In this paper, we investigate the utility of logic-based smart contracts and
possible ways to use them in combination with blockchain systems:
– to understand what legal and technical (dis)advantages logic-based smart
contracts can provide w.r.t. their procedural counterparts, we structure this
investigation in light of a common contract lifecycle;
– to show how logic-based smart contracts can be used in combination of
blockchain systems, we inspect different combinations for leveraging logic-
based languages to operate smart contracts in combination with such sys-
tems.
These insights will lead us to emphasize a foundational challenge to fully take
advantage of logic-based smart contracts with blockchain systems: algorithms for
logic approaches have to be efficient, but they also need to be literally cheap in
execution. Since logic models of defeasible reasoning are often advocated to cap-
ture legal knowledge and reasoning (see e.g. [16]), we will illustrate our discourse
with defeasible rules and associated logic frameworks.
This paper is organised as follows. In Sect. 2, we outline some basic elements
and mechanisms of blockchain systems. In Sect. 3, we define and illustrate logic-
based smart contracts and in Sect. 4we examine the possible legal and technical
utility of such logic-based smart contracts compared to procedural smart con-
tracts, and we do so in light of common legal activities. In Sect.5, we investi-
gate different options for the operation of smart contracts in combination with
blockchain systems, before concluding.
2 Blockchain Systems
A blockchain system consists of a network of computing nodes, sharing a common
data structure (the blockchain) with consensus about the state of this structure.
The most prominent example of such a system is Bitcoin [13], which estab-
lished a distributed network of accounts and transactions (a ledger), where revi-
sions or tampering is made prohibitively difficult due to the algorithm used
in conjunction with economic consensus. Since Bitcoin is the most prominent
example, most explanations regarding blockchain systems below will be based
on this system; the functioning of different blockchains may differ in detail but
such differences fall outside of the scope of this paper.
The data structure backing a blockchain system is distributed because it is
replicated amongst the nodes (i.e. computers) of the system. As new blocks of
recent transactions are added to the distributed data structure, they include
a reference back to the previous blocks, so that any node can consequentially
verify the integrity of the data structure. This chain of blocks of transactions is
called a blockchain.
Transactions on the blockchain are not cost-free. Miners have to spend com-
puting power (tied to hardware) and energy to integrate blocks of transactions
into the blockchain. As incentives, if a miner ‘discovers’ the solution of the prob-
lem to include a block, such miner receives economic incentives in the form of
Logic-Based Smart Contracts in Blockchains
new Bitcoins (block reward) and transaction fees. It is presently unclear how this
system will function once the algorithmically predetermined number of Bitcoins
has been reached.
The transaction fee is an incentive for a miner to include this transaction in
their block. For advanced blockchain systems, the fee may also cover the cost of
the computational steps required to operate the transaction, in particular when
the transactions are associated with extra instructions. The computation of the
amount of the fee is outside of the scope of this paper, but as rule of thumb, the
simpler a transaction in terms of computational complexity, the less it costs.
Since transactions can be costly, it is often advanced that heavy computation
should occur ‘off-chain’ instead of ‘on-chain’. In off-chain scenarios, computation
is performed outside the blockchain-based system, e.g. on the server of an inter-
mediation service, while, in on-chain scenarios, computation is performed and
validated in the blockchain-based system by the miners. Of course, off-chain
computation results can be recorded in a blockchain, however parties may prefer
to avoid off-chain intermediation services that can be performed on-chain, for
example to increase trust.
While blockchain technology was initially used as a distributed ledger of
crypto-currency transactions (namely Bitcoin transactions), such a technology
can also be used to manage smart contracts and associated transactions.
3 Logic-Based Smart Contracts
The term smart contract was originally introduced in the 90s by Szabo [17],
stemming from the idea that a more technological legal framework would help
commerce and cut down on disputes. Lately the idea came to popularity again
with the rise and expanding capabilities of blockchain based systems. Parts of a
smart contract can correspond to a legal contract or a clause in a legal contract,
but they do not have to.
When there is a condition to which certain legal consequences are attached,
the smart contract executes the corresponding statements and any potential
contractual consequences. Examples for applying smart contracts are program-
matic banking functions (see e.g. Automated Escrow, Savings), decentralized
markets (e.g. OpenBazaar, EtherMarket), prediction markets (Augur, Gnosis),
distribution of music royalties (Ujo) and encoding of virtual property (Ascribe).
Smart contracts in blockchains are typically programmed in a procedural lan-
guage. On the platform Ethereum [5,18], developers can encode smart contracts
in a procedural language called Solidity1. When programming in a procedural
language, the programmer writes an explicit sequences of steps that are executed
to produce what has to be done. The programmer has to write what has to be
done and how to achieve it.
Example 1. This example is based on the structure of the example provided in
[7] to illustrate some intricacies of the logical formalisation of legal reasoning
1Solidity. Available at https://ethereum.github.io/solidity.
F. Idelberger et al.
Let us consider the following licensing contractual clauses for the evaluation of
a product.
Article 1. The Licensor grants the Licensee a licence to evaluate the Product.
Article 2. The Licensee must not publish the results of the evaluation of the
Product without the approval of the Licensor; the approval must be obtained
before the publication. If the Licensee publishes results of the evaluation of
the Product without approval from the Licensor, the Licensee has 24h to
remove the material.
Article 3. The Licensee must not publish comments on the evaluation of the
Product, unless the Licensee is permitted to publish the results of the evalu-
ation.
Article 4. If the Licensee is commissioned to perform an independent evaluation
of the Product, then the Licensee has the obligation to publish the evaluation
results.
Article 5. This license will terminate automatically if Licensee breaches this
Agreement.
Suppose that the licensee evaluates the product and publishes on their web-
site the results of the evaluation without having received an authorisation from
the licensor. The licensee realises that they were not allowed to publish the
results of the evaluation, and they remove the published results from their web-
site within 24 h from the publication. Is the licensee still able to legally use
the product? Since the contract contains a compensatory clause, it is possible
to argue that the license to use the product still holds. Suppose now that the
licensee, right after publishing the results, posted a tweet about the evaluation
of the product and that the tweet counts as commenting on the evaluation. In
this case, we have a violation of Article 3, since, even if the results were pub-
lished, according to Article 2 the publication was not permitted. Thus, they are
no longer able to legally use the product under the term of the license. The final
situation we want to analyse is when the publication and the tweet actions take
place after the licensee was commissioned to perform an independent evaluation
from the licensor. In this case, the licensee has the obligation to publish the
result, which then means that they were also permitted to publish the result,
and thus they were free to post the tweet. Accordingly, they can continue to use
the product under the terms of the licence.
Algorithm 1gives a pseudo-code example of how a procedural smart contract
can implement the contractual clause of Example 1. The smart contract includes
a sequence of instructions updating the normative states (obligations, prohibi-
tions and permissions in force) depending on what actions have been done and
then the current state. The program has to set the initial state for the contract,
then the procedure EvaluationLicenseContract has to be invoked every
time there is a trigger for the program. Notice that the order of the instruc-
tions in the procedure does not reflect the natural order of the contract clauses
expressed in natural language. The programmer has to come up with such an
order, and also the programmer has to manually determine how a trigger changes
Logic-Based Smart Contracts in Blockchains
Algorithm 1. Pseudo-code of the licensing contractual clauses.
1: Initialise getLicence, getApproval, getCommission, use, publish, comment, remove
2: [Forblicensee] use true
3: [Forblicensee] publish true
4: [Forblicensee] comment true
5: violation false
6:
7: procedure EvaluationLicenseContract
8: if getLicence = true then
9: [Forblicensee] use false
10: [Permlicensee] use true Article 1
11:
12: if getLicence = true and (getApproval = true or getCommission = true) then
13: [Forblicensee] publish false
14: [Permlicensee] publish true Article 2, 4
15:
16: if getLicence = true and
17: getApproval = false and
18: getCommission = false and
19: publish = true then
20: [Obllicensee]removetrue Article 2
21:
22: if [Permlicensee] publish = true then
23: [Forblicensee] comment false
24: [Permlicensee] comment true Article 3
25:
26: if getLicence = true and getCommission = true then
27: [Forblicensee] publish false
28: [Obllicensee] publish true
29: [Permlicensee] publish true Article 4
30:
31: if ([Forblicensee] use = true and use = true) or
32: ([Forblicensee] publish = true and publish = true) or
33: ([Obllicensee] publish = true and publish = false) or
34: ([Forblicensee] comment = true and comment = true) or
35: ([Obllicensee] remove = true and remove = false) then
36: violation true
37: if violation = true then
38: [Forblicensee] use true
39: [Forblicensee] publish true
40: [Forblicensee] comment true
41: [Permlicensee] use false
42: [Permlicensee] publish false
43: [Permlicensee] comment false
44: [Obllicensee] publish false Article 5
F. Idelberger et al.
the state of the normative provisions (i.e., obligations, permissions and prohi-
bitions), and to propagate the changes according to the meaning. This means
that the programmer is responsible to perform the legal reasoning implied by
the contract clauses. For example, when a permission becomes true, the corre-
sponding prohibition should be set to false; similarly, when we set an obligation
as true, the corresponding permission should be set to true as well. For large
and complex smart contracts, an alternative is to set an auxiliary procedure to
be invoked, when the state of a normative provision has to be changed, and
propagate the changes to all related normative provisions.
The process of writing a procedural program corresponding to a contract can
be cumbersome and error prone since the order of instruction affects the correct-
ness of the resulting smart contract. A possible solution to alleviate this problem
is to create a state machine for the contract (Fig.1shows a state machine for
the contract in Example 1). Then, the programmer can use the state machine
as a guide to derive the procedural code. Alternatively, the state machine could
be represented directly in the program and a state machine engine could then
be used to execute the resulting smart contract. This approach can grow expo-
nentially large in the number of states and transitions for non-trivial contracts,
and the programmer still remains in charge of the legal reasoning implied by the
contract.
Fig. 1. State machine of the licensing contractual clauses.
Besides imperative languages for smart contracts, one may consider declar-
ative languages (in particular logic-based languages). When programming in
a declarative language, the programmer does not have to explicitly write the
sequence of steps to produce what has to be done. Instead the programmer
describes what has to be done, but not how to do it. In particular, languages
Logic-Based Smart Contracts in Blockchains
for logic programming can be used to represent and reason upon the rules rep-
resented by smart contracts. With the logic approach, contractual clauses are
rephrased into explicit formal statements which are separated from the embed-
ding program, and the program has inferential functionalities to reason upon
these statements. In practice, the contractual clauses would be encoded into
logic rules, and a rule-based engine would reason upon the rules.
Example 2. Since logic-based models of defeasible reasoning are often advocated
to capture legal knowledge and reasoning (see e.g. [16]), let us consider the
representation of the contract given in Example 1provided by the (deontic)
defeasible logic (Formal Contract Logic, FCL) of [6] and implemented by the
defeasible logic engine SPINdle [10].
Article1.0: => [Forb_licensee] use
Article1.1: getLicense => [Perm_licensee] use
Article2.1: => [Forb_licensee] publish [Compensated] [Obl_licensee]remove
Article2.2: getApproval => [Perm_licensee] publish
Article3.1: => [Forb_licensee] comment
Article3.2: [Perm_licensee] publish => [Perm_licensee] comment
Article4.1: getCommission => [Obl_licensee] publish
Article4.2: getCommission => getLicense
Article5: violation => [Forb_licensee] use
% Superiority relation
Article1.1 > Article1.0, Article5 > Article1.1,
Article2.2 > Article2.1, Article3.2 > Article3.1
The order of the rules is irrelevant, and as should be visible, the declarative
rules are shorter than procedural code and easier to use, they would later then
be evaluated by a rule engine on the blockchain or deployed in conjunction with
a rule engine.
If there are no triggers, then Article1.0.Article2.1 and Article3.1
fire and we conclude the prohibitions of use,publish and comment. When,
getLicense and publish hold, then Article1.1 overrides Article1.0 thus we
have the permission of use, but we continue to have the prohibition to publish,
thus the publication contravenes Article 2, and we can use rule Article2.1 to
derive the mandated compensation, that is the obligation of removing the mate-
rial is now in force, i.e., we conclude [Obl licensee] remove. See [6] for the
details of FCL.
4 Utility of Logic-Based Smart Contracts
The successes of blockchain-based systems for smart contracts, or at least the
amounts of investments in such systems suggest the viability of ‘procedural smart
contracts’, while the utility of logic-based smart contracts has been hardly inves-
tigated.
In this section, we consider the utility of the logic approach w.r.t. its proce-
dural counterpart. Too bridge the gap between smart contracts and legal con-
tracts, this is done in the light of the lifecycle of a contract.
F. Idelberger et al.
Formation and Negotiation. Based on the ‘freedom to contract’, any legal
entities are free to form contracts, within the limits of the law. Necessary condi-
tions for the formation are the ‘meeting of the minds’ (i.e. the parties have the
intentions to form the contract) and the ‘Offer and Acceptance’ (i.e. the expres-
sion of an offer to contract on certain terms by one person to another person,
and its acceptance of those terms). In practice, parties often negotiate the terms
until they reach an agreement.
As any ordinary contracts, a smart contract can be negotiated i.e. the smart
contract program is coded, and this creation can occur through a negotiation. In
a blockchain system, agreement about what a contract should perform is defined
before deploying the contract in the blockchain system. After creation and giving
assent by calling the contract in the required way, the contract establishes legal
relations between the parties. Often, a contract is first created in a natural
language (as in the case of the creation using a template), and then this contract
is translated into a smart contract. However, a smart contract program can be
created without a natural language counterpart, the same as normal computer
programs.
Using procedural languages, fairly sophisticated smart contracts can be
formed already. However, the procedural coding of a smart contract may appear
difficult to apprehend, slowing down its negotiation and formation. As the pro-
cedural code may appear difficult to understand, one can wonder whether the
contractual clauses are properly coded. In this regard, the procedural code can be
‘validated’ (unit testing etc.) to determine whether this smart contract is fit for
use, but testing procedural code is well-known to be time consuming and error
prone. In logic-based smart contracts, as logic statements can be understood as
high-level specifications, they constitute executable specifications of smart con-
tracts, i.e. specifications that can be directly executed by the smart contracts,
thereby decreasing the risks of errors in the implementation. Moreover, a logic
representation can ease validation by taking advantage of logic-based techniques,
such as formal verification, to detect if certain properties hold. This can be auto-
mated, but since such techniques are often heavy in terms of computation, they
will most likely occur off-chain. Furthermore, a logic representation may ease
the formation of a smart contract resulting from a negotiation between par-
ties. When the formation and negotiation are delegated by humans to artificial
agents, the logic approach may particularly facilitate these activities (w.r.t. a
procedural counterpart) since in this case such activities require, presumably,
some artificial intelligence to represent and reason upon contractual terms.
Contract Storage/Notarizing. A contract can be binding in many forms,
such as by oral agreement, hand shake or intangible agreement. Thus, in principle
there are little formalities required (though exceptions apply). The real problem
arises when there is contention on whether there was a contract or not, and what
its contents were. In those cases, it helps to have a written record of what was
agreed stored and certified. To be extra certain, contracts can be certified by a
trusted third party, a notary. For non-digital contracts, the content has to be
described in natural language and a date manually inserted.
Logic-Based Smart Contracts in Blockchains
Contract storage can be straightforwardly related to the storage of smart
contracts using file systems or database systems. Instead of storing the smart
contract into the machine(s) of particular entities (such as the parties and inter-
mediaries), one can use a blockchain system to store it (its bytecode) with a
relatively accurate timestamp.
There are no particular restrictions on the types of data that can be stored in
blockchains, and therefore smart contracts with logic statements can be stored
in them. As logic statements (e.g. the set of rules stored within a procedural
smart contract and meant to be passed to a rule engine) are generally more
compact than its procedural counterpart, the logic approach may decrease the
cost of storage, in particular when there is an explosion of possible states on
which rules can be applied.
Enforcement and Monitoring. Once a contract is formed, it has to be per-
formed; the parties have to take appropriate actions to fulfil the contractual
clauses. If parties are encouraged or forced to perform their required actions,
this is called enforcement for the purposes of this paper.2Monitoring is the
activity of checking whether the appropriate actions are taken. Enforcement and
monitoring can be described as the deployment and the execution of a program,
which can to some degree be automated by the blockchain consenus code.
The efficient execution and monitoring of a smart contract is a necessary
condition for the use of such a contract, in particular in regard to the worst-case
scenarios. While the computational complexity of the execution of a procedural
smart contract can be quite easily controlled, the complexity of a logic-based
smart contract relies on the complexity of the underlying inference mechanisms
(we will further instigate this point in the next section). Concerning monitoring,
‘controls’ can be typically integrated in the procedural code of a smart contract,
while in logic contracts, monitoring can take advantage of more formal run-time
compliance techniques. Furthermore, the execution and monitoring of a contract
is not necessarily meant to occur in isolation. On the contrary, when executing
smart contracts, contractual clauses may have to be considered w.r.t. exogenous
(legal) information, such as rules from other contracts or the embedding norma-
tive environments (the law in particular). While procedural smart contracts can
interact with each other rudimentarily, a logic approach would take advantage of
efforts in rule interchange languages (such as LegalRuleML [2]) to express rules
and ease interoperability amongst the contracts and other rule systems.
Modification. If all parties perform their contractual duties, then a contract
may in principle not be unilaterally modified. If a party fails to perform or if
a predetermined condition in the contract is activated, then a change in the
contractual relationship can be invoked. If all parties to a contract agree to a
change, the contract can be amended accordingly.
These considerations for non-smart contracts also hold for smart contracts.
In current blockchain systems, a contract cannot be modified but the data stored
in it can be updated. As such, one model to enable flexible solutions is the ‘hub
2While encouragement is not enforcement in all meanings of the word, it is either a
precursor or a part of it.
F. Idelberger et al.
and spoke’ model where one main smart contract holds addresses/pointers to all
other necessary contracts that contain the specific clauses and functionality.
The hub and spoke model allows the modification of smart contracts, but
it may appear quite coarse. In logic-based smart contracts, the statements of
the knowledge base can be coded as ‘public’ variables, thus allowing more fine-
grained updates. A modified knowledge base can also be passed to an existing
contract, which then acts accordingly, similar to how in the hub and spoke model
addresses of subcontracts are exchanged. Moreover, the order of instructions
and procedures is fundamental in the procedural approach (as illustrated in
Algorithm 1), and thus the hub and spoke model may cause some issues in that
regard. As the order of the statement in a knowledge base does not matter w.r.t.
the conclusions that can be derived from it, a logic-based language can greatly
help to tackle modifications.
Dispute Resolution. A dispute regarding a contract may occur, and thus such
a dispute has to be resolved. Two major types of dispute resolution exist: (i)
adjudicative resolution, such as litigation or arbitration, where a judge, jury or
arbitrator determines the outcome, and (ii) consensual resolution, such as collab-
orative law, mediation, conciliation, or negotiation, where the parties attempt
to reach agreement.
Smart contracts can be disputed too, and adjudicative resolution as well as
consensual resolution can be attempted. The final arbiter of legal technological
innovation is always acceptance by the courts. At the moment there is no useful
case law on this for smart contracts, but this would also depend strongly on
the nature of the smart contract, i.e. whether it is linked to a contract in nat-
ural language as well as other factors. In principle, based on Bitcoin case law
and the freedom to contract, it can be said that smart contracts are binding
[19, pp. 11–24].
With regard to a consensual resolution, a smart contract could specify a
committee of human or computational arbitrators that should be consulted first.
It is unclear at present how a court would interpret such a choice of law or
arbitration clause in a smart contract.
In principle smart contracts can be considered to be legally valid (exceptions
notwithstanding); to this end, it likely does not matter if the smart contract is
programmed using an imperative or a declarative language. Nevertheless, one
may argue that, as some imperative code (and, to a lesser extent, some proce-
dural code), may be difficult to comprehend, it may be the case that the control
structures of these smart contracts rebut jurists and hamper their interpretation
of the contract (this would lead to the emergence of case law setting precedent
on how to interpret smart contracts; however so far this does not exist). On
the contrary, as logic rules are meant to reflect contractual clauses, their logic
representation will ease the work of jurists, in particular to structure, evaluate,
and compare legal arguments constructed from formal statements. However, if
there are legal rules that a human has to be told to what he agrees to, there has
to be a natural language equivalent anyway. Then the logic rules might make the
implementation or the interpretation of the contract easier, but they may not
Logic-Based Smart Contracts in Blockchains
be close enough to natural language to be a substitute, particularly to people
who might not be technical experts.
In summary, the logic approach has the potential to advantageously com-
plement its procedural counterpart for each activity thereof. Whilst advantages
are clearly backed by technical considerations, it is less evident whether a logic
approach provides a stronger legal foundation to smart contracts. As previously
alluded to, one may argue that a full representation of a smart contract has to
explicitly establish and link the normative effects (rights, obligation, transfers
of entitlement) resulting from the contract, and the procedure for implementing
these rights and obligations though the computational actions performed by the
contract, in the given infrastructure. Thus, a hybrid approach combining logic
and procedural components may help to bridge the gap between smart contracts
and their legal counterparts.
5 Use of Logic-Based Smart Contracts with Blockchain
Systems
In this section, we investigate different technical options to use logic-based smart
contracts in combination with blockchain systems, and we will discuss these
options w.r.t. the legal activities we previously identified.
Given a set of statements, inferences can be performed in different manners.
Every inferential mechanism has its own characteristics, and the adoption of a
particular mechanism to execute logic contractual clauses should be based on
these characteristics.
Example 3. Considering a defeasible logic framework for the representation of
the contractual clauses; conclusions can be derived by using dialectic proofs
(DPs) [14] or an algorithm based on the fixed-point of the characteristic func-
tion of the grounded semantics [4] (FP), see e.g. [12], more efficient algorithms
stemming from Defeasible Logic (DL) [1,11] or even equation-based approaches
(EB), see e.g. [15] and neuro-symbolic systems (NS), see e.g. [3]. In most cases,
it is preferable to use the algorithm with the lowest computational complexity,
but for some reasons, one may prefer other algorithms to provide, for example,
more intelligible inferences. How to use these mechanisms to deal with smart
contracts in blockchain-based systems?
Beside the characteristics of the inferential mechanisms, it is important to
notice that inferences can occur on-chain or off-chain.
1. On-chain: inferences are made within the blockchain platform;
2. Off-chain: inferences are made outside the blockchain system, e.g. on a third
party server.
The distinction of on-chain and off-chain inferences leads us to distinguish off-
chain options for logic-based smart contracts and on-chain options.
F. Idelberger et al.
5.1 Off-Chain Options
When miners are processing transactions into blocks to append to the blockchain,
the security model of the virtual machine in which smart contracts on existing
blockchain platforms operate and the co-processing by nodes does not allow
to call outside resources. Thus, we must discard the option where an off-chain
inferential mechanism is called by the smart contract.
Though an off-chain inferential mechanism cannot be called from a smart
contract, another off-chain option simply consists in recording the smart con-
tract (i.e. knowledge base and the reference to the semantics) and the inferential
conclusions in the blockchain. On the basis of the inferential conclusions, proce-
dural code of the contract can then execute particular transactions. Activities
that we identified in the previous section are accommodated as follows.
Formation and negotiation. The contract can be formed and negotiated off-
chain or on-chain.
Contract storage/notarizing. A contract is stored off-chain (so that it can
be executed off-chain) and in the blockchain.
Enforcement and monitoring. Enforcement and monitoring are achieved off-
chain, the conclusions can be stored in the blockchain.
Modification. If a contract is modified, then the off-chain smart contract
will be updated, and stored in the blockchain. If the knowledge base can
be updated, then the smart contract can be updated without interrupting
associated processes.
Dispute resolution. One can check whether an off-chain contract matches a
blockchain code (bytecode). Thus in case of a dispute, the parties can check
whether the recorded conclusions are proper conclusions of the smart contract
(w.r.t. the given semantics).
The main advantage of this off-chain option is the lower cost of associated trans-
actions, since the inferences are performed off-chain. The disadvantage is that
such an off-chain inferential mechanism may be simply seen as an intermediary
service, while the parties may prefer to avoid such intermediation and associated
costs or trust issues.
5.2 On-Chain Options
Instead of an off-chain inferential mechanism, one may prefer an on-chain mech-
anism. The availability of a logic-based language to program smart contracts
shall facilitate such options, but a procedural language can also be used to write
meta-programs (i.e. programs with the ability to treat programs as their data).
For example, a rule-engine can be integrated in a smart contract to derive some
conclusions given a particular knowledge base. Based on the results, some pro-
cedural code can execute the transactions. The rule-engine can also be a smart
contract script of its own, so that smart contracts can always refer to this smart
contract. Having the inference engine as an immutable contract on the blockchain
Logic-Based Smart Contracts in Blockchains
Fig. 2. Off-chain option. Agents A and B form a (smart) contract which is stored on
a blockchain. The contract is executed in a server external to the blockchain system,
and transactions can be recorded in the blockchain.
allows participants’ confidence into the smart contract engine to increase over
time (test once, utilize n-fold).
Formation and negotiation. The contract can be formed and negotiated off-
chain or on-chain.
Contract storage/notarizing. A contract can be stored off-line, but it has to
be stored in the blokchain (so that it can be executed on-chain).
Enforcement and monitoring. Enforcement and monitoring is achieved on-
chain, the conclusions can be stored in the blockchain.
Modification. If the knowledge base can be updated, then the contract can be
updated without interrupting associated processes.
Dispute resolution. One can check whether an off-chain contract matches a
blockchain code. Thus in case of a dispute, the parties can check whether the
recorded conclusions are proper conclusions of the smart contract (w.r.t. the
given semantics).
The major advantages of on-chain solutions is that some off-chain intermediation
services are eliminated, and the inferential mechanisms (e.g. the rule engine) are
themselves recorded in the blockchain, resulting into more scrutinizable and
trustful inferences.
The main disadvantage of on-chain solutions may regard the costs. To address
the costs of on-chain inferences, algorithms with low computational complexity
shall be favoured. If the selected algorithm provides inferences which appears
sufficiently efficient but insufficiently intelligible for human operators, then more
intelligible inferences can be used to explain the results off-chain.
Example 4. Considering DPs, FP or DL algorithms for the on-chain option, DPs
have higher complexity than FP algorithms, which have higher complexity than
algorithms from DL [8]. Consequently, one shall prefer DL algorithms to derive
conclusions on-chain.
Interestingly, it is also possible to propose an on-chain option, that we may
call the ‘on-off’ option where, given a knowledge base, this knowledge is converted
(let’s say ‘compiled’) into a lower-level representation to increase the speed of
F. Idelberger et al.
Fig. 3. On-chain option. Here, agents A and B form a (smart) contract which is stored
and executed in a blockchain platform.
inferential computation, and this compiled code is part of the smart contract
(this smart contract is eventually recompiled to run on the virtual machines of
the blockchain network).
Formation and negotiation. The contract can be formed and negotiated off-
chain or on-chain. The compiled code can be generated off-chain or on-chain.
If compilation occurs off-chain then third party services may again appear,
along with the associated disadvantages. If compilation is done on-chain
then the compiler may be scrutinised and gain trust from the parties, at
the expense of extra costs for compilation.
Contract storage/notarizing. A contract and its compiled code can be stored
off-chain, but the compiled code has to be stored in the blockchain (so that
it can be executed on-chain).
Enforcement and monitoring. Enforcement and monitoring is achieved on-
chain, the conclusions can be stored in the blockchain.
Modification. If a contract is modified, then the logic statements have to be
recompiled. If the compiled knowledge base can be updated, then the contract
can be updated without interrupting associated processes.
Dispute resolution. One can check whether the compiled off-chain contract
matches a blockchain code. Thus in case of a dispute, the parties can check
whether the recorded conclusions are proper conclusions of the smart contract
(w.r.t. the given semantics).
Compared to the off-chain option, the need for intermediation services is miti-
gated since inferences are achieved on-chain. Compared to the on-chain option,
the costs of transactions may be decreased because the compiled knowledge base
is meant to lower the computational complexity. The costs will be presumably
higher than the off-chain option, therefore, such on-off approaches shall have a
cost intermediate between off-chain and on-chain solutions.
Example 5. EB and NS approaches can be considered for ‘on-off’ solutions. In
the EB approach, the considered knowledge base is ‘compiled’ into a set of
equations, and these equations are stored into the smart contract to compute
conclusions given a set of facts. In the NS approach, the knowledge base is
‘compiled’ into a neural network instead. While such approaches are interesting,
Logic-Based Smart Contracts in Blockchains
Fig. 4. On-off option. Agents A and B form a (smart) contract which is compiled. The
compiled contract is stored and executed in a blockchain platform.
they may be quite limited in terms of expressiveness; for example we know neither
EB nor NS approaches able to deal with temporal aspects for any defeasible rule-
based framework, whereas there are works introducing temporal extensions to
DL, see e.g. [9].
Whatever the option, and as previously mentioned, verification of the con-
clusions should be possible, and understandable by humans. In this regard, given
some semantics, the conclusions of efficient but unintelligible approaches can be
verified off-chain by more comprehensible proof systems.
Example 6. DPs clearly provide more intelligible proof systems for human oper-
ators w.r.t. other solutions. Hence, one may use efficient algorithms such as DL
algorithms for routine operations, and human operators can rely on DPs to verify
results if necessary.
So, if comprehensible proof systems are available for the considered logic-
based system, then the choice of the option to execute a logic-based smart con-
tract in combination with a blokchain system largely depends on the costs of
such execution. As revealing experiment, we compared the cost of the proce-
dural code (PC) for a modus ponens inference (from the premises ‘a’ and ‘if a
then b’, then we derive b) with a rule reduction as used in a reasonably efficient
algorithm for DL, and with an EB approach. The estimated cost for PC was
1480, 11859 for DL and 1418 for an EB approach.3For a simple modus ponens
inference, the reduction rule was thus approximately 8 times more costly than
the two other approaches. This result suggests that blockchain systems bring a
new important technical challenge which is hardly addressed by the community:
algorithms for a logic approach will not only be required to be efficient, but they
also are required to be cheap as measured within the environment where they
are deployed and according to its economic rules.
3This comparison was conducted by writing the basic solidity code for the requisite
modus ponens inference and then comparing the ‘gas’ cost as estimated by the official
solidity compiler.
F. Idelberger et al.
6 Conclusion
While procedural languages are commonly used to program smart contracts in
blockchain systems, logic-baed languages have been hardly explored. For this
reason, we investigated the utility and possible ways to use logic-based smart
contracts with such systems. We structured this investigation in light of a com-
mon contract lifecycle. We have shown that a logic approach can advantageously
complement its procedural counterpart w.r.t. the negotiation, formation, stor-
age/notarizing, enforcement, monitoring and activities related to dispute reso-
lution.
To show how logic-based smart contracts could be used, we inspected differ-
ent combinations for leveraging logic programming languages to operate smart
contracts with such blockchain systems, and we illustrated our discourse with
different algorithms from defeasible logic frameworks. This led us to emphasize
a fundamental challenge to fully take advantage of a combination of logic-based
smart contracts and blockchain systems: algorithms for logic-based approaches
have to be efficient and cheap as measured within the environment where they
are deployed and according to its economic rules, to ensure feasability in an envi-
ronment where economic governance and consensus is used to ensure a working
system and abuse prevention.
Finally, we have to emphasize that the logic and procedural approaches are
not incompatible, on the contrary, they have the potential to advantageously
complement each other. By providing a declarative specification of the content
of the contract, to be complemented with a procedural definition of the steps
needed to perform the obligations in the contract — either automatically or
through specification introduced by the parties — more clarity is established,
and a criterion is provided for matching automatic execution and shared inten-
tion of the parties, as expressed in the declarative specification.
Acknowledgements. NICTAis funded by the Australian Government through the
Dept of Communications and the Australian Research Council through the ICT Centre
for Excellence Program.
References
1. Antoniou, G., Billington, D., Governatori, G., Maher, M.J.: Representation results
for defeasible logic. ACM Trans. Comput. Log. 2(2), 255–287 (2001)
2. Athan, T., Governatori, G., Palmirani, M., Paschke, A., Wyner, A.: LegalRuleML:
design principles and foundations. In: Faber, W., Paschke, A. (eds.) Reasoning
Web 2015. LNCS, vol. 9203, pp. 151–188. Springer, Heidelberg (2015)
3. d’Avila Garcez, A.S., Gabbay, D.M., Lamb, L.C.: A neural cognitive model of
argumentation with application to legal inference and decision making. J. Appl.
Log. 12(2), 109–127 (2014)
4. Dung, P.M.: On the acceptability of arguments and its fundamental role in non-
monotonic reasoning, logic programming and n-person games. Artif. Intell. 77(2),
321–358 (1995)
Logic-Based Smart Contracts in Blockchains
5. Ethereum Foundation. Ethereum’s white paper
6. Governatori, G.: Representing business contracts in RuleML. Int. J. Coop. Inf.
Syst. 14(2–3), 181–216 (2005)
7. Governatori, G.: Thou shalt is not you will. In: Atkinson, K., (ed.) Proceedings
of the Fifteenth International Conference on Artificial Intelligence and Law, pp.
63–68. ACM, New York (2015)
8. Governatori, G., Pham, D.H.: DR-CONTRACT: an architecture for e-contracts in
defeasible logic. Inter. J. Bus. Process Integr. Manag. 5(3), 187–199 (2009)
9. Governatori, G., Rotolo, A., Riveret, R., Palmirani, M., Sartor, G.: Variants of
temporal defeasible logics for modelling norm modifications. In: Proceedings of
the 11th International Conference on Artificial Intelligence and Law, Stanford,
California, USA, pp. 155–159. ACM (2007)
10. Lam, H.-P., Governatori, G.: The making of SPINdle. In: Governatori, G.,
Hall, J., Paschke, A. (eds.) RuleML 2009. LNCS, vol. 5858, pp. 315–322. Springer,
Heidelberg (2009)
11. Maher, M.J.: Propositional defeasible logic has linear complexity. Theor. Pract.
Log. Program. 1(6), 691–711 (2001)
12. Modgil, S., Caminada, M.: Proof theories and algorithms for abstract argumen-
tation frameworks. In: Simari, G., Rahwan, I. (eds.) Argumentation in Artificial
Intelligence, pp. 105–129. Springer, Heidelberg (2009)
13. Nakamoto, S.: Bitcoin: A Peer-to-Peer Electronic Cash System (2008). (The
Nakamoto paper)
14. Prakken, H., Sartor, G.: A dialectical model of assessing conflicting arguments in
legal reasoning. Artif. Intell. Law 4(3–4), 331–368 (1996)
15. Riveret, R., Rotolo, A., Sartor, G.: Probabilistic rule-based argumentation for
norm-governed learning agents. Artif. Intell. Law 20(4), 383–420 (2012)
16. Sartor, G.: Legal Reasoning: A Cognitive Approach to the Law. Springer,
Heidelberg (2005)
17. Szabo, N.: The idea of smart contracts (1997)
18. Wood, G.: Ethereum: a secure decentralised generalised transaction ledger (2014)
19. Wright, A., De Filippi, P.: Decentralized Blockchain Technology and the Rise of
Lex Cryptographia. SSRN Scholarly Paper ID 2580664, Social Science Research
Network, Rochester, NY, March 2015
... The motivation was developed starting with the article "Evaluation of Logic-Based Smart Contracts for Blockchain Systems". [9] The main idea of the article is to promote the combination of logic frameworks into Blockchain systems in order to make easier to work with for co mmunication between customers and developers. A logic approach of programming smart contracts has technical advantages over procedural coding of the contracts by including inherently self verification of the smart contracts logic. ...
... An asset can have multiple owners, in this case the transaction with this asset must be signed by all of its owners in order to be valid. The process of signing the transaction is called "fulfillment" and requires the owner or creator of the asset to sign the data using Ed25519 public-key signature system [9]. The output of the transaction will contain the public key of the owner. ...
Conference Paper
Full-text available
With the increasing popularity and diversity of Blockchain systems, smart contracts were introduced as a necessity to automatically execute certain operation depending on the occurred events. The programming languages used in defining the triggering events and their consequent actions depends on the Blockchain implementation. In this article, we will investigate the advantages and suitable scenarios for using a formal approach in defining smart contracts. We will use a particular python implementation of a Blockchain and add the interface with a Prolog component for defining and querying smart contracts.
... The implementation of smart contracts on the blockchain gives the technology an added advantage and drives its widespread adoption (Idelberger et al., 2016). Smart contracts are programmes that are stored on the blockchain and run when predefined conditions are met (Hu et al., 2021). ...
Article
Full-text available
Rapid population growth and urbanisation have accelerated waste generation, and effective waste management has become a major challenge worldwide. With advances in technology and management methods, waste management strategies have begun embracing digitalisation, leveraging the Internet of Things (IoT), big data analytics, cloud/edge computing, machine learning, 5G communication, and blockchain technologies. Amongst them, the blockchain technology has the structural features of achieving information security and integrity without central guarantees. Blockchain also meets the data record/storage needs of waste management and the design of new mechanisms for effective waste management. These benefits make blockchain an attractive technology in the field of waste management, with researchers and practitioners alike investigating its broad applications to support sustainable waste management. However, this emerging technology has not yet been widely accepted by potential users. To further champion the application of blockchain technology, this review paper provides a systematic overview of the various pathways in which the technology has been applied in the waste management industry and further discusses its related challenges and opportunities via considering the promising prospect of combining blockchain technology with IoT, artificial intelligence (AI) and life cycle assessment (LCA). This review also provides insights for interpreting some emerging applications of blockchain in the field of waste management and clarifying the research paths in the context of blockchain, digitalised waste management, and circular economy.
... dimana pemanfaatan teknologi blockchain lebih luas dengan memanfaatkan revolusi mekanisme baru yang disebut dengan smart contract. Smart contract merupakan suatu kontrak yang dibangun dengan tujuan khusus guna mengeksekusi serangkaian instruksi lengkap pada blockchain [26]. Smart contract merupakan program komputer yang berisi persetujuan kontrak antar entitas, yang dibangkitkan oleh pengguna dan diekstrak oleh lingkungannya (blockchain). ...
Technical Report
Full-text available
Sekolah merupakan lembaga formal pendidikan dimana didalamnya mencakup interaksi antara guru, siswa, tenaga administrasi serta sistem dan prosedur yang terdapat dalam lingkungannya. Mekanisme monitoring dan evaluasi pembelajaran diwujudkan dalam bentuk pencatatan hasil belajar siswa berupa nilai maupun kompetensi yang dimilikinya. Saat ini mekanisme pencatatan nilai hingga pembuatan rapor siswa masih dilakukan dengan secara konvesional sehingga biasanya berjalan lambat karena kurangnya integrasi data pada lingkungan sekolah tesebut. Di samping itu, keamanan data nilai perlu ditingkatkan guna menjamin keaslian dari data-data hasil pendidikan tersebut. Teknologi blockchain menawarkan suatu solusi sistem dan teknologi dimana data dimungkinkan untuk dapat terintegrasi dengan baik. Hal ini disebabkan blockchain memiliki kemampuan mengelola data secara lebih transparan, terpercaya dan dapat ditelusuri.. Blockchain adalah ledger besar yang terdesentralisasi dan terdistribusi yang menyimpan catatan transaksi digital sedemikian rupa sehingga membuatnya dapat diakses dan terlihat oleh banyak anggota dalam jaringan dan terjaga keamanannya. Karena blockchain adalah basis data terdesentralisasi, tidak ada yang mengatur atau memilikinya, dan setelah data diunggah ke blockchain, data tersebut tidak dapat diubah sehingga data tidak dapat dirusak atau dipalsukan. Sistem informasi yang dikombinasikan dengan teknologi blockchain, maka sistem akan memiliki kemampuan untuk membangun kepercayaan (trust) antara semua pelaku dalam kegiatan akademik sekolah dengan sifatnya yang transparan, mampu untuk mengurangi biaya dan kompleksitas pengembangan sistem, memiliki kemampuan penyimpanan data yang dapa t diandalkan, terpercaya dan tidak dapat dimanipulasi oleh siapapun di dalam atau di luar sistem, juga memiliki kemampuan meng-otomatisasi proses inti dalam sistem dengan mekanisme smart contract yang dimilikinya, serta memiliki kemampuan meningkatkan kecepatan ketertelusuran data yang bersifat real time. Metode yang digunakan dalam penelitian ini adalah menggunakan pendekatan Design Science Research, dimana bagian yang akan digunakan ada tahap1,2,dan tahap 3. Tahapan tersebut nantinya akan dikolaborasi dengan model pengambangan sistem As-Is dan To-Be guna mendapatkan requirements engineering sistem, serta pendekatan Software Development Life Cycle (SDLC), guna mendesain arsitektur sistem pencatatan data akademik sekolah berbasis blockchain. Pada penelitian ini teknologi blockchain diharapkan dapat menjadi suatu mekanisme pencatatan data-data hasil pembelajaran (akademik) yang dilakukan pada lingkungan sekolah dengan lebih aman, sulit untuk dimodifikasi, dapat ditelusuri oleh semua pihak sehingga mampu menjamin keaslian data-data akademik tersebut dan dapat diakui oleh semua pihak didalamnya maupun yang membutuhkan data-data tersebut. Sehingga tujuan dari penelitian ini adalah 1) melakukan analisis as is dan to be sistem pencatatan data akademik sekolah berbasis blockchain, yang merujuk pada TKT Level 1. 2) Mendesain model sistem pencatatan data akademik sekolah berbasis blockchain, yang merujuk pada TKT Level 2. Sementara itu, luaran yang ditargetkan pada penelitian ini adalah artikel ilmiah pada jurnal terkareditasi nasional.
... In addition, the authors identified and analyzed the diverse use cases of smart contracts with the interest of utilizing smart contracts in blockchain in several domains. Different algorithms are illustrated related to the use of logic in smart contracts with blockchain systems [17]. In healthcare management, several existing in previous research work and applications studied for the healthcare domain using the blockchain approach [18]. ...
Article
Full-text available
This study focuses on the load balancing of the transactions in the blockchain. The problem is how to assign these transactions to the blocks. The objective is to guarantee a load balancing of the workload in the time of blocks. The proposed problem is an NP-hard one. To face the hardness of the studied problem, the challenge is to develop algorithms that solve the problem approximately. Finding an approximate solution is a real challenge. In this paper, nine algorithms are proposed. These algorithms are based on the dispatching-rules method, randomization approach, clustering algorithms, and iterative method. The proposed algorithms return approximate solutions in a remarkable time. In addition, in this paper, a novel architecture composed of blocks is proposed. This architecture adds the component "Balancer". This component is responsible to call the best-proposed algorithm and solve the scheduling problem in a polynomial time. In addition, the proposed work helps users to solve the problem of big data concurrency. These algorithms are coded and compared. The performance of these algorithms is tested over three classes of instances. These classes are generated based on uniform distribution. The total number of instances tested is 1350. The average gap, execution time, and the percentage of the best-reached value are used as metrics to measure the performance of the proposed algorithms. Experimental results show the performance of these algorithms and a comparison between them is discussed. The experimental results show that the best algorithm is best-mi-transactions iterative multi-choice with 93.9% in an average running time of 0.003 s.
... When the advantages of blockchain technologies are compared to the significant issues and flaws of smart city information systems, it is possible to conclude that blockchain systems are the best option for smart city information systems (Idelberger, 2016). This, however, may not be accurate and relevant in all cases, much less universally. ...
Article
The authors of this article researched the implementation of blockchain technologies in smart cities. The research is divided into 3 parts: identification of best application areas, critical success factors, and implementation performance indicators. The goal of this paper is to present findings on the performance indicators and offer additional insight into their nature as well as point to lesser-known performance indicators of blockchain projects. Following the Delphi technique, a panel of 33 experts was presented with a list of performance indicators and asked to add additional performance indicators as well as to assess their importance. The research foundation was based on the literature review which resulted in 9 performance indicators for the blockchain project implementation in smart cities. The experts proposed 8 additional performance indicators; however, only 1 of them had required consensus to be accepted by the panel. This paper will disclose both groups of performance indicators and preserve them for further scientific discussion since the performance indicators that were proposed by the individual experts but did not reach panel consensus won’t be contained in the further research results. After all rounds of the Delphi method were finished the experts concluded the list of the performance indicators for the implementation of blockchain projects in the smart city. The findings presented in this paper can be further used to improve the efficiency of blockchain projects.
... Tujuan dari smart contract adalah untuk efisiensi, keamanan dan independensi dalam perjanjian, mengurangi biaya implementasi kontrak dan meningkatkan kepercayaan antar entitas [20]. Kontrak sebagai mekanisme yang melibatkan aset digital dan dua atau lebih pihak, di mana beberapa atau semua pihak memasukkan aset dan aset secara otomatis didistribusikan kembali di antara para pengguna sesuai dengan formula dan pada data tertentu yang tidak diketahui pada saat kontrak dimulai [21]. ...
Research Proposal
Sekolah merupakan lembaga formal pendidikan dimana didalamnya mencakup interaksi antara guru, siswa, tenaga administrasi serta sistem dan prosedur yang terdapat dalam lingkungannya. Mekanisme monitoring dan evaluasi pembejaran diwujudkan dalam bentuk pencatatan hasil belajar siswa berupa nilai maupun kompetensi yang dimilikinya. Saat ini mekanisme pencatatan nilai hingga pembuatan rapor siswa masih dilakukan dengan secara konvesional sehingga biasanya berjalan lambat karena kurangnya integrasi data pada lingkungan sekolah tesebut. Disamping itu, keamanan data nilai perlu ditingkatkan guna menjamin keaslian dari data-data hasil pendidikan tersebut. Teknologi blockchain menawarkan suatu solusi sistem dan teknologi dimana data dimungkinkan untuk dapat terintegrasi dengan baik. Hal ini disebabkan blockchain memiliki kemampuan mengelola data secara lebih transparan, terpercaya dan dapat ditelusuri.. Blockchain adalah ledger besar yang terdesentralisasi dan terdistribusi yang menyimpan catatan transaksi digital sedemikian rupa sehingga membuatnya dapat diakses dan terlihat oleh banyak anggota dalam jaringan dan terjaga keamanannya. Karena blockchain adalah basis data terdesentralisasi, tidak ada yang mengatur atau memilikinya, dan setelah data diunggah ke blockchain, data tersebut tidak dapat diubah sehingga data tidak dapat dirusak atau dipalsukan. Sistem informasi yang dikombinasikan dengan teknologi blockchain, maka sistem akan memiliki kemampuan untuk membangun kepercayaan (trust) antara semua pelaku dalam kegiatan akademik sekolah dengan sifatnya yang transparan, mampu untuk mengurangi biaya dan kompleksitas pengembangan sistem, memiliki kemampuan penyimpanan data yang dapa t diandalkan, terpercaya dan tidak dapat dimanipulasi oleh siapapun di dalam atau di luar sistem, juga memiliki kemampuan meng-otomatisasi proses inti dalam sistem dengan mekanisme smart contract yang dimilikinya, serta memiliki kemampuan meningkatkan kecepatan ketertelusuran data yang bersifat real time. Metode yang digunakan dalam peleitian ini adalah menggunakan pendekatan Design Science Research, dimana bagian yang akan digunakan ada tahap1,2,dan tahap 3. Tahapan tersebut nantinya akan dikolaborasi dengan model pengambangan sistem As-Is dan To-Be guna mendapatkan requirements engineering sistem, serta pendekatan Software Development Life Cycle (SDLC), guna mendesain arsitektur sistem pencatatan data akademik sekolah berbasis blockchain. Pada penelitian ini teknologi blockchain diharapkan dapat menjadi suatu mekanisme pencatatan data-data hasil pembelajaran (akademik) yang dilakukan pada lingkungan sekolah dengan lebih aman, sulit untuk dimodifikasi, dapat ditelusuri oleh semua pihak sehingga mampu menjamin keaslian data-data akademik tersebut dan dapat diakui oleh semua pihak didalamnya maupun yang membutuhkan data-data tersebut.
Article
A rising number of educational solutions based on blockchain technology have been designed. Students and other authorities responsible for verifying certificates are very concerned about the authenticity of academic credentials, either because the institutions that issue them no longer exist or because they do not keep adequate records. Blockchain technology has much to offer in education, including its high level of security, improved data access control, low cost, improved accountability, identity authentication, transparency, increased trust, and improved efficiency in managing student records. We proposed a decentralized blockchain‐based secure platform for the storage of academic certificates and student assessments with double encryption. Apart from speeding up the verification process, it will increase the safety of personal education data and assessments of all kinds of misuse. The data would only be accessed using a stakeholder's private key, and storing documents on a blockchain would increase security. We proposed a framework to offer a secure channel for educational resources. We are storing documents over blockchain utilizing an IPFS distributed data server. We give a thorough explanation of the system development, design, and evaluation of the suggested solution in terms of security and cost. Finally, we put the proposed framework to the test by deploying a smart contract prototype on the Ethereum TESTNET network in a Windows environment. The study's findings revealed that the proposed method is effective and feasible.
Article
In the paper, Diem Distributed Ledger Technology (DLT) and Aptos blockchain data are examined. First, the paper presents a general overview of the Diem project from a technical point of view. Second, it presents a study that aims to collect and analyze data from the Diem and Aptos blockchain, in order to verify some properties declared in the technical paper. For instance, a relevant property of the Diem and Aptos blockchains is their transactions' throughput, i.e. the rate at which valid transactions are committed into a block by the Diem blockchain in a one-second interval of time (transactions per second, TPS) and the interval of time for a transaction to be confirmed. In the case of the Diem blockchain, the data were collected over three months (January 1–March 31, 2022) while in the case of the Aptos blockchain, the data were collected over a month (December 1 - December 31, 2022). These data can be found on a GitHub repository that is publicly accessible. The results of the data analysis show that the average transactions' throughput is about 60 TPS and the waiting time is on average 1 minute and 40 seconds. Moreover, the paper sheds light on some Diem features that are unique when compared to similar blockchains, such as Ethereum. Some of these unique features are the consensus mechanism based on the BFT consensus protocols (Byzantine Fault Tolerance, 2017), its accounting system based on a hierarchical model and its programming language, Move, used to code smart contracts. Through this study, the capabilities of both Diem and Aptos blockchains will be explored in more depth.
Article
Full-text available
The smart contracts phenomenon arises as a new step in electronic contracts. This work researches the semantic complexities of drafting legal agreements in increasingly digitalized environments. The article aims to identify theoretical limits incorporating programming language in drafting agreements by studying the level of rationality in contractual terms and legal reasoning. The language of code is highly rational, but the pervasiveness of rationality within the legal language may vary according to what contract´s categories and legal reasoning are being adhered to.
Conference Paper
Full-text available
This tutorial presents the principles of the OASIS LegalRuleML applied to the legal domain and discusses why, how, and when LegalRuleML is well-suited for modelling norms. To provide a framework of reference, we present a comprehensive list of requirements for devising rule interchange languages that capture the peculiarities of legal rule modelling in support of legal reasoning. The tutorial comprises syntactic, semantic, and pragmatic foundations, a LegalRuleML primer, as well as use case examples from the legal domain.
Conference Paper
Full-text available
In this paper we discuss some reasons why temporal logic might not be suitable to model real life norms. To show this, we present a novel deontic logic contrary-to-duty/derived permission paradox based on the interaction of obligations, permissions and contrary-to-duty obligations. The paradox is inspired by real life norms.
Article
Full-text available
Formal models of argumentation have been investigated in several areas, from multi-agent systems and artificial intelligence (AI) to decision making, philosophy and law. In artificial intelligence, logic-based models have been the standard for the representation of argumentative reasoning. More recently, the standard logic-based models have been shown equivalent to standard connectionist models. This has created a new line of research where (i) neural networks can be used as a parallel computational model for argumentation and (ii) neural networks can be used to combine argumentation, quantitative reasoning and statistical learning. At the same time, non-standard logic models of argumentation started to emerge. In this paper, we propose a connectionist cognitive model of argumentation that accounts for both standard and non-standard forms of argumentation. The model is shown to be an adequate framework for dealing with standard and non-standard argumentation, including joint-attacks, argument support, ordered attacks, disjunctive attacks, meta-level attacks, self-defeating attacks, argument accrual and uncertainty. We show that the neural cognitive approach offers an adequate way of modelling all of these different aspects of argumentation. We have applied the framework to the modelling of a public prosecution charging decision as part of a real legal decision making case study containing many of the above aspects of argumentation. The results show that the model can be a useful tool in the analysis of legal decision making, including the analysis of what-if questions and the analysis of alternative conclusions. The approach opens up two new perspectives in the short-term: the use of neural networks for computing prevailing arguments efficiently through the propagation in parallel of neuronal activations, and the use of the same networks to evolve the structure of the argumentation network through learning (e.g. to learn the strength of arguments from data).
Article
Full-text available
Inspired by legal reasoning, this paper presents a formal framework for assessing conflicting arguments. Its use is illustrated with applications to realistic legal examples, and the potential for implementation is discussed. The framework has the form of a logical system for defeasible argumentation. Its language, which is of a logic-programming-like nature, has both weak and explicit negation, and conflicts between arguments are decided with the help of priorities on the rules. An important feature of the system is that these priorities are not fixed, but are themselves defeasibly derived as conclusions within the system. Thus debates on the choice between conflicting arguments can also be modelled. The proof theory of the system is stated in dialectical style, where a proof takes the form of a dialogue between a proponent and an opponent of an argument. An argument is shown to be justified if the proponent can make the opponent run out of moves in whatever way the opponent attacks. Despite this dialectical form, the system reflects a ‘declarative’, or ‘relational’ approach to modelling legal argument. A basic assumption of this paper is that this approach complements two other lines of research in AI and Law, investigations of precedent-based reasoning and the development of ‘procedural’, or ‘dialectical’ models of legal argument.
Article
This paper proposes an approach to investigate norm-governed learning agents which combines a logic-based formalism with an equation-based counterpart. This dual formalism enables us to describe the reasoning of such agents and their interactions using argumentation, and, at the same time, to capture systemic features using equations. The approach is applied to norm emergence and internalisation in systems of learning agents. The logical formalism is rooted into a probabilistic defeasible logic instantiating Dung’s argumentation framework. Rules of this logic are attached with probabilities to describe the agents’ minds and behaviours as well as uncertain environments. Then, the equation-based model for reinforcement learning, defined over this probability distribution, allows agents to adapt to their environment and self-organise.
Article
A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.
Chapter
Previous chapters have focussed on abstract argumentation frameworks and properties of sets of arguments defined under various extension-based semantics. The main focus of this chapter is on more procedural, proof-theoretic and algorithmic aspects of argumentation. In particular, Chapter 11 describes properties of extensions of a Dung argumentation framework.
Article
The purpose of this paper is to study the fundamental mechanism, humans use in argumentation, and to explore ways to implement this mechanism on computers.We do so by first developing a theory for argumentation whose central notion is the acceptability of arguments. Then we argue for the “correctness” or “appropriateness” of our theory with two strong arguments. The first one shows that most of the major approaches to nonmonotonic reasoning in AI and logic programming are special forms of our theory of argumentation. The second argument illustrates how our theory can be used to investigate the logical structure of many practical problems. This argument is based on a result showing that our theory captures naturally the solutions of the theory of n-person games and of the well-known stable marriage problem.By showing that argumentation can be viewed as a special form of logic programming with negation as failure, we introduce a general logic-programming-based method for generating meta-interpreters for argumentation systems, a method very much similar to the compiler-compiler idea in conventional programming.