Smart Contract Misconceptions
- Whenever gentleman and smart people hear the term “smart contracts”, their imaginations tend to run wild.
- A sensible contract is simply a flowery name for code that runs on a blockchain and interacts thereupon with block chain’s state.
- A sensible contract maybe a piece of code that’s stored on a blockchain, triggered by blockchain transactions, and which reads and writes data therein block chain’s database.
- Each language has its strengths and weaknesses –you’d be crazy to create an internet site in C or compress HD video in Ruby.
- But in theory a minimum of, we‘ll if we wanted to. You’d just pay an important price in terms of convenience, performance, and quite probably, our hair.
Contracting External Service
- The smart contract replaces its behavior in response to some external event.
First user case:
- Because the source is outside of the blockchain, there’s no guarantee that each node will receive an equivalent answer. Since the smart contracts are deployed independently by every node.
- The smart contract takes a rest until the predetermined time, retrieves the weather report from an external service, and behaves appropriately supported the info received.
- Perhaps the source will change its response within the time between requests from different nodes, or perhaps it’ll become temporarily unavailable. Either way, the consensus is broken and therefore the entire blockchain dies.
- Oracle pushes the info onto the blockchain instead of a sensible contract pulling it in.
- Instead of a sensible contract initiating the retrieval of external data, one or more trusted parties (“Oracle”) creates a transaction that embeds that data within the chain. Every node will have a uniform copy of this data, so it is often safely utilized in a sensible contract state computation.
Enforcing on-chain payments
- The idea is for the smart contract code to automatically initiate the payments at an acceptable time, avoiding manual possessions and guaranteeing that the difficulty cannot default.
- Of course, so as for this work, the funds wont to make the payments must live inside the blockchain also, otherwise a sensible contract couldn’t possibly guarantee their payment.
- Many just like the idea of a sensible contract which calls a bank’s API so as to transfer money.
- But if every node is independently executing the code within the chain to require out money from the account. The checking account got empty instantly and who is liable for calling this API?
- A bank would proactively monitor a blockchain and perform money transfers that mirror the on-chain transactions. This product and risk to the blockchain’s consensus because the chain plays a completely passive role.
- The above makes a sensible bond is either pointless for the issuer, or pointless for the investor.
What’s the problem here?
- From an investor’s perspective, the entire point of a bond is its attractive rate of return, at the value of some risk of default.
- And for the issuer, a bond’s purpose is to boost funds for productive but somewhat risky activity, like building a replacement factory.
- There is no way for the bond issuer to form use of the funds raised, while simultaneously guaranteeing that the investor is going to be repaid. It shouldn’t come as a surprise that the connection between risk and return isn’t a drag that blockchain can solve.