paint-brush
"Solidity is Not Ideal For Writing Foolproof Smart Contracts" - Patrick Daiby@ishanpandey
1,759 reads
1,759 reads

"Solidity is Not Ideal For Writing Foolproof Smart Contracts" - Patrick Dai

by Ishan PandeyJune 29th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Qtum is the world’s first digital currency that can execute Smart Contracts with Proof-of-Stake but based on a UTXO model. Investors such as Tim Draper, Roger Ver and other seasoned names all invested in the project. The purpose of the DGP Protocol is to allow some basic blockchain parameters to be changed without the need for a hard fork, such as block size and gas fees. We have seen that even even the block size of the block and fees have even been changed for the hard fork.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - "Solidity is Not Ideal For Writing Foolproof Smart Contracts" - Patrick Dai
Ishan Pandey HackerNoon profile picture

Ishan Pandey: Hi Patrick, welcome to our “Behind the Startup” series. Tell us about yourself and the story behind Qtum?

Patrick Dai: Thank you! I grew up in Sichuan in China and did my PhD candidate in Computer Science. I’ve always been into building stuff and after getting my first computer in 2002. It was the only thing I paid real attention to. I worked at different companies like Alibaba alongside my studies, but it was not until finding Bitcoin in 2012, and later on, starting my own research and development around crypto in 2013 that I knew I was getting into extremely disruptive technology.

Since then, Well. We had a really big idea to combine a crypto-currency with programmability, and a few years later of hard work, Qtum was born in March 2016, as the world’s first digital currency that can execute Smart Contracts with Proof-of-Stake but based on a UTXO model. Back then, people said that idea would be impossible. Not everyone though, investors such as Tim Draper, Roger Ver and other seasoned names all invested in Qtum. 5 years later, here we are though, on track with a robust and secure PoS-chain. What gets me really excited though is the next 10 years of development, for example, we have not even had our first Block-reward halving yet! We can’t say for sure what will happen but we have part of our DNA from Bitcoin, and our limiting supply is quite similar, and our maximum capped supply will reach 107.8 million in the year 2045.

Ishan Pandey: Most of the PoS blockchains have a high barrier to entry, due to which running a full node is not possible for everyone. What are your views on this level of centralization in the current state of PoS?

Patrick Dai: Naturally, centralization vs. decentralization is a spectrum and we urge everyone to keep a reasonable debate and not to turn to dogmatic tribalism in the question. Still, every barrier that sets a constraint on influence in relation to network stake, is a move towards centralization. My view is that decentralization is one of the most important features of this industry and something every actor should work towards and not against. As previously mentioned, it's also a feature that is at the core of Qtum’s vision. That's why we designed a protocol with minimal constraint on who can choose to participate in the protocol consensus and thus securing the network. You can run a full node with very simple hardware, such as a Raspberry Pi. Which in practice enables everyone to participate and you can also stake with a small amount of native token.

Ishan Pandey: What is Qtum protocol, can you please provide a technical explanation of the technology architecture?

Patrick Dai: The easiest way to give an oversight of the Qtum protocols architecture is to see it as two parallel layers with a translation layer in between. The fundament is forked from bitcoin and is a UTXO set that the native token is built on. The other layer is the Ethereum virtual machine enabling smart contract compatibility which through the abstraction layer communicates with the UTXO set as it was an account model set like in Ethereum itself. By running the EVM and Bitcoin core we are compatible with all new development in both ecosystems. Except for the hosting properties of both Bitcoin and Ethereum, we created our custom consensus.

Ishan Pandey: It is easy for hackers to exploit smart contracts, due to which the cost of error is high. What are your views on the susceptibility of smart contracts and what can be the possible solutions?

Patrick Dai: One of the main issues with unsecure smart contracts is that Solidity is a hard language to write foolproof code. Even Gavin himself could not produce a safe code which is a good indicator that Solidity ain’t good enough to ensure security in some cases. At Qtum for example, we are developing our own virtual machine to provide coding in e.g., Rust to facilitate secure code in the future, on a social note.

But regardless of the technical issues, as long as the code is produced by humans there will always be unexpected edge cases in such complex systems. The focus should be to further develop and a possible solution would be the development of the still-nascent crypto insurance. Centralized insurance is expensive and not transparent. On-chain and crowdsourced insurance of capital pools, and security audits by experienced 3rd parties is the future for the cryptocurrency industry.

Ishan Pandey: Can you explain the functioning and purpose of the ‘Decentralized Governance Protocol'?

Patrick Dai: The purpose of DGP is to allow some basic blockchain parameters to be changed without the need for a hard fork, such as block size and gas fees. We have seen that even the smallest protocol parameters can quickly escalate into very ideologic and polarized discussions in a community. The block size debate in the Bitcoin community back in 2017 led to the contentious hard fork with Bitcoin Cash forking away. While discussion and disagreement are healthy in themselves - this type of prolonged fights regarding minor changes to the protocol base layer will inhibit innovation and effective development of the ecosystem.

Ishan Pandey: What are the advantages of abstract account layers in terms of performance and scalability?

Patrick Dai: The AAL enables any virtual machine to communicate with Virtual Machine’s UTXO-based as it was an account model-based. We have used the secure history of the UTXO approach combined with the EVM account model for smart contracts. At the core protocol layer, there is considerable complexity for managing the UTXO set, and the AAL makes an easy interaction as an account for the EVM.

Ishan Pandey: Enterprises are looking for a smart contract platform where mistakes in codes can be patched so that end-users do not suffer economic loss. According to you, what is the possible solution to this issue?

Patrick Dai: It’s certainly a real issue for larger actors that want to put part of their operations in smart contracts. The solution is not to increase centralization. The key here is to be able to reach a consensus on issues

Ishan Pandey: What are your views on incoming regulations around stablecoins for enterprise and governmental use?

Patrick Dai: On a general level, regulations are a good step towards legitimizing all the serious actors in the blockchain space as well as protecting users from bad actors. While decentralization is at the core of what we do, stable coins are inherently hard to structure in a decentralized manner. Therefore it should in theory be a good step to set up some regulation around auditing and the setup of stable coins, as long as there is no centralized control of the supply when in circulation.

Ishan Pandey: What is the future of DeFi according to you? Further, what are the certain limitations regarding Dapps and Defi applications running on the ethereum blockchain?

Patrick Dai: We’re in the nascent stage of exponential growth of DeFi, just a couple of months ago $10 billion in TVL was blowing everyone's mind. Now we’re closer to $50 billion of digital assets locked in DeFi protocols and still nowhere near maturity in the market. Traditional finance is a multi-trillion-dollar global industry still producing services that are in line to be disrupted by the democratization of value that blockchain can offer to the world.

This continuous growth and increasing demand must be met on a technical level as the Ethereum base layer are currently struggling to keep up. Congestion and high transaction fees are slowing down the innovation and development in the DeFi space which is to no one's gain. To be clear, we believe Ethereum and its ecosystem is a vital player in the blockchain space. There are many interesting solutions to layer 2 scaling which will be vital for the longevity of the space. In the near future, other chains like Qtum have the capacity to facilitate DeFi and Dapps and we envision a multichain DeFi space in the future with the DeFi grant.

Disclaimer: The purpose of this article is to remove informational asymmetry existing today in our digital markets by performing due diligence by asking the right questions and equipping readers with better opinions to make informed decisions. The material does not constitute any investment, financial, or legal advice. Please do your research before investing in any digital assets or tokens, etc. The writer does not have any vested interest in the company. Ishan Pandey.