Abstract for CTOs

CyberHoward
Abstract Money
Published in
7 min readNov 29, 2023

Why building on Abstract sets you up for success in the Interchain.

Abstract builds tooling to streamline the on and off-chain CosmWasm developer experience in building Interchain applications. We offer a scalable full-stack framework emphasizing modularity, enabling better maintainability and seamless composability between teams, applications, and blockchains.

Why is Abstract not built on the Ethereum Virtual Machine (EVM)?

The introduction of Solidity and the EVM have undoubtedly transformed the world. The concept of a decentralized, Turing complete global computer enabled developers and degens alike to create unique applications ranging from decentralized finance (DeFi) to art collections valued at multiple millions of dollars.

Ethereum did a great job at drawing in developers and attention to a technology that has the potential to be extremely transformative to our society at broad. Nonetheless it has shown time and time again that the EVM struggles to uphold the technical values that are so important for the types of applications that need to be built out with this technology.

At its essence CosmWasm aims to be a response to those inadequacies.

Reentrancy

The EVM is notorious for its broad attack surface related to reentrancy. Attacks that exploit this vulnerability occur so often that a lists exists that keeps track of them. The fact that reentrancy is a well-known attack vector, yet is still exploited on a regular basis shows that there is an inherent flaw in the technology (EVM).

CosmWasm follows the actor model which, as a model for computation, doesn’t allow for any form of reentrancy. This ensures that individual contracts can securely manage their internal state without the risk of in-process interference by an attacker.

🔒 There has only been one known exploit of a CosmWasm contract while CosmWasm was the main technology behind Terra’s meteoric rise in 2021. A prime example is Astroport, which reached a peak Total Value Locked (TVL) of 1.8 Billion US Dollars.

Migration

Smart-contract migrations are a necessity when responding to bug-reports and expanding a product’s feature set. Sadly, migrations are not a first-class feature in the EVM. Different libraries are used to allow developers to migrate their contracts in a way that’s often complex and error prone.

Learning from that experience CosmWasm supports migrations natively by allowing developers to change out the binary executable that defines the contract’s logic with another binary while retaining the contract’s address and state. In this way developers can easily apply patches and roll out upgrades.

WASM and The Rust Language

Where CosmWasm really shines is in it’s inherent composability as a result of it using WebAssembly (WASM).

WebAssembly is a platform-agnostic bytecode instruction set. At a glance, it allows developers to write code in any language while being as platform agnostic as Java but 1000x faster. As a result it can be used in browsers, mobile devices, embedded systems, micro-services and, if its execution is made to be deterministic, as a computation platform for smart-contracts.

As WASM is still undergoing heavy development, only a few languages really support it in a reliable and usable way. The current favorite is Rust, and for all the right reasons.

The Rust Language is an expressive, fast and safe language that allows contracts to be small and cheap to execute. As a result of it being a full-blown programming language, developers who create CosmWasm contracts can put all the available (and rapidly developing) libraries to their use.

As a language Rust can be hard to learn but very rewarding to work with. Rust has been the most loved language for the 7th year in a yearly survey on StackOverflow. Not to mention its recent adoption in the Linux kernel, Microsoft Windows and others.

The Problem with Building from Scratch

While CosmWasm was able to address a lot of the problems that plagued Solidity, it did so with its own shortcomings. Abstract is the only application framework that properly addresses these issues and in doing so allows developers to experiment and innovate at a pace that just hasn’t been possible before.

Tooling and Infrastructure

Creating a new smart-contract framework from scratch requires rebuilding all the tooling that other framework’s developers have grown so accustomed to. Over the years we’ve seen developers create their own bandaid solutions with regard to contract testability, deployment pipelines and monitoring tools. It’s fair to say that most of these projects addressed a specific need without addressing the broader scope of the framework’s problems in this regard.

This uncoordinated approach, while decentralized in nature, causes a lot of confusion within its user base. As a result, public goods funding flows to developers and projects that keep re-inventing the wheel, only to eventually abandon it.

🗣 The ecosystem’s biggest shortfall has been its inability to properly coordinate its network of passionate developers. This results in a fragmented and uncollaborative community.

This same criticism extends to much of the Cosmos ecosystem. An ecosystem touted as the internet of blockchains that aims to simplify the creation of blockchains in a modular fashion. In its current state CosmWasm is bound to the Cosmos ecosystem as the CosmosSDK is its only supported environment, although this could soon™️ change.

Abstract aims to tackle the tooling and community fragmentation by creating incentive structures that foster collaboration as an inherent consequence of the system’s architecture. In other words, Abstract is the golden standard for collaborative smart-contract development.

What We’ve Built

Abstract aims to be the interchain application platform. To achieve this, we’ve developed on-chain infrastructure and Software Development Kits (SDKs) for both smart-contract and front-end development.

The Abstract Framework

Abstract’s framework primarily facilitates the creation of Abstract Accounts, which are smart-contract wallets with installable modular applications. Developing applications in this modular manner offers several significant benefits:

  • Code Reusability: Developers can reuse contracts in other applications. Moreover, Abstract provides a library of contracts for integrating with the most popular protocols, saving both time and money.
  • Security: The logic of an application is simplified to its bare minimum, making it easier to audit and maintain. Additionally, its dependencies are often battle-tested smart contracts, reducing the attack surface.

The following example demonstrates an auto-compounder application, shown in the diagram below. This application provides liquidity to a DEX pool and re-invests the received rewards back into the pool. The application’s functionality can be divided into three contracts:

  • DEX: Offers an interface for performing DEX operations, such as swapping tokens and providing liquidity.
  • Staking: Provides an interface for conducting staking operations, such as claiming rewards and staking or unstaking.
  • Auto-Compounder: Coordinates the DEX and staking contracts to execute the auto-compounding logic.

The strength of this approach lies in its separation of concerns. Your team can focus on problem-solving and feature development without the burden of integrating all possible dependencies. With Abstract, you can rely on shared on-chain infrastructure that is actively maintained to ensure your application’s uptime.

Modular Auto-Compounder Application

Another aspect of this application development approach is the ability to self-host applications. Imagine being able to publish an on-chain application in the same way as an iOS/Android app. This is achievable with our smart-contract app store.

Below is the self-hosted version of the previously mentioned auto-compounder application. Both Sarah and Alex have created an Abstract Account on our platform and installed the auto-compounder application from our app store. The app’s creator may choose to charge an installation or usage fee for their work.

Self-hosted Modular Application

With this setup, Alex and Sarah can both utilize the auto-compounder application and customize it according to their preferences. For instance, Alex can set the application to compound his rewards every 24 hours, while Sarah can set hers to do so every 12 hours. Updates to the application are done through a “pull” based system, as opposed to the current “push” based system. This means that both Sarah and Alex need to actively perform an upgrade if they wish to update their application. The developers cannot force new code onto the users. We believe this approach yields significant technical and potential legal benefits.

In conclusion, Abstract’s modular smart-contract development framework provides a streamlined process for the creation of complex smart-contract based applications through smart-contract composition.

Our Tooling

To demonstrate our commitment to a more collaborative development ecosystem, we’ve created cw-orchestrator. This scripting tool for CosmWasm-based applications enables developers to share and collaborate on their projects.

At its core, cw-orchestrator allows teams to create interfaces for their contracts. These interfaces can be used to interact with the contracts in any environment that supports CosmWasm execution, including live networks, mock environments, and everything in between.

Additionally, we’ve developed powerful features that allow other developers to easily deploy applications to any of these environments. Below is a snippet of how Abstract, a large multi-contract framework, can be deployed to a mock environment by any developer who wishes to integrate:

// Create a sender
let sender = Addr::unchecked(ADMIN);

// Create the mock
let mock = Mock::new(&sender);

// Deploy Abstract to the mock
let abstr_deployment = Abstract::deploy_on(mock.clone(), sender.to_string())?;

You can read more about this powerful tool in our dedicated docs.

Closing Thoughts

Up until this point developers have been building web3 applications from scratch, monetizing their creations through ponzinomics and marketing. These practices have been great for meme and internet culture (3,3) but they have shown to fall short for any meaningful and long-term alignment between builders and users alike.

At some point systems must be put in place that foster long-term collaboration. We believe that Abstract is a major step in that direction and we’re counting on your support.

Let’s collaborate and make the interchain great again!

👀 We’re looking for teams or investors that have a specific use-case that they would want to see built out. If that’s you, please book a meeting with us to see if we can help you out!

Links

Join our Discord!

Check out our Github.

And follow us on Twitter(X).

--

--