Skip to main content

Smart Contract Misconceptions

 Smart Contract Misconceptions

Smart Contract Misconceptions

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 interact thereupon block chain's state. 
  • A sensible contract may be a piece of code that's stored on an block chain, triggered by blockchain transactions and which reads and writes data therein block chain's data base.
  • 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 , you'll if you wanted to. You'd just pay an important price in terms of convenience, performance, and quite probably, you hair.

Use Case-1

Contracting External Service

  • The smart contract that replaces its behavior in response to some external event.
First user case:
Problem
  • Because the source is out side of the block chain, there's no guarantee that each node will receive an equivalent answer. Since the smart contracts are deployed independently by every node.
Possible Solution:
  • The smart contract take 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, consensus is broken and therefore the entire blockchain dies.
Workaround
  • 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 which embeds that data within the chain. Every node will have a uniform copy of this data, so it are often safely utilized in a sensible contract state computation.

Use Case-2

Enforcing on-chain payments

Smart Bond
  • The idea is for the smart contract code to automatically initiate the payments at the acceptable time, avoiding manual possesses 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 block chain also , otherwise a sensible contract couldn't possible guarantee their payment.
Problem
  • 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 account. The checking account got empty instantly and who is liable for calling this API?
Solution:
  • A bank would proactively monitor a block chain and perform money transfers which mirror the on-chain transactions. This produce and risk to the block chain'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 a 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 are going to be repaid. It shouldn't come as a surprise that the connection between risk and return isn't a drag that block chain can solve.

Popular posts from this blog

What is Internet of Things (IoT)?

 What is Internet of Things (IoT)?    The internet of Things, or IoT, refers to the billions of physical devices  round the  world that are now connected to  the web  , collecting, sharing and analyses  of knowledge  . It presents and provides the explanation of the network of physical things which is embedded with software , sensors,  and other technologies for the benefit of connecting and exchanging data with other devices and systems on the internet   . Due to the cheap processors and wireless networks, it's possible to  means  anything, from a pill to an aero plane to a self-driving car into  an area  of the IoT. Overview IoT will control the Fourth  technological revolution  . The Fourth  technological revolution  is changing the very software-defined automation allows manufacturers to link all stages of  the worth  chain, rapidly adapt to changing markets , and make highly personalized products on a mass scale. The opportunities provided by this revolution are authenticated

What is Rust Borrowing?

What is Rust Borrowing? Borrowing We call having references as function parameters borrowing. As in real world , if an individual owns something, we 'll borrow it from them . Whenever we’re done, we 've got to offer it back. Referencing  The reference is that the act of consulting somebody or something so as to urge information We would  declare reference in terms of Rust programing as if we are taking a replica of it without damaging or taking its ownership. ‘&’ symbol is employed to pass the reference Have a look that  how ‘&’ symbol is employed in code. fn main() { let s1 = String::from("hello"); let len = calculate_length(&s1); println!("The length of {} is {}.", s1, len); } fn calculate_length(s: &String) -> usize { s.len()} Mutable References The actual concept of mutable reference is same as we use mutable variable When  we  need to  modify  mutable reference is employed once   the worth we make regard to.

Kubernetes Readiness Probes

 Kubernetes Readiness Probes Description We understand that liveness probes and the way they assist keep our apps healthy by ensuring unhealthy containers are restarted automatically. Same like liveness probes, Kubernetes permit us to also define a readiness looked for our pod. The readiness probe is deployed periodically and examines whether the precise pod should receive client requests or not. Whenever a container’s readiness probe returns back success, it’s signaling that the container is ready to simply accept requests. This notion of being prepared is clearly something that’s specific to every container. Almost as liveness probe Kubernetes sends requests to container and supported the result either successful or unsuccessful response it decides container is prepared to require traffic or still preparing for that. The liveness probes not like, if a container fails the readiness check, it won’t be killed or restarted.   This is a very good practice to