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 (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.
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).
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.
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.