Nervos Episode IV — A New Hope (for DeFi)

knwang
Nervos Network
Published in
5 min readAug 23, 2020

--

DeFi is taking stage as one of the most popular and fastest growing uses for blockchain technology. The latest wave of DeFi solutions that are emerging are highly innovative and becoming more accessible every day. The potential for grand scale disruption of global finance is now a concept that even the biggest skeptics of blockchain can no longer brush off and ignore.

However, the potential and excitement is, once again, outpacing the capabilities of the technology. The recent surge of interest from institutional investors and DeFi enthusiasts has skyrocketed the price of transactions and congested networks to a standstill. Meanwhile, smart contract flaws run rampant and have lost investors billions of dollars. Hacks occur with such frequency that the market has become numb to the headlines.

Significant improvements to scalability and security are an absolute requirement, and flexibility at the foundational level is essential to service the continually growing use cases. Any platform which aims to support DeFi in a meaningful way must embody these qualities at a fundamental design level.

Scalability

Nervos’ approach to scalability is a result of optimizing the technology stack at the foundational level, and separating the goals into multiple layers of concern. This has resulted in a > 10x throughput increase compared to Ethereum today, and it does so without sacrificing on security or decentralization.

Sharding is often touted as the go-to solution for blockchain scaling. On its surface, a sharded blockchain does provide significant improvements on transaction throughput, but it does so at the expense of the availability of the global state. When the global state is split to pieces in different shards, collaboration between smart contracts are exceedingly costly with cross-shard transactions, breaking down the fundamental premise of Defi composability (a.k.a money legos). While sharding could be a great scaling option for compartmentalized use cases such as payments, NFT or games, Defi apps have a natural tendency wanting to be in the same shard, defeating the purpose of sharding in the first place. To take the cities, suburbs and farm lands analogy, every new Defi app would still want to launch in Manhattan for access to both available primitives and good user experience, both crucial for finding a way to success. But then we’re back to square one.

With Nervos, we encourage developers to embrace a layered approach when they design their applications. Take the example of an order book based exchange — operations such as submitting and cancelling orders want minimum and predictable cost, operations to fulfill orders want instant finality, while fund deposits and withdrawal can typically wait for a few blocks, not so cost sensitive, but require the broadest scope of consensus. At Nervos, we’re building the entire stack for developers to build their applications — an open, rock solid, secure, sustainable and “not sharded” layer 1 that never compromises on decentralization, and accompanying layer 2 solutions with seamless integrated developer experience and tooling. We’re still a few milestones from getting there, but that’s where we’re building — the platform for the most ambitious decentralized applications that don’t want to make any compromises.

Security

When smart contracts are hacked, people lose money. The reentrancy bug alone has lost investors billions of dollars, and the number of hacks is accelerating. On Ethereum, Ether and ERC tokens are fundamentally different types of assets. Ethers can be independently owned, whereas ERC tokens are always internal states of smart contracts, and therefore subject to the Smart Contract Risk in Defi. This is particularly true when assets are pooled together under the custody of a contract — when the contract is hacked, the attacker can run away with all the assets, as we’ve seen in several recent incidents.

Nervos’ Cell Model utilizes a concept known as First-Class Assets. The authority of the owner has precedence over everything, including the smart contract that defines it. This means that even if an exploit was found in the smart contract code, the attacker would still be locked out of all assets under user control. Not even the smart contract owner can take away assets which they have already given to their users. Attacks which would be catastrophic are completely mitigated by this policy.

Nervos selected Proof of Work for layer 1, because of its long-standing track record of dependability, well understood security model, and immunity to several theoretical problems with other consensus models. With DeFi specifically, Proof of Work is not vulnerable to the Competitive Equilibria Problems Between Staking and Lending, that could have Defi Cannibalize PoS Security.

Flexibility and New Possibilities

The blockchain industry has continuously innovated since its inception. As the demands of projects have shifted, core developers quickly realized the limitations of their platforms. This resulted in the slow but constant cycle of hard forks to address each issue. It’s become more than evident that future needs cannot be anticipated easily, and flexibility at the foundational level is a necessity.

Nervos’ programming model allows anyone to upload a piece of code onto the blockchain in the cells they own. Combined with the RISC-V based virtual machine CKB-VM, this means developers can roll up their sleeves and deploy any crypto primitives that they need, without having to wait for hard forks. We expect Nervos to become the playground of cryptographic researchers, and the frontier of zero knowledge + blockchain in particular.

The real world’s technology and finance infrastructure runs on cryptography. Nervos has a distinctive advantage in bridging the centralized and decentralized worlds. Coinbase’ Price Oracle gives us a peek of what’s possible when we can securely integrate data from off-chain to work with applications on-chain. However, not all the off-chain world can accommodate the on-chain world like Coinbase, to sign with a cyptographic algorithm that the blockchain natively supports. With Nervos, however, this is no longer a blocker. Need RSA support to work with the CA infrastructure, to bring business identity on-chain? Can be done. Hook into the DKIM system to bring email into the decentralized world? It’s coming. Those are the pathways to bring blockchain to the billions and make it truly mainstream.

Looking Forward

We believe the DeFi movement cannot be stopped, and we are on the cusp of a paradigm shift in the very definition of money. As the team that’s behind Nervos, we feel incredibly fortunate to be part of the movement, and are building the best platform for the future of Defi.

If you’re a Defi entrepreneur, I’d like to invite you to join us on this journey — hang out in our telegram channel, come to chat with our developers, and participate in our Hackathons. Hopefully we get to support you through our incubator program down the road too.

We’re ready to help you change the world.

--

--

knwang
Nervos Network

building the intent centric future @ Khalani Network; cofounder Nervos Network