Breakthrough: Appchains Running as Smart Contracts

Jackal Protocol
Interchain Ecosystem Blog
4 min readFeb 15, 2024

--

Every CosmWasm enabled network can have a production-grade appchain integrated locally as a smart contract!

Introduction

Since October 2023, Jackal Labs has embarked on an ambitious project to extend the functionality of the Jackal Protocol to every blockchain within the Cosmos ecosystem. Under the direction of Jackal Labs’ protocol engineer, Bi Phan, and in collaboration with Serdar Turkmenafsar, a product engineer at the Interchain Foundation, this initiative has achieved significant milestones, culminating in a successful implementation within a dev-net environment earlier this year.

This development allows every chain in the interchain to directly access Jackal’s specialized application functions through a simple execution of a local smart contract. Achieving this capability removes cross-chain limitations, improving the user experience and advances the interchain towards a more cohesive and interoperable ecosystem of decentralized applications.‍

Delivering Completely Open Source, Decentralized and Interoperable Distributed Applications

Adoption of IBC is still in its infancy, with the bulk of Cosmos SDK appchains using the ICS20 transfer module for token transfer.

Porting a production-grade appchain’s functionality into a smart contract on another appchain marks a groundbreaking moment for the Inter-Blockchain Communication (IBC) protocol.

As an open-source project, the Jackal Outpost sets a precedent for completely decentralized and interoperable distributed applications. One speculation of how this technology can be used beyond Jackal’s specific storage use case could be lending platforms. Currently, in the interchain, lending platforms exist as isolated entities, with many developed as smart contracts and deployed on different networks. Under the guise of “bringing the lending protocol to a new network”, the developers are forced to re-deploy the smart contract code verbatim on another network, without utilizing IBC at all.

This means that any market position on one network cannot affect any other market positions on the sibling network, because although they’re the same “platform”, they’re totally isolated. In this new era of interchain account connectivity we’re ushering in, a lending platform could be deployed as a stand-alone blockchain, but pose as a smart contract on many other networks.

This development facilitates unprecedented access to uniform lending liquidity across various blockchains like Archway, Juno, Osmosis, and more. It can also apply to decentralized exchanges (DEXs), allowing users from different networks to participate in the same liquidity pools, thereby enhancing the user experience to mirror that of interacting with native smart contracts. This shift towards interchain interoperability could promote a more connected and efficient network of services for everyone.‍

Jackal’s Path to Complete Interoperability

The process of establishing a smart contract storage outpost involves creating a linkage between an account on any Cosmos SDK appchain (referred to as the controller) and a newly initialized account on the Jackal Chain (known as the host). The controller generates Jackal-specific commands, which are then dispatched through an Inter-Blockchain Communication (IBC) packet for execution by the host account.

This innovative approach is made feasible by the Interchain Accounts Specification (ICS-27) within the Inter-Blockchain Communication Protocol. The specification allows for the integration of a controller module on one blockchain (chain A) and a host module on another (chain B).

However, the adoption of ICS-27 is still in its early stages within the Cosmos ecosystem, with many chains yet to enable the controller module. Utilizing the controller module necessitates the integration of its message types into the web client library, a process that must be repeated for each new chain, presenting a significant challenge.

To address these challenges, Serdar developed the cw-ica-controller, a smart contract that wraps the functionality of the controller module and is deployable to CosmWasm, a runtime which most Cosmos SDK appchains already support.

The Jackal team successfully integrated the cw-ica-controller with Jackal’s proprietary chain modules, such as filetree and storage. We believe this integration is the first-ever transmission of a custom module message using ICS-27 in a development network environment.

We call this our Jackal Outpost.

This breakthrough paves the way for the implementation of private hot storage solutions across the entire interchain. Files are secured using AES256 encryption, with filetree messages designed to protect these encryption keys on Jackal, remaining concealed from the public. Access to these keys is exclusively granted to the user through their wallet, protected by their seed phrase.

The Storage Outpost enables the creation of filetree messages on any Cosmos SD chain, which are then sent via IBC for execution and storage on Jackal. Additionally, storage module messages are utilized to manage subscriptions and contracts with storage providers.

The following outlines the comprehensive process for uploading files from a foreign Cosmos chain to Jackal:

Next Steps

The Jackal team will be working with other L1 chains to deploy Jackal Outposts for their local users and integrate with their applications. Our cross-chain road map also includes porting the outpost to non Cosmos SDK ecosystems such as Solana, Polkadot, Avalanche, with the ultimate goal of deploying on the EVM.

Follow the outpost’s road to mainnet deployment here: https://github.com/JackalLabs/storage-outpost

Join the conversation at the Jackal Protocol discord and telegram.

--

--