Publications

Smart contracts – what is it and how it works?

⟨⟨ Back

Blockchain technology is much more than cryptocurrencies. It is commonly used for smart contracts, which allow transactions to be automated while maintaining a high level of security. How do blockchain-based contracts work and what is worth knowing about them?

What exactly is blockchain?

In order to understand the idea behind smart contracts, it is first necessary to briefly recall the general principles governing blockchain technology. In simple terms, it can be said that blockchain allows the creation of a ‘ledger’, i.e. a list of transactions arranged chronologically and in a decentralised manner, as any user of a given network has access to his or her copy and can verify each transaction from the very beginning of the asset’s existence.

Thanks to blockchain technology, it is possible to carry out successive transactions (e.g. the sale of a cryptocurrency) with the possibility of its authorisation and verification of all previous trading steps. Each transaction on the blockchain receives its hash, or unique identifier. This makes it impossible to modify the sequence of entries in this ‘ledger’ from the outside. The execution of a subsequent transaction causes all subsequent blocks to change. An attempt to carry out an unauthorised operation will result in a denial of transaction authorisation.

Of course, the hash is not the only protection of the blockchain. Algorithms have their own cryptographic safeguards to protect against third-party access. Today, blockchain technology is being used in many areas of business, including as:

  • payment and lending services without intermediaries;
  • currency exchange platforms;
  • identity verification confirmation.

One of the applications of blockchain is also smart contracts, whose execution principle and outcome are deceptively similar to a regular contract.

What are smart contracts based on?

It is the feature of permanency and irreversibility of records in individual blocks that is currently driving the use of blockchain as a means of contracting between parties. From the user’s point of view, smart contract platforms are simply applications based on If – Then (conditional instructions). These cause the programme to automatically execute the assumed sequence of instructions when the assumed conditions are met. Let’s look at this mechanism using a concrete example.

A food supplier tags individual consignments with RFID tags (small sensors used, among other things, for equipment inventory). When the carrier delivers the cargo to the ordering party’s premises, the entry gate reads the information contained in the tags, at the same time triggering a smart contract that authorises the transfer to the designated bank account. Quick, simple and without the action of an accountant.

Another example? In online marketing, the remuneration of a marketing agency is often linked to the success of a particular campaign, e.g. acquiring one million views of a particular ad. Smart contracts automatically monitor the effectiveness of advertising activities and calculate and pay the appropriate remuneration.

Of course, examples of smart contracts can be multiplied, but the general principle is always the same – if event X (performance of one party) has occurred, perform Y (performance of the other party). Such a construction resembles the solutions used in civil law contracts, with the difference that instead of writing down the terms of cooperation on paper, the parties decide to put them in the form of a computer algorithm.

Of course, the concepts of contract and smart contract cannot simply be equated. Smart contracts are scripts that automate the execution of coded tasks through conditional constructs, functions, importing data from other sources and a whole host of other, computerised solutions. However, they do not contain legal language that can be interpreted.

In practice, different models of smart contracts can be encountered. Some exist exclusively in the virtual space, others have a hybrid structure and complement contractual provisions written on paper.

Where are smart contracts being used?

Smart contracts are used in many areas of life. They can be found:

  • in FinTech and banking – automation of documentation workflows and data verification, the basis for decentralised finance;
  • in healthcare – handling patient data, guaranteeing the safety of medicines, facilitating payment for medical consultations;
  • in logistics chain management – management of goods, tracking of transported cargo from production to delivery to the final recipient;
  • in insurance – simplifying the claims process, guaranteeing timely payments from policies;
  • in the real estate sector – speeding up the process of buying property by eliminating paperwork, traceability and no title disputes;
  • in digital identity management – rapid verification of access rights to data, flexible data access system making access conditional;
  • in intellectual property protection – verification of the right to a specific intellectual property asset, e.g. a trademark, automated royalty payments and licensing;
  • in gaming and NFT – the ability to combine electronic entertainment with real-world rewards, streamlining the process of making, selling and acquiring NFTs;
  • in e-commerce – automating deliveries, payments and returns with full transparency;
  • in human resources management – simplifying the process of paying and insuring employees, and stramlining recruitment through easier access to and acceptance of offers.

What are the advantages of smart contracts?

The main advantage of smart contracts is the ability to eliminate the intermediary in the execution of the contract and to completely automate the collaboration process. As a result, the execution of contracts is faster, as data circulates automatically in a virtual reality. There is no need to send documentation or wait for a specific institution to take action. Contracts can be concluded by entities that will never meet each other, and no court, bailiff or any form of state coercion is needed to enforce the contract. It can be said that smart contracts are a form of consent and a manifestation of ,’mutual trust’ between the parties to the contract.

Another advantage of this solution is precision. The computer programme operates on the basis of coded instructions. There is therefore no possibility of human error and, for example, incorrect batch counting or mistakes in the transfer of remuneration.

Smart contracts provide security through decentralisation. As long as the blockchain exists, the entire transaction and its terms can be reconstructed. At the same time, changing them through computer viruses or other malware is difficult, as the terms of the contract are public to all parties.
Finally, the literature draws attention to the stability and immutability of smart contracts. Algorithm-linked benefits are implemented fully automatically. This makes the cooperation more secure and reduces the risk of litigation.

Do smart contracts have disadvantages?

Although smart contracts are constantly evolving, it is not an ideal solution. What is worth bearing in mind when deciding on this form of cooperation with a contractor?

First and foremost, once a contract is defined, it cannot be modified. This is a feature of blockchain technology, which at the same time determines its stability. When the parameters of a contract are defined incorrectly, it may be more difficult to get out of the situation than in the case of a regular contract.

It should also be borne in mind that the source code of the application is created by developers, who usually have no knowledge of the law. Therefore, it is advisable to consult the wording of the contract with a lawyer before signing a smart contract. Otherwise, it is easy to run the risk of misattributing individual values and leading to a situation where the contract becomes problematic.

One other issue worth considering may be the high cost of using smart contracts Many contracts operate in the realm of the Ethereum network, so the costs associated with setting up a contract must take into account, among other things:

  • the current cost of the currency;
  • the size of the contract (expressed in bytes);
  • the current price of the ‘gas’, i.e. the payment due for the computing resource.

Finally, it also cannot be ruled out that there will be loopholes (placed in the source code intentionally or completely by accident) that make it possible to execute the contract despite not fulfilling the conditions listed therein, or to execute it in an incorrect manner.

Who is liable for errors in smart contracts?

Smart contracts raise a number of procedural questions. One contentious issue is the jurisdiction applicable to the contract. Many such contracts cover multiple countries simultaneously. Can the parties then invoke the closest connection clause from private international law? There is currently no consistent answer to such a question.

Nor has a unified concept of liability for errors in smart contracts been developed. Some representatives of the doctrine make liability dependent on how the blockchain was made available (paid or unpaid). Another idea might be to hold the entrepreneur liable on a strict liability basis for software errors. Then the basis for liability would be Article 474 of the Civil Code. In theory, a distinction can be made between private blockchains (including consumer and entrepreneur-related blockchains) and public blockchains, which also translates into the degree of professionalism and expectations of the blockchain participant.

Are smart contracts regulated by law?

As of today, smart contracts in the Polish legal system have not received either a legal definition or formalised regulation. For this reason, particular caution should be exercised when designing and using such solutions.

In some countries, such as the United States, smart contracts have been regulated in some states (e.g. Arizona and Tennessee). At the federal level, the E-Sign Act and the UETA apply to them. However, the current state of the law still does not resolve all issues, such as the status of the consumer in smart contracts or the question of making an offer and accepting it. In contrast, the legislation of the UK and Wales has been considered sufficient to deal with the new challenges.

Linke Kulicki Law Firm has been actively assisting entities operating in the new technology sector for years and new technology law is one of our key specialisations. Our specialists support software houses in creating safe and effective algorithms from the legal side. With the help of professionals, smart contracts become safe for both parties to the agreement.