Introducing CosmWasm on AO

Ahmad Mardeni
WeaveDB
Published in
4 min readMar 30, 2024

--

We are excited to announce that CosmWasm, the most scalable smart contracting platform built for Cosmos, is now on AO; the hyper-parallel computer.

You can get started right away with a local test environment here and deploy your first CW20 token on AO.

What is AO?

Current decentralized computing systems have protocol-enforced limitations including size and data format that do not allow them to scale. For instance, on Ethereum, you have to share a single global queue with all the users and only one can change the state at a point in time.

AO is solving this by providing an actor-oriented network of nodes running in parallel on the Arweave permanent storage.

Think of AO as the “new web”, you can run an arbitrary number of processes in parallel and all of them can communicate with each other through an open messaging protocol, exactly how current web2 websites run independently but can communicate with each other.

Instead of enforcing one set of choices upon all users of the computing environment, ao is built in a modular form: Allowing users to choose which virtual machines, sequencing models, message passing security guarantees, and payment options work best for them.

Source

And we at WeaveDB believe that AO is the next paradigm shift in web3.

Why CosmWasm?

CosmWasm is a smart contract execution environment built for the Cosmos blockchain. It enables developers to write smart contracts in Rust programming language and execute them securely. And has many advantages over other smart contract environments:

Security

Solidity, the programming language used for writing EVM smart contracts has inherent vulnerabilities in its design due to factors such as its complex nature, lack of formal verification tools, and the difficulty of understanding its nuances.

On the other hand, CosmWasm, which uses Rust programming language, offers several advantages such as strict compile-time checks, ownership semantics, and memory safety guarantees. These features make it easier for developers to write secure and robust smart contracts.

Many top-tier audited protocols still fail to avoid simple logical errors in Solidity. For example, in 2021, Compound “accidentally” gave its users $90M due to using < rather than <= in an if statement. CosmWasm addresses this issue by prioritizing unit, integration, and full-stack testing from the outset.

Efficiency and Cost

Ethereum’s throughput is limited at around 30TPS and a single TX costs $5–100 if not more sometimes, CosmWasm can handle thousands of transactions per second, providing significantly faster and cheaper transaction processing.

Interoperability and Modularity

Most DeFi protocols on EVM chains are built like LEGO sets, by composing multiple projects into one. However, this extensive composition significantly multiplies the attack surface for potential exploits and presents testing challenges.

CosmWasm provides all the power of contract composition as in Ethereum, but with architectural support to allow you build complex composition safely.

Source

CosmWasm is designed to be interoperable with other blockchains and with its modular architecture, you can create complex applications by combining and extending existing smart contract modules.

Why CosmWasm on AO?

AO’s distributed and modular architecture allows you to plug in any existing smart contract platforms and they will be able to send and receive messages from other smart contracts on the network.

Currently, AO has two smart contract platforms written in Lua and JS. However, we foresee CosmWasm emerging as the flagship smart contract platform on AO. This is attributed to Rust’s extensive support for audited crypto libraries and its thriving developer community.

Actor model is the only viable way to hyper-scale computation in decentralized networks and AO and CosmWasm turned out to be a perfect duo.

We are excited to announce the release of cosmwasm-ao (CWAO) Tools which allows you to build Rust smart contracts on AO easily. This is a local test environment for now, stay tuned for the public release of the testnet soon!

Follow this guide to deploy your first CW20 token on your local AO here.

Please note that this is a very early release. Everything is subject to changes.

IBC on AO is also under development, which will enable cross-chain communications between AO processes and other blockchains.

About WeaveDB

While web3 dapps may use decentralized technologies like blockchain to facilitate trust and transparency, they may still rely on centralized components like databases for storing data. This can lead to a certain level of centralization, as these components are often controlled by a single entity or organization.

WeaveDB is addressing this issue by offering a high-performance, scalable, decentralized, and reliable database solution.

--

--