CSC School: Smart Contracts #7

By akohad Dec29,2022

[ad_1]

Smart contracts play important role in 2nd generation blockchains.smart contract makes a blockchain more than a payment system.in this part we will talk about smart contracts.

Source: Investopedia

Nick Szabo, an American computer scientist who invented a virtual currency called Bit Gold in 1998, defined smart contracts as computerized transaction protocols that execute terms of a contract.

A smart contract is simply a program that runs on the CSC blockchain. It’s a collection of code (its functions) and data (its state) that resides at a specific address on the CSC blockchain.

New to trading? Try crypto trading bots or copy trading on best crypto exchanges

A smart contract is a self-executing contract with the terms of the agreement between buyer and seller being directly written into lines of code. The code and the agreements contained therein exist across a distributed, decentralized blockchain network. The code controls the execution, and transactions are trackable and irreversible.

Smart contracts permit trusted transactions and agreements to be carried out among disparate, anonymous parties without the need for a central authority, legal system, or external enforcement mechanism.

Szabo defined smart contracts as computerized transaction protocols that execute terms of a contract.He wanted to extend the functionality of electronic transaction methods, such as POS (point of sale), to the digital realm.

In his paper, Szabo also proposed the execution of a contract for synthetic assets, such as derivatives and bonds. Szabo wrote: These new securities are formed by combining securities (such as bonds) and derivatives (options and futures) in a wide variety of ways. Very complex term structures for payments can now be built into standardized contracts and traded with low transaction costs, due to computerized analysis of these complex term structures.Many of Szabo’s predictions in the paper came true in ways preceding blockchain technology. For example, derivatives trading is now mostly conducted through computer networks using complex term structures.

One of the biggest problems with a traditional contract is the need for trusted individuals to follow through with the contract’s outcomes.

Here is an example:

Alice and Bob are having a bicycle race. Let’s say Alice bets Bob $10 that she will win the race. Bob is confident he’ll be the winner and agrees to the bet. In the end, Alice finishes the race well ahead of Bob and is the clear winner. But Bob refuses to pay out on the bet, claiming Alice must have cheated.

This silly example illustrates the problem with any non-smart agreement. Even if the conditions of the agreement get met (i.e. you are the winner of the race), you must still trust another person to fulfill the agreement (i.e. payout on the bet).

A simple metaphor for a smart contract is a vending machine, which works somewhat similarly to a smart contract — specific inputs guarantee predetermined outputs.

  • You select a product
  • The vending machine returns the amount required to purchase the product
  • You insert the correct amount
  • The vending machine verifies you have inserted the correct amount
  • The vending machine dispenses the product of choice

The vending machine will only dispense your desired product after all requirements are met. If you don’t select a product or insert enough money, the vending machine won’t give out your product.

One of the most significant benefits smart contracts have over regular contracts is that the outcome is automatically executed when the contract conditions are realized. There is no need to wait for a human to execute the result. In other words: smart contracts remove the need for trust.

For example, you could write a smart contract that holds funds in escrow for a child, allowing them to withdraw funds after a specific date. If they try to withdraw the funds before the specified date, the smart contract won’t execute. Or, you could write a contract that automatically gives you a digital version of a car’s title when you pay the dealer.

The human factor is one of the biggest points of failure with traditional contracts. For example, two individual judges may interpret a traditional contract in different ways. Their interpretations could lead to different decisions getting made and disparate outcomes. Smart contracts remove the possibility of different interpretations. Instead, smart contracts execute precisely based on the conditions written within the contract’s code. This precision means that given the same circumstances, the smart contract will produce the same result.

Smart contracts are also useful for audits and tracking. Since CSC smart contracts are on a public blockchain, anyone can instantly track asset transfers and other related information. You can check to see that someone sent money to your address, for example.

Smart contracts can also protect your privacy. Since CSC is a pseudonymous network (your transactions are tied publicly to a unique cryptographic address, not your identity), you can protect your privacy from observers.

Finally, like contracts, you can check what’s in a smart contract before you sign it (or otherwise interact with it). Better yet, public transparency of the terms in the contract means that anyone can scrutinize it.

So, smart contracts are computer programs that live on the blockchain. They can execute automatically. You can track their transactions, predict how they act and even use them pseudonymously. That’s cool. But what are they good for? Well, smart contracts can do essentially anything that other computer programs do.

They can perform computations, create currency, store data, mint NFTs, send communications and even generate graphics. Here are some popular, real-world examples:

  • Stablecoins
  • Creating and distributing unique digital assets
  • An automatic, open currency exchange
  • Decentralized gaming
  • An insurance policy that pays out automatically
  • A standard that lets people create customized, interoperable currencies

Anyone can write a smart contract and deploy it to the network. You just need to learn how to code in a smart contract language, and have enough CET to deploy your contract. Deploying a smart contract is technically a transaction, so you need to pay Gas in the same way you need to pay gas for a simple CET transfer. However, gas costs for contract deployment are far higher.

Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing

[ad_2]

Source link

By akohad

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *