Foresight Ventures: Ethereum Smart Contract Rival "Arweave versus Bitcoin"
Msfew, Foresight Research
· Smart contracts based on storage-based Consensus Paradigm are the optimal solution for decentralized applications in the Web3 era, providing near-unlimited TPS performance while ensuring data traceability and non-monopoly.
· The essence of a smart contract is not to avoid risks, but to allow the people involved in the contract to reasonably allocate risks. Smart contract oversight can be addressed through DAOs and open source.
· Arweave, as a permanent storage Layer0 network, builds SCP applications based on it, which can be trusted not only for data and data interaction storage, but also for front-end page hosting, and is not subject to review and performance is not limited by block chain.

Smart contracts on Bitcoin have also begun to gain traction after the currency's Taproot update in November. The Taproot upgrade brings new features such as Merkelization abstract syntax tree and Schnorr signature to bitcoin, making transactions on the Lightning network look completely consistent with ordinary transactions, not only improving the security and privacy of Bitcoin, but also bringing more attention to the smart contract function of Bitcoin.
In fact, Bitcoin has long supported "smart contract ", although not as complete as ethereum's smart contract, but through the combination of various functional modules, can make a relatively complete application. In bitcoin's early years, developers have explored the possibility of decentralized applications using bitcoin's crude scripting language.
It is this "sketchy and incomplete condition" that has allowed developers to have a lot of creative ideas. It is also the "storage-based smart contract" that has been discussed in this article that has been incubated on Bitcoin and expanded on Arweave.
Smart contracts based on storage consensus may be the optimal solution for decentralized applications in the Web3 era, providing near-unlimited TPS performance while ensuring data traceability and non-monopolization.

According to Nick Szabos's definition of "smart contracts" in 1996, smart contracts should have the following characteristics: a set of promises, specified in digital form, containing agreements, and the people involved in the contract fulfilling the promises.
The Holy Roman Empire was neither holy, Nor Roman, nor imperial. Smart contracts are neither smart nor contracts. The intelligence in a smart contract is not intelligence like that in AI and machine learning, but rather that the contract mechanically executes a prescribed algorithm. At the same time, smart contracts are not really "contracts" in the sense of law. .
· Smart contracts have implicit conditions.
We can take vending machines as an example. A user buys a pizza for 1,000 Bitcoins, and the terms of the contract are a certain amount of bitcoins in exchange for a certain amount of pizza. And the implication is that you don't vomit or diarrhea after eating this pizza. These implied terms are overseen by the food safety laws and other legal provisions of the country where the vending machine is located. And in blockchain, our
The overseer is the entire blockchain network.
· The essence of smart contracts is not to avoid risks, such as completely avoiding the risk of untrusted computing environment, untrusted storage, etc. It's about getting the people involved in the contract to properly allocate risk.
The allocation of risk in smart contracts works only under certain conditions. The premise is that there must be a mechanism for dealing with defaults. In blockchain, the mechanism for dealing with defaults is, of course, blockchain networks such as Ethereum. We'll talk more about this later.
· Another advantage of smart contracts is transparency.
Open source code allows us to take all the details of a contract into account, avoiding the back-and-forth of a contract for an event with a 0.1% chance of happening.
When we talk about smart contracts these days, we're usually talking about smart contracts on Ethereum or similar architectures.
A smart contract in this context is a program that runs on the Ethereum chain, a set of codes (functions) and data (states) at a specific address on the Ethereum blockchain. Often these smart contracts are written in turing-complete programming languages such as Solidity, run in virtual machines such as EVM and get the final state data. Smart contracts on chains such as Ethereum meet the definition and characteristics of smart contracts through the openness of on-chain data and the specific unified computing environment of smart contracts.
And such an overall network design is relatively big problems. Upgrading EVM to achieve smart contract performance is very difficult and requires lengthy development and testing time. At the same time, the internal chain diplomacy of an EVM that is fixed to the chain is very troublesome, relying on prophets, etc. Eg. In addition to that, Too simple design also limits its own functions, complex data calculation is not done, even the calculation of a trigonometric function is very troublesome. Finally, it is difficult to upgrade EVM because EVM is constantly running on ethereum nodes, and fixing and upgrading it is like fixing an engine while an airplane is flying. However, these problems are both double-edged swords, and solving them more or less requires the sacrifice of security and other factors.
Writing smart contracts with Turing-complete Solidity in EVM can be very complete except for complicated operations such as AMM etc. There is no such Turing-complete programming language on bitcoin or Arweave chains.

What about off-chain? There are tons of Turing-complete programming languages out there, and we don't even have to customize one, just grab one and use it. What's the point of blockchain, you might wonder, if computing happens off-chain? However, ethereum Layer2 also relies on various off-chain upgrades to optimize network efficiency. Rather than creating countless layer2s outside the chain to gradually increase TPS over a period of years, it would be better to simply increase TPS to the maximum of the physical layer, making the blockchain a storage layer, with reliable computation and storage. After all, in solutions such as StarkWare, Ethereum is basically a place to store data. That solution is what this article is about: smart contracts based on stored consensus.
The premise of Web3.0 is Web. Best of all, the entire native solution has the same performance as Web2.0 (e.g., @muneeb What I said: If you like EVM, do a new Ethereum. Instead of shoehorning an EVM into Occam's razor-designed bitcoin), it shouldn't have to be patched back to Web2.0 to have Web2.0 performance.
Currently, the only decentralized applications that can achieve the same performance as traditional applications are those that use storage-based designs. Such decentralized applications use the blockchain as a Turing machine tape, storing state and state changes on the blockchain, while the latest state calculations of the contract can be performed within the client of the user down the chain. Such a design allows the performance ceiling of decentralized applications to be directly increased to the bandwidth of the network or the performance of the user's own hardware, which is the most efficient solution at present.
One example of an early adoption of storage-based design ideas is color coins.

As we've mentioned before, Satoshi Nakamoto designed Bitcoin with the idea that it might be a global ledger. A ledger does not require a Turing-complete language and runtime environment (Satoshi nakamoto is no fool, I'm sure he knows he can do something like Ethereum). As a currency, Bitcoin's rudimentary scripting language allows it to store simple Metadata on a chain, For example, The 0th block of Bitcoin has satoshi Nakamoto's famous quote "The Times 03/Jan/2009 Chancellor on The brink of second Bailout for banks".
Since bitcoin's scripting language allows a small amount of Metadata to be stored, that Metadata can be used to represent real life objects, associating real life objects with blocks on the Bitcoin chain that contain specific Metadata. For example, if we write the Metadata in block 6324: "This block generates 100 shares of the stock of the store ", we can say that this block is the first block of the stock of the store color coin, the block containing the Metadata is" colored "by the color coin. After that, other blocks containing transactions in the small stock store (e.g., "Alice sells 10 shares of the small stock store to Bob ") are colored and are blocks that store colored coin transactions.
· Hitched a ride with Bitcoin:
Color coin uses the Bitcoin blockchain as its backbone, uses storage-based consensus, and uses Bitcoin's Metadata as a database to store transactions. It takes full advantage of bitcoin's advantages such as unforgerability, ease of transfer, robustness and transparency to manipulate real-world assets with unprecedented security and ease.
All the advantages of Bitcoin, color coins get. While miners use countless computing power to maintain the Bitcoin network, the security of the color coin project is guaranteed. At the same time, the calculation of the color coin "smart contract" is also carried out in the chain, and there is no performance problem at all. The only flaw may be that the data reading and writing of the bitcoin "database" may be a little slow.
· Probably the earliest example of security NFT:
Color coins were born in 2012. Although colored coins are made up of Bitcoins, they can represent a variety of assets and have a variety of uses, including property, coupons, and issuing company shares. Each colored coin is also different and may represent a different share. In this sense, color coins are NFT.
This primitive but complete NFT is achieved through bitcoin's primitive scripting language + Metadata + store-based consensus. Just imagine, with this kind of design, we can completely reproduce the NFT project of various heads on the Bitcoin chain. One of the innovations was that Color coins came out in 2012, a year after Ethereum, with its Turing-complete language and EVM, was just being dreamed up by Vitalik. This is very advanced.
In 2021, we are in color coin & NBSP; wiki Many of the links are no longer accessible, so it's safe to say that color coin activity has waned. (We can still look at the original color coin. Pitch deck). Color coin's pioneering efforts through off-chain computing, the crude bitcoin scripting language, and the idea of store-based consensus inspired RGB and Arweave SCP.
RGB is a client-validated smart contract system for Layer2 and Layer3 running on the bitcoin and lightning networks. Inspired by color coins, RGB takes Bitcoin as the state commitment layer and adopts a storage-based design paradigm, led by & NBSP; Giacomo Zucco And & have spent Peter Todd In & have spent 2016 Proposed in 2008 and acquired in early 2019. Tether, Bitfinx & NBSP; Support.
RGB stands for "post-blockchain ", Turing's complete form of untrusted distributed computing. RGB isolates smart contract issuers, state owners, and state changes. At the same time, RGB adopted the smart contract code and data operations under the chain scheme. RGB uses the blockchain as the state commitment layer, bitcoin scripts as the ownership control system, and the renewal of smart contracts is defined outside the chain.

In short, RGB is the enhanced color coin. RGB is similar to a very full Layer2, using the blockchain as a promise layer for off-chain computing and state management, greatly improving the performance of smart contracts and decentralized applications. At the same time, with the help of the design of off-chain calculation of smart contract, the script language of Bitcoin can do and should do the state commitment operation, and the Turing-complete programming language outside the chain carries out complex state management and operation.
What Taproot does is reduce the complexity and improve the privacy of complex operations. Taproot does not deliver fully expressive, quasi-Turing-complete smart contracts like those on Ethereum, and the limitations of the Bitcoin scripting language remain.
RGB itself does not have to rely on Taproot. But with Taproot, many RGB operations can be implemented more easily, which could actually be a helpful upgrade for RGB.
Having said the old color coins and RGB, we can talk about the more innovative design of storage-based smart contracts on Arweave. Finally, we can come up with a more official and standardized term: storage-based Consensus Paradigm. In this section we will discuss the advantages and potential problems of this type of design in depth.
Arweave is a blockchain built for storage, and bitcoin's positioning is a bit of a departure from the consensus of storage. From the bottom up, Bitcoin has a bitcoin (ledger recording layer) to Permaweb (app running layer) architecture, while Arweave has a similar architecture: Arweave (storage layer) to Permaweb (app running layer). With Arweave, we can focus more on keeping smart contracts in state, and Arweave acts as the Turing machine's paper tape, recording these states and the transaction of each modified state underneath. Interestingly, Vitalik's latest blog post also shows his intention to become a Web3 paper tape. In the discussion forum of IP-4444, a user commented on the problem of old data storage in Ethereum.

The stored consensus based design paradigm was developed by everFinance's Founder Outprog, inspired by Arweave's SmartWeave and Ethereum's two-layer Rollup. EverPay's white paper describes it this way: In Ethereum, calculations are performed by all nodes in the blockchain network, all of which generate and store global state for query. Unlike the Ethereum model, SCP separates computation and storage. The blockchain does not perform any computation, only data storage. All computation is performed by the user client or server below the chain, and the generated state is also saved by the user or server below the chain. SCP uses off-chain smart contracts, which can be written in any language, with all input parameters coming from a stored blockchain. In the paradigm, a blockchain is more like a computer's hard drive, and off-chain smart contracts can take place on any machine with computing power.
In short, SCP is to use Bitcoin or Arweave to store the results of the state, or to store the content of the smart contract outside the chain, to ensure the trust of the storage, and to achieve a high-performance Layer2 network layered with the underlying blockchain. The Layer2 in question is actually Layer1, since there is no smart contract computing power on the Bitcoin or Arweave chains, they are basically Layer0.

· Unlimited performance
Smart contracts compute off the chain and perform as well as traditional applications. Off-chain servers can host a large number of complex transactions. TPS depends on the performance of the machines that provide computing services and the technical architecture that builds the application, without worrying about the performance constraints of the blockchain itself.
· Reliable data
By virtue of the characteristics of the underlying blockchain, SCP's data are stored on the blockchain, and the blockchain is used as a hard disk, so that the data can not be tampered with and traceable. So blockchain gives data a trusted character.
· Development ecology 0 threshold
Off-chain smart contract development can be done in any language at no additional cost to the developer (learning to use the Arweave HTTP API or bitcoin script certainly does not count). It also avoids the disadvantage of having no or only rudimentary programming languages on the Bitcoin or Arweave chains.
· Have composability
Placing smart contracts completely outside the chain will not pollute the essence of blockchain and maintain the by design of blockchain. At the same time, the SCP smart contract has composability through function stratification. The SCP doesn't necessarily have to be on Arweave, but can be tweaked to access another chain, such as from Arweave's Permaweb directly to Bitcoin's Lightning Network. This is important in a multi-linked future, where composables in the age of software are as powerful as compound interest in finance.
It has to be said that such SCP is quite different from the traditional smart contract in our understanding, and of course there are many potential problems.
· Is SCP's ecology too young now?
We mentioned earlier that the SCP was inspired by SmartWeave. The core of SmartWeave is lazy-execution, where all transactions stored on the chain are run on the client side once they have to get the latest status. SmartWeave is Arweave's official smart contract solution, and SmartWeave is a specific implementation of SCP, so any project that uses SmartWeave is actually using SCP. Both the color coins and RGB mentioned above are implementations of SCP.
At present, almost all Arweave ecological projects adopt SCP design. Interestingly, KYVE recently moved from SmartWeave The main reason for moving to EVM smart contracts is that their business itself is cross-chain, so they need to quickly embrace the ECOLOGY of THE EVM chain, and perhaps the secondary reason is that they think Arweave ecology is young. But in fact, everPay, Pianity, Verto, and Redstone.Finance have all made major moves in SCP ecology recently, and we'll discuss them ina bit more detail later.
· Is the contract enforcement supervisor and computing credible in the definition of smart contracts?
At the beginning of the article, we discussed the definition of smart contracts without elaborating on the monitoring and computational trust issues in SCP implementation. In EVM's smart contract, the overseer is the entire Ethereum network. In SCP, the blockchain network cannot supervise the execution of smart contracts because they run off the chain. But in the Web3 era, we have a solution that fits well: DAO + open source.
Daos can be used to determine and monitor the execution and up-chain of off-chain smart contracts, and anyone can try to run all the results through open source smart contract content and open on-chain data (off-chain smart contracts are written in a "normal" programming language, Almost any device can run JS on a browser, Java on a JVM) to verify that the result is correct. In this way, the supervision and calculation of smart contracts can definitely be guaranteed. After all, it is very Web3 compared with some highly centralized chains and a Layer2 solution with a centralized commercial closed source.
· How decentralized is SCP? Are off-chain smart contracts still smart contracts?
In fact, smart contracts have never required storage trust or computing trust. SCP, by definition, is completely consistent with each of these concepts, except that there is no completely uniform EVM compared to ethereum's Layer1 smart contract. We can't limit ourselves to on-chain VMS. In general, smart contracts, while programs on a decentralized network, are themselves relatively centralized in some ways. The owner of the on-chain contract can himself have high privileges to do dangerous things.
Beyond that, few people pore over the contents of smart contracts line by line, and care little about how reliably they are executed or stored. This involves the question of technological moral balance. In the Web3 era, can programmers who know code cut the crap out of the average user? We've already been cut in Web2. So an off-chain smart contract with DAO oversight and open source contract content that can be run repeatedly by users is not just a smart contract, but also a very secure, trusted and decentralized smart contract.
As I mentioned earlier, SmartWeave is an implementation of SCP, so any project that uses SmartWeave on Arweave is part of the SCP smart contract ecosystem.

· everPay: Real-time cross-chain payment protocol
As the originator of SCP, everPay has been promoting this smart contract design model in the developer ecosystem and in the Arweave community, EverPay itself is a high performance implementation of this design pattern. Instead of implementing SCP directly with SmartWeave, everPay uses other high performance implementations and actively arranges DAO organizations and nodes of smart contracts under the chain.
EverPay recently released a high-performance Arweave TXS synchronizer for Golang concurrent programming. At the same time, everPay has recently promoted and written a high-performance off-chain AMM based on SCP design mode. EverPay continues to lead the advance of Arweave SCP ecological technology through very cutting-edge design and technology.
· Redstone.Finance: DeFi's data ecosystem
Redstone. Finance in the Arweave ecosystem has been continuously optimizing SmartWeave through excellent architecture and cutting edge technology. They can greatly optimize client contract performance by reducing the reloading and running of unnecessary transaction data through multi-layer design and browser multi-layer caching. Or a trusted user can generate a snapshot of the transaction status to reduce the transaction operation. They are also working to improve security, performance and readability of SmartWeave by incorporating WebAssembly technology into it.
· Pianity: Music NFT market
Pianity is a music NFT platform that proposes a model that gives collectors a certain amount of annualized revenue. Pianity's platform collects fee revenue from primary and secondary sales of music NFTS, and then distributes the proceeds to each user who owns an NFT in proportion to its value at the time of purchase to the total value of the NFT. Since the proportion calculation method is the price when buying NFT, users may deliberately raise the PRICE of NFT in order to obtain a higher proportion of allocation, which in turn stimulates the market distributable income to gradually increase and attracts traffic attention.
Pianity has a chance to stand out in the relatively blue-ocean market of music NFT with its permanent storage and dual revenue model.
· Verto: DEX for profit-sharing tokens
Arweave 中有特殊的 Token 类型: 利润分享 Token (PST). 持有 PST 能收取用户使用 DApp 时所花费的一定 AR 手续费. 而 Verto 就是这些利润分享 Token 的 DEX. 其 Token VRT 可以获得全部 PST 交易费用 0.5% 手续费抽成. (更多 PST 相关的内容, 请参考 我们的上篇文章)
在上篇文章中, 我们提到了 Verto 在进行 SmartWeave 合约代码的重构, 因此最近没有交易, 但是可以体现出 Verto 在 Arweave SmartWeave 生态中的积极以及对发展的推动. 我们非常期待 Verto 新版本上线以后能够去交易这些利润分享 Token .
In addition to the aspects mentioned above, SCP on Arweave also has unique advantages.
1.Arweave can be trusted not only for data and data interaction storage, but also for front-end page hosting.
近期 BadgerDAO 的被盗 以及之前 Uniswap 从前端下架了某些 Token , 都是因为前端的中心化, 导致了前端页面被篡改或者受审查和监管压力而被迫修改 (比如链闻, 很幸运的是我们有 Arweave 上的存档). 在这样的情况下, 一个去中心化的应用是不完全去中心化的, 只做到了智能合约的去中心化, 而前端是中心化的.
Arweave's front-end hosting solves this problem. Hosting the front end of an application on Arweave allows the browser to render the entire page while accessing the source file where the transaction is stored. This ensures that the page cannot be tampered with because a transaction is permanently immutable and stored on the blockchain.

This ensures that front-end page storage is decentralized, front-end pages are immutable, and censorship is avoided to a certain extent. Front-end hosting on Arweave can turn a decentralized application into a truly decentralized application. Currently you can use Arweave's Argoapp And so on to host various front-end projects.
2. Maximum performance and decentralization can only be achieved by using SCP on Arweave
According to Outprog, SCP's inventor, "TPS blocks mainly at L1, even if L2 is fast enough to get on the chain. Multiple L2S compete homomorphically for the same resource. This is the end of on-chain calculation and validation and cannot be extended up to ten thousand TPS. The reason for this is the limited thinking of on-chain calculation and validation. It's hard to do real Web3. "doing SCP on a decentralized application with Layer0 location and permanent storage on Arweave is not subject to such limitations. It's a performance consideration.
Ethereum's Layer2 Rollup schemes can also be seen as an SCP idea on Ethereum. The rapid progress of ethereum Layer2 led to the expectation of ETH 2.0. However, the current situation of ethereum Layer2 raises the concern that everything has moved so fast that ethereum now has a high-performance Layer2 at the same time: Compare commercial StarkWare (compared to zkSync team), This Layer2 wallet, built specifically for StarkWare, does not have fraud proof system Optimism. More and more, it looks like a headlong retreat to the Web2 era. For Web3 to work, you have to start over. Technical debt is a scary thing, and it's getting scarier.
From Bitcoin to Arweave, stored consensual design paradigms use off-chain validated smart contracts, enabling truly decentralized applications with unconstrained performance, uncensored, and security. This may lead to a Web3 where data is open source and users own their data and applications.
When faced with the proposition that "The Byzantine General problem in asynchronous networks is unsolvable", Satoshi Nakamoto did not dwell on the "Byzantine General problem" itself, but thought out of the box and came up with the solution of blockchain with PoW, namely bitcoin. When we think about the optimization of smart contracts, we don't have to worry about all kinds of Layer2 encryption and proof, but we need to think outside the box, boldly put smart contracts under the chain, so that the storage consensus can be satisfied, but also meet the characteristics of open source data and reliable supervision. Get exactly the same performance as Web2, which is SCP.

The final & have spent Messari 2022 Annual Report & NBSP; "Development on Bitcoin is like building a rocket, While development on Ethereum has historically been more similar to building a Silicon Valley startup." In Bitcoin (or Arweave ) development is like building a rocket, because they are lower level and do not have the execution environment of smart contracts, so you need to build rockets with sickles and hoes, like colored coins. Ethereum is a complete computer with all the capabilities and tools of software development, and developing on it is like normal software development. So the question at the end of this article is do you want to build a Startup on Ethereum, or do you want to build a rocket on Bitcoin or Arweave, do Web3, and then go to the Moon? Think outside the block.
The original link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia