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

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

AccessTimeIconJun 11, 2020 at 8:00 a.m. UTC
Updated Aug 19, 2021 at 2:29 a.m. UTC

Presented By Icon

Election 2024 coverage presented by

Stand with crypto

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.

  • Bitcoin Mining in the U.S. Will Become 'a Lot More Decentralized': Core Scientific CEO
    13:18
    Bitcoin Mining in the U.S. Will Become 'a Lot More Decentralized': Core Scientific CEO
  • Binance to Discontinue Its Nigerian Naira Services After Government Scrutiny
    05:10
    Binance to Discontinue Its Nigerian Naira Services After Government Scrutiny
  • The first video of the year 2024
    04:07
    The first video of the year 2024
  • The last regression video of the year 3.67.0
    40:07
    The last regression video of the year 3.67.0
  • "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. 

    As Ethereum's perpetual problem with front-running on decentralized exchanges (DEX) 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 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).

    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. 

    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

    Please note that our privacy policy, terms of use, cookies, and do not sell my personal information have been updated.

    CoinDesk is an award-winning media outlet that covers the cryptocurrency industry. Its journalists abide by a strict set of editorial policies. CoinDesk has adopted a set of principles aimed at ensuring the integrity, editorial independence and freedom from bias of its publications. CoinDesk is part of the Bullish group, which owns and invests in digital asset businesses and digital assets. CoinDesk employees, including journalists, may receive Bullish group equity-based compensation. Bullish was incubated by technology investor Block.one.


    Learn more about Consensus 2024, CoinDesk's longest-running and most influential event that brings together all sides of crypto, blockchain and Web3. Head to consensus.coindesk.com to register and buy your pass now.