What are Smart Contracts?

Precium will use this blog to introduce its hybrid blockchain currently under development, the “Onyx Chain”, and share a variety of information related to it. We aim to clear up any misconceptions or misinformation about blockchain that many readers may have encountered. Ultimately, our goal is to contribute to the development of the blockchain industry.

A smart contract, one of the main features of blockchain, is a contract that is automatically executed when the contract’s terms are met. Smart contracts come in various forms and can be thought of as digitized contracts. Traditional paper contracts are vulnerable to exploitation, such as by damaging the contract or making illegal modifications to lower the transparency of the actual contractual relationship. Direct human intervention is also needed to execute the contract. On the other hand, smart contracts, which use blockchain technology, are uploaded onto the blockchain immediately after they are coded and distributed to the members of that blockchain (previous post). Therefore, once created, the contract terms and content cannot be modified, and there is no risk of it being damaged. Moreover, there is no need for direct human intervention to execute the contract as the code is designed to automatically execute the contract once the terms are met.

Bitcoin, a representative blockchain, does not support smart contracts. Bitcoin provides a Turing-incomplete language to prevent attacks against the chain, making it difficult to use script to express transactions beyond simple remittances. This is because the expression of loops or complex logic is restricted. The Ethereum blockchain, which introduced smart contracts, was developed to overcome bitcoin’s structural limitations. By using commissions to prevent unlimited repetitions of code, Ethereum enables the use of loops in the script. With this simple solution, Ethereum goes beyond simple monetary features to enable smart contract creation and distributed application (DApp) development and distribution using the contracts. This is supported by the explosive growth of the number of DApps built on Ethereum’s smart contracts over the last one or two years.

Let’s look at a simple example to understand the effectiveness of smart contracts.

Online Store A is planning a special event to show gratitude to its customers. Customers log in on the website and click a [Participate in Event] button for a chance to win 1 million points that can be used in Online Store A based on a predetermined random participation number.

These types of events are often run by traditional online stores. However, there are many issues of trust regarding the event winner, the most typical being that the winner is already fixed and the event is only made to seem normal on the surface. How would this event look if run through a blockchain smart contract?

Since anyone can verify the code of a public blockchain smart contract, the event’s transparency can be checked. In addition, the customer with the winning participation number can receive the prize immediately through the automated smart contract.

As shown in the figure above, to participate in the event, the customers send messages through the smart contract. The smart contract checks the participation number of the message and sends the prize to the participant who sent the message if their number matches the winning number. It should be noted that this entire process can be executed by creating just one smart contract.

In addition to the above example, various types of traditional contracts can be easily and safely replaced based on how the terms of the smart contract were composed. Moreover, the role of the contract mediator used in traditional contracts is eliminated, thereby reducing cost. As a result, existing contracts can be recreated on blockchains and have their terms automatically checked. They also provide the benefit of simple and safe automatic contract execution once the terms are met.

However, there are high barriers to entry to lower to use smart contract in real life. On current platforms, people must directly code the smart contract to use their preferred terms; in practice, this is nearly impossible. With the Precium platform, we plan to provide users with templates of numerous smart contract terms. This will allow Precium platform users to create smart contracts just by selecting and combining their preferred contract terms. The platform then provides the completed smart contract with the combined code of each selected contract term template. Thus, users are able to can use smart contracts to perform P2P transactions with their preferred party without any programming. Precium lowers the barrier to entry of smart contracts with this process. We will continue our efforts to build a healthy smart contract ecosystem that can be applied in real life.

The next post will introduce types and roles of blockchains and discuss the direction of Precium’s Onyx Chain.