Like many ideas in the blockchain industry, a general confusion shrouds so-called “smart contracts.”
While a standard contract outlines the terms of a relationship (usually one enforceable by law), a smart contract enforces a relationship with cryptographic code. In other words, smart contracts are programs that execute exactly as they are set up to by their creators.
First conceived in 1993, the idea was originally described by computer scientist and cryptographer Nick Szabo as a kind of digital vending machine. In his famous example, he described how users could input data or value, and receive a finite item from a machine, in this case, a real-world snack or a soft drink.
For instance, ethereum users can send 10 ether to a friend on a certain date using a smart contract. In this case, the user would create a contract, and push the data to that contract so that it could execute the desired command.
It’s worth noting that bitcoin was the first to support basic smart contracts in the sense that the network can transfer value from one person to another. The network of nodes will only validate transactions if certain conditions are met.
Bitcoin, however, is limited to the currency use case. On the other hand, ethereum replaces bitcoin’s restrictive language with a language that allows developers to write their own programs.
Ethereum allows developers to program their own smart contracts, or “autonomous agents.” The language is ‘Turing-complete’, meaning it supports a broader set of computational instructions.
Function as ‘multi-signature’ accounts, so that funds are spent only when a required percentage of people agree
Manage agreements between users, say, if one buys insurance from the other
Provide utility to other contracts (similar to how a software library works)
Store information about an application, such as domain registration information or membership records.
Strength in numbers
Extrapolating that last point, smart contracts are likely to need assistance from other smart contracts.
When someone places a simple bet on the temperature on a hot summer day, it might trigger a sequence of contracts under the hood.
One contract would use outside data to determine the weather, and another contract could settle the bet based on the information it received from the first contract when the conditions are met.
Running each contract requires ether transaction fees, which depend on the amount of computational power required.
Ethereum runs smart contract code when a user or another contract sends it a message with enough transaction fees. The Ethereum Virtual Machine then executes smart contracts in ‘bytecode’, or a series of ones and zeroes that can be read and interpreted by the network.
Source: https://www.coindesk.com/information/ethereum-smart-contracts-work/
RECORD Foundation runs the first reward-based music service platform, RecordFarm. A solution to the traditional music industry, it creates the healthy environment where creative works are valued, curations from users are rewarded, and transparency is ensured. The new ecosystem, driven by blockchain technology and RECORD token, simplifies the process and eliminates unnecessary intermediaries.
Join our token sale here — http://recordfoundation.org/
Ask any questions about the project in our chat on Telegram: https://t.me/joinchat/
You can also find the latest news about RECORD Project on our social media channels:
Medium — https://medium.com/record-foundation
Facebook — https://www.facebook.com/RECORDFoundation/