0%

What are smart contracts?

2023년 2월 4일 8 분 읽기
뉴스 기사 배너 이미지

In 1996, Szabo laid out his vision for a digital marketplace that could function in a trustless manner, one that was able to incorporate advanced contract law with digital commerce. This is where we get the ethos of trustlessness and freedom from intermediaries that is a hallmark of Web3 technology today.

And this proposal set the framework for Vitalik Buterin’s Ethereum whitepaper, which outlines a smart contract system that is an improvement upon the Bitcoin protocol. What Buterin understood was that the applications of a system that can transfer value without one party needing to trust the other went far beyond that of Bitcoin. This could be in any area that involves contractual agreements, such as within supply chains, payment processing, or real estate transfers of ownership.

A smart contract can be defined as a computer program that can execute a agreement. The record of its actions and existence are recorded on a blockchain, making it permanent, immutable and transparent. This is especially useful for contracts in a trustless system as it means that they cannot be tampered with and are easily traceable. In terms of function, one can consider smart contracts to execute “if/when…then…” code. That is, if ‘x’ parameters are satisfied, then ‘y’ happens. You can see that this is quite rudimentary, but as the space matures and more assets appear on-chain, applications will advance as well.

TL;DR

Smart contracts allow people to enter agreements trustlessly and without intermediaries. They are computer programs that execute contracts based on pre-defined parameters and are stored on the blockchain. Because of their immutable and permanent nature, they are especially useful in executing the transfer of assets.

How do smart contracts work?

In considering how smart contracts work, it’s important to remember that they are essentially programs that execute actions when preconditions are met. Similar to how a notary is used to witness the signing of, verify the identities within, and help facilitate the execution of a physical contract between parties, a smart contract performs a similar function with code. That is, it contains a digital contract and two public keys that represent the user and the smart contract.

The workflow of a smart contract

First, the smart contract is created by a developer and its terms are encoded in computer code. The code is then uploaded onto a blockchain. Next, the smart contract is deployed to the decentralized network, where it becomes publicly accessible and its code is stored on the network’s nodes. Here, a trigger event, such as the receipt of a payment or the fulfillment of a specific action, occurs, activating the smart contract. This is done by an EOA, or externally owned account.

After this, the contract automatically executes its terms, which may involve the transfer of ownership or assets, the release of funds, or other actions as defined in the contract’s code. Of course, if preconditions are not met, then the code will return an error, and the smart contract will not execute. After execution, the decentralized network’s nodes validate the execution of the contract, ensuring that the contract’s terms have been executed as intended. This validation happens throughout the network and is done so with redundancy through use of a consensus mechanism to bring trust and security to the process.

And after all of this, the outcome of the contract’s execution is recorded on the decentralized network and is publicly accessible for anyone to verify, which is the transparent part of all this.

The smart contract has now completed its execution and the terms of the agreement have been automatically fulfilled, reducing the need for intermediaries and increasing the security and transparency of the transaction.

Can one change a smart contract?

One very crucial attribute of a smart contract is its immutability due its storage on a blockchain. Through use of a secure and strong consensus mechanism, a smart contract is permanent and cannot be changed.

This feature gets a little more complex when a contract has a deletion function built into it. As with other parameters that it abides by, if the parameters for deletion are met, a smart contract can “self-destruct”. It is important to remember here, though, that this function has to be coded in before deployment on the blockchain. Because adding a deletion function afterwards would constitute a change to the smart contract itself, which is not possible.

Features of smart contracts

There are some very crucial attributes that grant the power that smart contracts contain, and the public interest that they have cultivated. Let’s go over some of them:

Security and immutability: A paramount theme of blockchain tech, and certainly a talking point of the past couple of years, is security. With hacks and exploits abound, both in Web2 and Web3, knowing that one’s assets are secure is of the utmost importance for adoption. Smart contracts excel in their security because it is code, not humans, that execute these contracts, meaning no human error. Not only this, but because they are stored on distributed networks, their legitimacy is trustless and their record is unchangeable (also referred to as immutable).

Efficiency: To get a sense for a smart contract’s efficiency at scale, let’s take the example of a supply chain problem. Currently, when goods arrive at a warehouse, it is up to a human-run system to make sure that approvals are gathered and that payment is sent to the seller of said goods. With a smart contract, these sorts of approvals are sent for by the program and payment is executed automatically, cutting down on time, stress, and strain. This could aid in times when a supply chain would otherwise be strained to the point of disruption. Disruption that can, in turn, cause prices of the affected goods to increase, putting economic pressure on the consumer.

Transparency: Smart contracts are stored on the blockchain, which is a public ledger. Thus, they can be audited as they’re completely transparent.

Use cases

Smart contracts are customizable, and are thusly able to cater to a host of different applications in the real world. From GameFi to decentralized exchanges to the verification of NFT ownership, smart contracts are the linchpin of many of the exciting applications that we see popping seemingly every day in the world of Web3. Let’s take a look at two of the main ones- finance and decentralized applications:

Finance

Many banking services that we know and use today are able to be decentralized and made without intermediaries. DeFi platforms like Uniswap and Curve utilize such smart contracts to offer such financial services. This is an example of what is so exciting about smart contract technology. The financial services of today that may be prohibitive for one reason or another, especially financially, can be reproduced in a much more democratized way with the use of dApps.

But how exactly can one trust a computer program to handle something as important as finances? Well, there are some key attributes to consider when looking at the viability of a smart contract-powered solution. One key feature of smart contracts, automation, eliminates the need for intermediaries and reduces the risk of human error, making financial transactions faster, more efficient and more reliable. This is particularly useful in areas such as cross-border payments, which can currently be slow and costly due to the need for intermediaries and compliance checks.

Another financial service use case for smart contracts is in the area of digital assets. The use of smart contracts allows for the creation of programmable digital assets, such as cryptocurrencies and security tokens, which can be easily traded and managed on a decentralized network. This allows for the creation of new financial products and investment opportunities, such as tokenized real estate, and can provide greater accessibility and security for investors.

dApps

One of the most important applications of smart contracts today is their enablement of decentralized applications, commonly referred to as dApps. As defined before, a smart contract on its own is a quite simplistic mechanism (if/when…then…). However, when linked together, they give rise to complex applications like games, lending platforms, and media platforms. When talking about how smart contracts can improve current systems, let’s take the example of gaming.

Gaming dApps have been quite a popular application of smart contract tech, especially in the realm of GameFi. Many games, especially the mobile games of today, have what’s called an in-game economy. Players collect in-game currency and spend them on in-game items. Players also spend real money on in-game items. The operative term here, if you couldn’t already tell, is ‘in-game’. With smart contracts, one can NFT-ize these items to no longer just exist within one game, but become a transferable asset. One that might even find its way across games, and even across metaverses. Because of their immutability and ability to verify ownership, smart contracts enable the monetization of gaming, and that has not been lost on projects such as Mines of Dalarnia ( DAR) and Walken ( WLKN). These two projects employ the use of NFTs to help users earn while playing or exercising, respectively.

was originally published in The Poloniex blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

인기 뉴스

How to Set Up and Use Trust Wallet for Binance Smart Chain
#Bitcoin#Bitcoins#Config+2 더 많은 태그

How to Set Up and Use Trust Wallet for Binance Smart Chain

Your Essential Guide To Binance Leveraged Tokens

Your Essential Guide To Binance Leveraged Tokens

How to Sell Your Bitcoin Into Cash on Binance (2021 Update)
#Subscriptions

How to Sell Your Bitcoin Into Cash on Binance (2021 Update)

What is Grid Trading? (A Crypto-Futures Guide)

What is Grid Trading? (A Crypto-Futures Guide)

Cryptohopper에서 무료로 거래를 시작하세요!

무료 사용 - 신용카드 필요 없음

시작하기
Cryptohopper appCryptohopper app

면책 조항: Cryptohopper는 규제 기관이 아닙니다. 암호화폐 봇 거래에는 상당한 위험이 수반되며 과거 실적이 미래 결과를 보장하지 않습니다. 제품 스크린샷에 표시된 수익은 설명용이며 과장된 것일 수 있습니다. 봇 거래는 충분한 지식이 있거나 자격을 갖춘 재무 고문의 조언을 구한 경우에만 참여하세요. Cryptohopper는 어떠한 경우에도 (a) 당사 소프트웨어와 관련된 거래로 인해, 그로 인해 또는 이와 관련하여 발생하는 손실 또는 손해의 전부 또는 일부 또는 (b) 직접, 간접, 특별, 결과적 또는 부수적 손해에 대해 개인 또는 단체에 대한 어떠한 책임도 지지 않습니다. Cryptohopper 소셜 트레이딩 플랫폼에서 제공되는 콘텐츠는 Cryptohopper 커뮤니티 회원이 생성한 것이며 Cryptohopper 또는 그것을 대신한 조언이나 추천으로 구성되지 않는다는 점에 유의하시기 바랍니다. 마켓플레이스에 표시된 수익은 향후 결과를 나타내지 않습니다. Cryptohopper의 서비스를 사용함으로써 귀하는 암호화폐 거래와 관련된 내재적 위험을 인정하고 수락하며 발생하는 모든 책임이나 손실로부터 Cryptohopper를 면책하는 데 동의합니다. 당사의 소프트웨어를 사용하거나 거래 활동에 참여하기 전에 당사의 서비스 약관 및 위험 공개 정책을 검토하고 이해하는 것이 필수적입니다. 특정 상황에 따른 맞춤형 조언은 법률 및 재무 전문가와 상담하시기 바랍니다.

©2017 - 2024 저작권: Cryptohopper™ - 판권 소유.