Polkadot will release the innovation potential of DApp(part1)

Louis Liu

Although everyone could have a Hamlet in his heart and not be mutually exclusive, when a community lacks a clear consensus on important concepts, it only brings chaos and tricks (we are also cross-chain technologies…). The main point of Polkadot is not to connect existing public chains together, but to support developers to develop new blockchains very effectively. These new blockchains can be an application platform (supporting smart contracts), but most of them will be decentralized applications, such as prediction markets, TCRs, stable coins, lending markets, and exchanges. We might as well call them application chains. Polkadot will not only provide tools for developing application chains (Substrate), but they also provide an infrastructure for trust minimal interoperability between application chains (Polkadot Relay). So Polkadot is about a new form of DApp — the application chain and the trust minimal interoperability between them.

So, what is the meaning of cross-chain? First of all, compared with the world computer public chain, the consensus scope of an application chain has been vastly reduced, bring an increase in throughput and decrease on transaction cost. An application chain developed by Substrate can easily reach more than 1000 tps, and the cost is very low, which can meet the requirements of most DApps. Another important difference is governance. Governance is not as obvious as performance issues, but it is another bottleneck in the development of DApps. The theme of this article, if expressed in a radical way, is: Smart contracts confuse the two different concepts of decentralization and verifiability, misleading developers, and have made DApp development stagnant for almost four years. Polkadot enable the decentralized governance on DApp. By removing the two development bottlenecks which are performance and governance, Polkadot may able to release the full potential of DApp innovation, triggering the third wave of decentralized applications.

The following paragraphs will focus on how Polkadot solves decentralized governance issues. Before that, we must first explain the role of decentralized governance and answer the question that why governance is another major bottleneck in DApp innovation beside performance limitations.

At the beginning of 2013, when I know BTC, the most popular app in the crypto community was Satoshi Dice. At that time, more than half of the BTC transaction volume occurred on this online game. Satoshi Dice’s gameplay is very simple, no registration is required, and there is no need to install any client. Satoshidice.com publishes multiple betting addresses, corresponding to different odds. Just transfer Bitcoin to betting addresses and you can participate in the game. If the house loses, the winnings will be transferred back to the player’s sending address. If the player loses, there will be a small amount of BTC sent back, which is equivalent to telling the result. The real innovation of Satoshi Dice is that the players don’t have to worry about cheating, or the game had provable fairness. The proving process is shown in the figure above. Simply put, the server pre-generates a batch of random numbers and publishes the hash value of them. In each round of gambling, the server uses random numbers to decide whether the player win or lose. After the results of the gambling are revealed, so are the random numbers. The player can verify the correspondence between the random numbers and the hash value to confirm that the random numbers are pre-generated. The founder of Satoshi Dice is Eric Voorhees, who was also the founder and CEO of the later cryptocurrency exchange service Shapeshift. At that time, Eric anonymously operated the website. Even if he did with his real name, at that time he was not famous yet. Therefore, the players of Satoshi Dice trust in the application not because they believe the operator, but because they can verify the fairness by themselves. There was a famous saying go: Don’t trust, Verify! The point is about verifiable. And the concept: “In math we trust” proposed by Prof Shou-Cheng Zhang also has the same effect. Verifiable applications use cryptography to create provable fairness.

Blockchain smart contract pioneered by Ethereum is a technology for developing verifiable applications. The internal state of the smart contract is publicly visible, and the platform does not support concealing data. I call this state verifiable. In addition, smart contracts should expose the code. The code disclosure is not only open source but also insurance by the platform that the contract in runtime is exactly the same as the disclosed one. The user can view the contract code to verify that the developer’s claimed processing logic is consistent with the actual implementation, i.e. the processing logic is verifiable. Moreover, smart contracts cannot call random numbers, current system time, or directly access the data outside the chain, to ensure deterministic execution. Thus, smart contracts are a versatile technology for developing verifiable applications. The descendants of Satoshi Dice are also shining on those smart contract platforms.

To protect the processing logic verifiability, the smart contract blockchain does not allow smart contracts to be upgraded because the developer’s unilateral modification of the smart contract can undermine verifiable fairness. But lacking upgradability causes great difficulties on application development. First of all, it is almost impossible for an application to guarantee to be free from defects. Smart contracts run on public-chain platforms, and anyone can access them anonymously without permission. Additionally, smart contracts are often used to manage valuable assets. Then any minor flaws can be exploited by hackers. Contracts such as The DAO and the BEC ICO have caused huge economic losses due to minor defects. On the other hand, internet applications and mobile applications often iterate quickly, adapting to requirements, enhancing functionality, and improving the experience. If the blockchain application cannot evolve, it is difficult to win user from the centralized equivalents.

In order to make smart contracts upgradable, developers use methods such as delegateCall to work around, as shown in the figure above. An upgradeable smart contract usually consists of three parts: a proxy contract, a status contract, and a processing logic contract. The status contract stores all the data that needs to be persisted. The proxy contract is responsible for forwarding external service requests to the processing logic contract. The proxy contract holds an address pointer to the logical contract. Processing logic upgrades can be implemented by deploying a new version of the processing logic contract and modifying the address pointer of the proxy contract.

The upgradability pattern makes smart contracts upgradeable but at the cost of breaking verifiability. Developers can modify smart contracts without their user’s consent or even acknowledgment. Should the user still trust smart contracts? It depends. When a smart contract is not verifiable any more, the contract is credible only if the owner is credible. For example, stable coins such as Paxo/GUSD, we know that the operating entity of them is compliant enterprises regulated by the New York Financial Bureau, and its fiat reserves get regular audits. Although operators of these stable coins can upgrade (modify) smart contracts at any time, users will not worried. However, everyone should notice that trust in contract owner is nothing to do with blockchain, but rather about bringing trust from the outside world onto the blockchain. For example, Tether issues USDT on the blockchain, utilizing the accessibility and fast clearing capabilities of blockchain tech. The USDT creditability is not generated by blockchain, but by the Tether company herself.

Another case is that the contract owner is not an individual or a company, but an decentralized anonymous organization (DAO) go, such as MakerDAO, Aragon, etc. Through a decentralized governance process (usually also with smart contracts), the stakeholders decide when and how to modify the rules by voting. In this case, the credibility of the smart contract depends on the credibility of the DAO. We will continue to extend this topic later.

To summarize, a smart contract is a technology for developing verifiable applications. Status verifiability and processing logic verifiability create provable fairness, and the popularity of smart contract gambling is largely due to this. Verifiability and upgradeability are a pair of contradictions. Upgradeable smart contracts undermine verifiability, the credibility resort to the contract owners.

To be continued…

The original version of this piece was written in Chinese and published on Naissence Project Core Wechat Channel.

Special thanks to Chirs @UKIECN for translation.

This article does not constitute any investment advice.

Louis Liu

Written by

Louis Liu

Random Capital parter and CIO. Random Capital is an incubator for China Polkadot ecosystem start-ups.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade