What are smart contracts?
A normal contract is a written agreement between multiple parties with certain promises both parties have to adhere to. Smart contracts, as the name implies, are smart and digital versions of these agreements. A smart contract is written by a programmer as digital code and is added to the blockchain. This code contains the agreements and conditions set between the parties.
Once included and confirmed in the blockchain the contract can’t be changed anymore. It is visible to everyone due to the distributed and public way the blockchain works. As such it can’t be tampered with. The contract can always be traced and accessed, and you can’t lie about the contract.
A smart contract is based on an ‘If this, then that’ principle: The contract has conditions and certain actions when those conditions are met. The smart contract can execute these actions automatically, without the need for any intermediaries. Agreements can be set up faster and cheaper this way.
Person A and person B have a bet. If person A is right, they will receive €100 from Person B, if Person B is right they will receive €100.
This is set up in a smart contract, and can be viewed by anyone in the blockchain. This contract receives information regarding the bet and can automatically act on the agreement when the conditions are met. As such, it can check who is right and who will receive the €100 from the other person without any extra work.
Even though these smart contracts look safe and reliable, they are not completely without risk. Because the contract is written in a specific programming language, it can’t be easily understood by everyone. A programmer with bad intentions can setup the contract in such a way there might be unwanted results.
Smart contracts are currently used mostly on the Ethereum network. Here they are used to exchange Ethereum for certain tokens. Other cryptocurrencies are not (yet) using these smart contracts because of the mentioned risks. Every smart contract has to be checked by an expert, which makes implementation difficult.
Currently LiteBit does not support smart contracts in any way.