With Arweave’s ‘Lazy’ Approach to Smart Contracts, Its Version of Web3 Does More

CryptoEcoins

Arweave, a blockchain network meant for the permanent storage of data, has released a completely new approach to smart contracts.

In short, smart contracts on Arweave, much like must of the code on websites today, will be run by users’ computers rather than the blockchain itself. Released Thursday, SmartWeave is an approach to smart contracts that allows the blockchain to dispense with gas fees and only requires a smart contract’s code to be run as often as it’s needed and not by every node on the network.

“SmartWeave is a new smart contract language environment built on top of the Arweave network,” Arweave’s Sam Williams told CoinDesk. “It uses this novel type of evaluation called ‘lazy evaluation’ to move the computational burden of smart-contract execution from the nodes in the network to the users of the smart contract.”

It’s like the bake-at-home pizza versus Pizza Hut. Arweave keeps the data ready, available and accurate (in the freezer); users’ machines only need to make sense of that data (bake it) when, and only when, it is needed.

Lazy evaluation verifies the data and, in particular, when each piece of data came into the system. 

“The key thing Arweave is offering you is the ability to say every single thing that came through the system has a time ordering,” Williams said. 

Read more: Arweave 2.0 Gets File Storage Project One Step Closer to Its ‘Library of Alexandria’ Dreams

As Ethereum’s perpetual problem with front-running on decentralized exchanges (DEXs) illustrates, establishing the order of events reliably is one of the more important pieces of work decentralized systems need to do.

That said, it’s not important that each node on a network verify precisely how each digital document renders. Much as each computer that opens a website interprets its HTML and JavaScript locally, Arweave requires users’ computers to do the processing of information, not the network itself. This logic makes sense because Arweave is fundamentally built to be a new kind of internet.

“Arweave as a base protocol is very focused on decentralized, autonomous web services,” Williams said.

Entering a space similar to that of Blockstack, Arweave offers a kind of internet that users log into directly. Once a wallet has logged into Arweave, it can move around all kinds of apps without needing to log into them individually. Williams expects this will create interesting new experiences that we can only partially imagine now.

Arweave’s chief value add is creating a system in which data loaded onto the network can be stored there affordably, forever.

What it can do

Many apps have already been built for Arweave but SmartWeave will open up a new level of functionality, both because of what it enables and the language it runs on.

“If you know JavaScript you can write this immediately,” Williams said. “I would expect we see DAOs within a few weeks.”

Williams gave a simple example of a potential DAO. Imagine an Arweave based blogging platform, like Medium, that anyone could use but whose prized front page was controlled by a committee (that’s the DAO).

Read more: OpenLaw Launches First ‘Legal DAO’ for Distributed VC Investments

Each committee member would have some kind of governance token that allowed them to vote posts to the front page. Whenever each of them opened Arweave and cast their votes for posts, that would get logged as data on the chain.

Each terminal that opened the blog would simply look at the votes and use that to construct the front page that each user sees when they first visit the blog’s homepage.

Arweave has a few sample applications ready to go, such as a basic ERC-20-like and non-fungible token (NFT) modules that will be easy for developers to adopt.

High voltage

The limitations really come off of smart contracts when the processing moves off-chain. 

“What that means in practice is the smart contracts can involve exceptionally large amounts of work,” Williams said. “That wouldn’t really be possible in a normal smart-contract system like Ethereum.”

After that, as developers start to realize further potential for Arweave, Williams expects people will begin to plug machine learning and artificial intelligence into SmartWeave smart contracts. By taking the processing off the network, considerably more powerful kinds of computing can be brought to bear without driving up costs or clogging up the blockchain.

There’s another benefit here: safety. 

As a plethora of new base layer smart contracts have proliferated, there has also been a bevy of new smart-contract languages built to be safer for everyone to use. Starting with Solidity, there’s since been Pact from Kadena, Clarity from Blockstack and Cadence from Dapper Labs, among others. 

Read more: Algorand and Blockstack Are Building a Multi-Chain Smart Contract Language

Said Williams:

“It essentially allows you to run arbitrary code so there doesn’t need to be so many safety checks and safety harnesses. Because the problem you have on a normal smart contract system is that I, as a smart contract developer, can get every single node on the network to execute my code, and that means that code absolutely cannot be allowed to be malicious. But with something on SmartWeave you don’t need those safety rings.”

The nodes aren’t doing all that work. Like on the web, the user needs to trust the code that’s going to be executed but the entire blockchain doesn’t need to protect itself against every smart contract.

“I think there will be a later wave that when people start to realize that the additional computational power that SmartWeave allows you access to unlocks a huge number of things you just couldn’t have built previously,” Williams said.

Disclosure

The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Leave a Reply

Your email address will not be published. Required fields are marked *

Next Post

BitCherry “Three Big Strategies” Defines a New Era of Distributed Business

The rapid rise of blockchain technology has caused a distributed and decentralized network revolution in the world, but the industry’s ecology is still in an incomplete stage. More and more practitioners are beginning to realize that in addition to technology, […]