Blockchain operates on the basis of several algorithms that work closely together to ensure stable and continuous operation.Smart contract
The concept of smart contract (also called chaincode in Hyperledger implementation) was first implemented by Ethereum. These are computer programs executed by miners. Their deployment and execution is initiated by users through transactions. Like any other transaction, smart contracts also benefit from the properties of the blockchain: disintermediation, immutability, transparency and availability. In addition, it is possible to offer an automated service on the blockchain through a smart contract that is enforced by the network.
For example, a smart contract could be the ownership of an object that can be sold or bought at auction. Once it is placed on the market by the owner, interested buyers make their offer by placing money on that contract. Then, when the auction is completed, the owner calls the function to sell his object. This function then automatically selects the best offer and transfers ownership to the buyer. The other bidders are then automatically returned from their smart contract bid and the seller receives their money. In this way, all transactions are protected by the smart contract and the network without interference from trusted third parties.
It was explained in the previous section that smart contracts allow transactions to be automated on pre-programmed conditions. However, the conditions are limited to internal information about the blockchain: transaction information and the source code of the smart contract. This is where oracles step in. They provide a service that enables communication between the blockchain and the outside world. Thus, a smart contract can be aware of the weather, the results of a football match, flight information for a particular plane, etc., and then use that information to calculate its status. It is also possible to produce real-world data from the blockchain. For example, to notify a user by email when a contract has been fulfilled.
Decentralised Autonomous Organisation, or DAO, is based on rules implemented in smart contracts. The most famous example of a DAO based on Ethereum is called ‘The DAO’, which was developed for crowdfunding for non-profit projects. Starting in May 2016, this project managed to raise the equivalent of around $150 million in 28 days. Unfortunately, a bug in the computer program “The DAO” was used to divert some of this money (about $50 million), indicating the risks and low maturity of the technology. As a result of this error, the project was halted and the hard fork of the Ethereum blockchain recovered the amounts collected from participants. Despite this unfortunate incident, the overall concept of DAO is still rightly an interesting prospect for blockchain applications.
The concept of confidentiality encompasses 2 concepts:- A transaction is considered anonymous if its issuer/recipient cannot be identified.- A transaction is considered closed if the object and amount of the transaction is unknown.
Several cryptographic tools can be used to ensure data confidentiality. These include homomorphic encryption, which allows calculations to be made on encrypted data without the need to decrypt it. They also include Zero-Knowledge proof, which allows the verification that the secret information is true. Finally, the Ring Sign is worth mentioning. This is a protocol that allows a subject to sign a transaction using a key belonging to a set without revealing which key actually signed the transaction.