Connect with us

Blockchain

Beware the impossible smart contract

Avatar

Published

on

The three most common smart contract misconceptions

As the developers of a popular blockchain platform, we sometimes get asked whether Ethereum-like smart contracts are on the MultiChain roadmap. The answer I always give is: no, or at least not yet.

But in the hype-filled world of blockchains, smart contracts are all the rage, so why ever not? Well, the problem is, while we now know of three strong use cases for permissioned Bitcoin-style blockchains (provenance, inter-company records and lightweight finance), we’re yet to find the equivalent for Ethereum-style smart contracts.

It’s not that people lack ideas of what they want smart contracts to do. Rather, it’s that so many of these ideas are simply impossible. You see, when smart people hear the term “smart contracts”, their imaginations tend to run wild. They conjure up dreams of autonomous intelligent software, going off into the world, taking its data along for the ride.

Unfortunately the reality of smart contracts is far more mundane than all that:

A smart contract is a piece of code which is stored on an blockchain, triggered by blockchain transactions, and which reads and writes data in that blockchain’s database.

That’s it. Really. A smart contract is just a fancy name for code which runs on a blockchain, and interacts with that blockchain’s state. And what is code? It’s Pascal, it’s Python, it’s PHP. It’s Java, it’s Fortran, it’s C++. If we’re talking databases, it’s stored procedures written in an extension of SQL. All of these languages are fundamentally equivalent, solving the same sorts of problems in the same sorts of ways. Of course, each has its strengths and weaknesses – you’d be crazy to build a website in C or compress HD video in Ruby. But in principle at least, you could if you wanted to. You’d just pay a heavy price in terms of convenience, performance, and quite probably your hair.

The problem with smart contracts isn’t just that people’s expectations are overblown. It’s that these expectations are leading many to spend time and money on ideas that cannot possibly be implemented. It seems large companies have sufficient resources to travel a lengthy path – from the moment when senior management encounters a new technology, to when that technology’s advantages and limitations are truly understood. Perhaps our own experience can help shorten this time.

Over the past nine months, we’ve been pitched many smart contract use cases, and have found ourselves responding, time and again, that they simply cannot be done. As a result, we’ve identified the three smart contract misconceptions that are most commonly held. These ideas aren’t wrong because the technology is immature, or the tools are not yet available. Rather, they misunderstand the fundamental properties of code which lives in a database and runs in a decentralized way.

Contacting external services

Often, the first use case proposed is a smart contract which changes its behavior in response to some external event. For example, an agricultural insurance policy which pays out conditionally based on the quantity of rainfall in a given month. The imagined process goes something like this: the smart contract waits until the predetermined time, retrieves the weather report from an external service, and behaves appropriately based on the data received.

This all sounds simple enough, but it’s also impossible. Why? Because a blockchain is a consensus-based system, meaning that it only works if every node reaches an identical state after processing every transaction and block. Everything that takes place on a blockchain must be completely deterministic, with no possible way for differences to creep in. The moment that two honest nodes disagree about the chain’s state, the entire system becomes worthless.

Now recall that smart contracts are executed independently by every node on a chain. Therefore, if a smart contract retrieves some information from an external source, this retrieval is performed repeatedly and separately by each node. But because this source is outside of the blockchain, there is no guarantee that every node will receive the same answer. Perhaps the source will change its response in the time between requests from different nodes, or perhaps it will become temporarily unavailable. Either way, consensus is broken and the entire blockchain dies.

So what’s the workaround? Actually, it’s rather simple. Instead of a smart contract initiating the retrieval of external data, one or more trusted parties (“oracles”) creates a transaction which embeds that data in the chain. Every node will have an identical copy of this data, so it can be safely used in a smart contract computation. In other words, an oracle pushes the data onto the blockchain rather than a smart contract pulling it in.

When it comes to smart contracts causing events in the outside world, a similar problem appears. For example, many like the idea of a smart contract which calls a bank’s API in order to transfer money. But if every node is independently executing the code in the chain, who is responsible for calling this API? If the answer is just one node, what happens if that particular node malfunctions, deliberately or not? And if the answer is every node, can we trust every node with that API’s password? And do we really want the API called hundreds of times? Even worse, if the smart contract needs to know whether the API call was successful, we’re right back to the problem of depending on external data.

As before, a simple workaround is available. Instead of the smart contract calling an external API, we use a trusted service which monitors the blockchain’s state and performs certain actions in response. For example, a bank could proactively watch a blockchain, and perform money transfers which mirror the on-chain transactions. This presents no risk to the blockchain’s consensus because the chain plays an entirely passive role.

Looking at these two workarounds, we can make some observations. First, they both require a trusted entity to manage the interactions between the blockchain and the outside world. While this is technically possible, it undermines the goal of a decentralized system. Second, the mechanisms used in these workarounds are straightforward examples of reading and writing a database. An oracle which provides external information is simply writing that information into the chain. And a service which mirrors the blockchain’s state in the real world is doing nothing more than reading from that chain. In other words, any interaction between a blockchain and the outside world is restricted to regular database operations. We’ll talk more about this fact later on.

Enforcing on-chain payments

Here’s another proposal that we tend to hear a lot: using a smart contract to automate the payment of coupons for a so-called “smart bond”. The idea is for the smart contract code to automatically initiate the payments at the appropriate times, avoiding manual processes and guaranteeing that the issuer cannot default.

Of course, in order for this to work, the funds used to make the payments must live inside the blockchain as well, otherwise a smart contract could not possibly guarantee their payment. Now recall that a blockchain is just a database, in this case a financial ledger containing the issued bond and some cash. So when we talk about coupon payments, what we’re actually talking about are database operations which take place automatically at an agreed time.

While this automation is technically feasible, it suffers from a financial difficulty. If the funds used for coupon payments are controlled by the bond’s smart contract, then those payments can indeed be guaranteed. But this also means those funds cannot be used by the bond issuer for anything else. And if those funds aren’t under the control of the smart contract, then there is no way in which payment can be guaranteed.

In other words, a smart bond is either pointless for the issuer, or pointless for the investor. And if you think about it, this is a completely obvious outcome. From an investor’s perspective, the whole point of a bond is its attractive rate of return, at the cost of some risk of default. And for the issuer, a bond’s purpose is to raise funds for a productive but somewhat risky activity, such as building a new factory. There is no way for the bond issuer to make use of the funds raised, while simultaneously guaranteeing that the investor will be repaid. It should not come as a surprise that the connection between risk and return is not a problem that blockchains can solve.

Hiding confidential data

As I’ve written about previously, the biggest challenge in deploying blockchains is the radical transparency which they provide. For example, if ten banks set up a blockchain together, and two conduct a bilateral transaction, this will be immediately visible to the other eight. While there are various strategies for mitigating this problem, none beat the simplicity and efficiency of a centralized database, in which a trusted administrator has full control over who can see what.

Some people think that smart contracts can solve this problem. They start with the fact that each smart contract contains its own miniature database, over which it has full control. All read and write operations on this database are mediated by the contract’s code, making it impossible for one contract to read another’s data directly. (This tight coupling between data and code is called encapsulation, and is the foundation of the popular object-oriented programming paradigm.)

So if one smart contract can’t access another’s data, have we solved the problem of blockchain confidentiality? Does it make sense to talk of hiding information in a smart contract? Unfortunately, the answer is no. Because even if one smart contract can’t read another’s data, that data is still stored on every single node in the chain. For each blockchain participant, it’s in the memory or disk of a system which that participant completely controls. And there’s nothing to stop them reading the information from their own system, if and when they choose to do so.

Hiding data in a smart contract is about as secure as hiding it in the HTML code of a web page. Sure, regular web users won’t see it, because it’s not displayed in their browser window. But all it takes is for a web browser to add a ‘View Source’ function (as they all have), and the hidden information becomes universally visible. Similarly, for data hidden in smart contracts, all it takes is for someone to modify their blockchain software to display the contract’s full state, and all semblance of secrecy is lost. A half-decent programmer could do that in an hour or so.

What smart contracts are for

With so many things that smart contracts cannot do, one might ask what they’re actually for. But in order to answer this question, we need to go back to the fundamentals of blockchains themselves. To recap, a blockchain enables a database to be directly and safely shared by entities who do not trust each other, without requiring a central administrator. Blockchains enable data disintermediation, and this can lead to significant savings in complexity and cost.

Any database is modified via “transactions”, which contain a set of changes to that database which must succeed or fail as a whole. For example, in a financial ledger, a payment from Alice to Bob is represented by a transaction that (a) checks if Alice has sufficient funds, (b) deducts a quantity from Alice’s account, and (c) adds the same quantity to Bob’s.

In a regular centralized database, these transactions are created by a single trusted authority. By contrast, in a blockchain-driven shared database, transactions can be created by any of that blockchain’s users. And since these users do not fully trust each other, the database has to contain rules which restrict the transactions performed. For example, in a peer-to-peer financial ledger, each transaction must preserve the total quantity of funds, otherwise participants could freely give themselves as much money as they liked.

One can imagine various ways of expressing these rules, but for now there are two dominant paradigms, inspired by Bitcoin and Ethereum respectively. The Bitcoin method, which we might call “transaction constraints”, evaluates each transaction in terms of: (a) the database entries deleted by that transaction, and (b) the entries created. In a financial ledger, the rule states that the total quantity of funds in the deleted entries has to match the total in those created. (We consider the modification of an existing entry to be equivalent to deleting that entry and creating a new one in its place.)

The second paradigm, which comes from Ethereum, is smart contracts. This states that all modifications to a contract’s data must be performed by its code. (In the context of traditional databases, we can think of this as an enforced stored procedure.) To modify a contract’s data, blockchain users send requests to its code, which determines whether and how to fulfill those requests. As in this example, the smart contract for a financial ledger performs the same three tasks as the administrator of a centralized database: checking for sufficient funds, deducting from one account, and adding to another.

Both of these paradigms are effective, and each has its advantages and disadvantages, as I’ve discussed in depth previously. To summarize, Bitcoin-style transaction constraints provide superior concurrency and performance, while Ethereum-style smart contracts offer greater flexibility. So to return to the question of what smart contracts are for:

Smart contracts are for blockchain use cases which can’t be implemented with transaction constraints.

Given this criterion for using smart contracts, I’m yet to see a strong use case for permissioned blockchains which qualifies. All the compelling blockchain applications I know can be implemented with Bitcoin-style transactions, which can handle permissioning and general data storage, as well as asset creation, transfer, escrow, exchange and destruction. Nonetheless, new use cases are still appearing, and I wouldn’t be surprised if some do require the power of smart contracts. Or, at the very least, an extension of the Bitcoin paradigm.

Whatever the answer turns out to be, the key to remember is that smart contracts are simply one method for restricting the transactions performed in a database. This is undoubtedly a useful thing, and is essential to making that database safe for sharing. But smart contracts cannot do anything else, and they certainly cannot escape the boundaries of the database in which they reside.

Please post any comments at LinkedIn.

Source: https://www.multichain.com/blog/2016/04/beware-impossible-smart-contract/

Blockchain

Eyeing EU Banks, Hex Trust Teams With SIA on Crypto Custody

A multinational payments firm is partnering with cryptocurrency custodian Hex Trust to help its European banking clients hold digital assets.

Avatar

Published

on

Multinational payments firm Sia is partnering with cryptocurrency custodian Hex Trust to help its European banking clients hold digital assets.

“When you have one bitcoin, it’s not a big problem, but when you start adding 10, 20 or 100, you have a treasury and you have to decide where to store this,” said Daniele Savarè, SIA’s innovation and business solutions director. “We are discussing digital custody needs with banks in Europe.” 

The firm is also helping banks manage and safekeep security tokens and central bank digital currencies, he added.

Through SIA, Hex Trust plans to offer European banks the software to custody digital assets on behalf of their customers. Hex Trust will also act as a sub-custodian for banks that don’t want to directly offer the service, said Hex Trust CEO Alessio Quaglini. 

Currently, Hex Trust works with three banks – Mason Privatbank Liechtenstein AG and two unnamed Asian banks. Quaglini said Hex Trust has 10 other banks that are exploring the custodian’s products.

Going forward, SIA will be the primary distribution partner for Hex Trust to offer digital-asset services to banks in Europe, Quaglini said. 

Source: https://www.coindesk.com/hex-trust-sia-crypto-custody-eu-banks

Continue Reading

Blockchain

Collider Labs Raises $1M to Invest in Blockchain Startups

The venture builder is seeking to invest in early-stage startups with a focus on transparency, privacy and “fairness.”

Avatar

Published

on

Collider Labs has raised $1 million to be invested in early-stage blockchain and cryptocurrency startups.

In an announcement Thursday, the venture builder said the raise had brought on board several notable limited partners including Efficient Frontier CTO Alon Elmaliah and Follow [the] Seed Founding Partner Andrey Shirben.

Collider provides funding and liquidity and actively participates in building up startups alongside their communities and founders, according to the firm’s founding partner, Avishay Ovadia.

The company is actively seeking to invest in early-stage blockchain and crypto startups globally, with a focus transparency, privacy and “fairness.”

Collider “is a venture builder that somewhat resembles an accelerator” Ovadia said. With some “key characteristics” that differentiate it from a typical accelerator.

Venture builders, also known as startup studios, pair with early-stage startups and utilize their own ideas and resources to, if all goes according to plan, construct viable enterprises.

According to Ovadia, Collider forms partnerships with founders, invests in teams and works alongside them as what he calls “Investors in Residence.”

Source: https://www.coindesk.com/collider-labs-raises-1m-to-invest-in-blockchain-startups

Continue Reading

Blockchain

Voyager Agrees to Buy LGO Markets and Merge 2 Firms’ Tokens

Two cryptocurrency trading firms are merging, and in a rare twist, so are their tokens.

Avatar

Published

on

Two cryptocurrency trading firms are merging, and in a rare twist, so are their tokens.

Voyager Digital, a publicly traded digital asset brokerage with offices in New York, has agreed to buy LGO, a French crypto exchange primarily serving institutional investors, as the company expands to Europe.

The transaction requires regulatory approval, which the parties said they expect to receive by the end of this year, along with the token swap. The value of the deal will depend on the value of Voyager’s shares, and the firms’ tokens, at closing; at current prices, it would be in the low seven figures.

As such, this deal is dwarfed by this year’s blockbuster crypto M&A deals such as Binance’s acquisition of CoinMarketCap, estimated to be worth $400 million, and FTX’s $150 million deal to acquire Blockfolio.

Read More: ‘They Have the Users’: Binance CEO Explains Why He Bought CoinMarketCap

What makes this deal unusual is that the two companies’ utility tokens, VGX and LGO, will be swapped into newly minted tokens featuring decentralized finance (DeFi) functions such as community governance and staking at an initial interest rate of 7%.

“We think this is really taking the old-school mergers and acquisitions to the token world, which hasn’t been done before,” Steve Enrlich, Voyager’s co-founder and chief executive officer, told CoinDesk.

Upon completion, Voyager, which is publicly listed on the Canadian Securities Exchange, will issue one million shares for the acquisition and operate in the European retail market with LGO’s Virtual Asset Service Provider registration with the French Financial Markets regulator (AMF). All activities will be conducted under the Voyager brand and LGO will discontinue its institutional services on Oct. 31. Shares of Voyager closed at C$0.67 ($0.51) on Wednesday. 

Read More: Voyager to Pay Interest on DeFi Tokens to Gain Brokerage Clients

Hugo Renaudin, co-founder and chief executive officer of LGO, told CoinDesk that the French company made the deal after it decided to shift its focus from institutional clients to increasing value for its token holders.

“The key decision-maker is what will bring the most value to our tokens,” Renaudin said. “So we have this token. We have token holders and they’re mostly retail [clients].”

LGO launched an initial coin offering (ICO) in February 2018, according to its website, which raised 3,600 bitcoin (worth about $36 million at the time). The company’s white paper shows that 60% of the tokens were distributed through a pre-sale process, while 20% of the supply went to LGO’s founders and advisors.

At its peak in April 2018, the LGO token’s market cap was nearly $40 million, according to data from CoinMarketCap. On Wednesday, that value was calculated to be $1.5 million. 

Renaudin told CoinDesk that the company’s other option would have been focusing on better serving its institutional clients, which means its spot exchange would have to provide new and exotic derivatives products. After consideration, he said that the team had decided to change its focus to retail customers instead.

The merger comes during a time of regulatory crackdown on crypto derivatives trading around the globe. Popular crypto derivatives exchange BitMEX was charged by the U.S. Commodity Futures Trading Commission (CFTC) with facilitating unregistered trading activities, while in the UK, the Financial Conduct Authority (FCA) has banned crypto derivatives for retail consumers.

This is not the first acquisition by Voyager, which went public in early 2019 in a reverse merger with the shell of a Canadian mineral exploration company. Previously, it acquired wallet startup Ethos.io for about $4 million.

Read More: Voyager CEO Says Revenue Growth Accelerates 8-Fold as DeFi Trading Surges

Voyage’s revenue in the most-recent fiscal quarter, which ended Sept. 30, surged to about $2 million, compared with $1.1 million during the fiscal year ending in June.

“We are becoming the financial service firm of the future, which means I will look at acquisitions that can add products, customer assets to the platform, or tokens and other communities that can be accretive to what we are trying to do,” Enrlich said. “And adding these pieces together we are going to either do it organically or through more acquisitions.”

Disclosure

Source: https://www.coindesk.com/voyager-acquires-lgo-token-merger

Continue Reading
Energy4 hours ago

Global Electrical SCADA Market Report 2020: Developments in IoT Technology and Cloud Computing has Increased Growth

Energy4 hours ago

Global $855 Billion Bio-Refinery Product Market to 2026 with Neste Oil, Renewable Energy, Pacific Ethanol, UOP, Abengoa Bioenergy, and Valero Energy Dominating

Energy4 hours ago

U.S. Chemical Production Expanded In September

Energy5 hours ago

$9.8 Billion Worldwide Thermal Spray Coatings Industry to 2027 – Impact of COVID-19 on the Market

Energy5 hours ago

Valisure Expands Testing Capabilities With The Addition Of Elemental Analysis

AR/VR5 hours ago

Somnium Space’s Next Updates to Add Buildable Worlds, Web Access & More

AI6 hours ago

Beyond Limits and The Carnrite Group Create Alliance to Drive AI Innovation in Oil & Gas, Utilities, Power and Industrial Sectors.

Esports6 hours ago

BIG, OG, fnatic round out Flashpoint 2 team list

Crowdfunding6 hours ago

Earn $10,249 a Year in FREE “Crypto Income”

Energy7 hours ago

Ball Corporation and Kroenke Sports & Entertainment Announce Global Partnership to Advance Sustainability in Sports and Entertainment Through Aluminum Beverage Packaging, Improved Recycling Programs and Consumer Education

Energy7 hours ago

St. James Gold Announces Private Placement

Energy7 hours ago

Worldwide Water and Wastewater Treatment Equipment Industry to 2027 – Featuring SUEZ, Ecolab & DuPont Among Others

Energy7 hours ago

Automotive Refinish Coatings Market Size Worth USD 11.69 Billion by 2027 | CAGR of 3.7%: Emergen Research

AR/VR7 hours ago

Captain Toonhead vs the Punks from Outer Space Unleashes FPS Tower Defense in 2021

Germany
Esports8 hours ago

Vitality take down BIG to set up clash against Astralis in DH Open Fall

Energy10 hours ago

Dorian LPG Ltd Provides Update for the Second Quarter 2021 and Announces Second Quarter 2021 Earnings and Conference Call Date

Energy10 hours ago

SK Innovation Declares Ambition to ‘Lead the Efforts for Battery Safety, Charging Speed and Driving Range’ at InterBattery 2020

Energy10 hours ago

Canada Nickel Makes Third New Discovery at Crawford Nickel-Cobalt Sulphide Project

Energy10 hours ago

AEP Reports Strong Third-Quarter 2020 Earnings

Blockchain13 hours ago

Eyeing EU Banks, Hex Trust Teams With SIA on Crypto Custody

Blockchain14 hours ago

Collider Labs Raises $1M to Invest in Blockchain Startups

Blockchain15 hours ago

Voyager Agrees to Buy LGO Markets and Merge 2 Firms’ Tokens

Cyber Security21 hours ago

Business Enablement By Way Of The BISO

Ecommerce21 hours ago

Turing Pi 2 – compact edge clusters with 32 GB RAM and new Raspberry…

Ecommerce21 hours ago

The Top eCommerce Companies in October, According to eCommerce…

Ecommerce21 hours ago

Footwear Manufacturer Otabo Steps Up Digital Strategy with Centric…

Ecommerce21 hours ago

Cloud Sales Veterans Release Essential Read for B2B Salespeople

Ecommerce21 hours ago

LaserShip Announces Its Time Of Need Philanthropic Program

Indonesia
Esports22 hours ago

Gen.G in talks with Liazz – Report

Esports23 hours ago

cogu joins MIBR as manager and coach

Energy23 hours ago

Strategic Resources Files Mustavaara Technical Report

Energy24 hours ago

Ur-Energy Announces Extension of State Bond Loan and Provides Update

Energy24 hours ago

Pettit Marine Paint Develops the Most Effective Anti-fouling Paint to Hit the Market in Many Years – ODYSSEY® TRITON

Energy24 hours ago

Core Lab Reports Third Quarter 2020 Results From Continuing Operations:

Blockchain1 day ago

Pelosi, Kudlow Signal Market-Moving US Stimulus May Wait Till After Election: Report

Energy1 day ago

A Difference-Making Disinfectant

Blockchain1 day ago

Market Wrap: PayPal Powers Bitcoin Past $12.8K as Ether Dominance Drops

Automotive1 day ago

How Car Tires Are Manufactured

Medical Devices1 day ago

5 Real World Applications of the Doppler Effect

Big Data1 day ago

Join Hands with Instagram’s New Algorithm to Boost Your Business’s User Engagement

Trending