Partner Case Study: Squid Is Cross-Chain Liquidity for Everyone

Squid is a protocol that enables cross-chain liquidity routing and swaps through a single Javascript software development kit (SDK).

NEWS
TECHNOLOGY
October 7, 2022
Galen Moore
October 7, 2022

Table of Contents

Back to blog

After working on their own Web3 applications, from application to consensus level, the founders of Squid have first-hand experience with the blockers and pain points in building interoperable Web3 applications. This experience has inspired them to build Squid on a mission to make tapping cross-chain liquidity as easy as possible for developers.

What is the Squid Protocol & how does it enable cross-chain liquidity?

Squid is delivering the cross-chain future for both developers and users. For developers, Squid is a protocol that enables cross-chain liquidity routing and swaps through a single Javascript software development kit (SDK). This routing allows for the swapping of any tokens across all the supported chains, by connecting users to liquidity pools on dexes anywhere in Web3. The SDK works by getting a route that returns the details of the token transfer and the cost to execute it. Developers can then execute the transfer with the required signer and route.

/

Squid uses Axelar's General Message Passing capabilities to enable smart contract calls across multiple chains. Using the multicall feature of Squid, applications can call multiple contracts in sequence. Use cases might include swapping tokens using a dex on another chain, then using the acquired tokens in another dApp. This feature delivers cross-chain liquidity, and saves time for both users and developers as a signature for the second transaction is not required.

What this means for users is one-click transactions. They will not need to download multiple wallets to sign the transactions across different chains. Users can buy NFTs from any marketplace, play a game on another chain or transact with multi-chain DeFi protocols, without any extra steps. Squid enables dApps to source cross-chain liquidity and deliver this kind of experience, using security provided by the Axelar network.

0xSquid + Security

Making it easier for developers to add cross-chain liquidity to their applications does not come without challenges. Whenever working on any cross-chain solution, security is a major priority. Any mistakes or loopholes can cause a loss of funds for users and credibility for your protocol.

After researching different solutions, the team at Squid felt confident in the security provided by the Axelar network. Squid and Axelar take a "minimum surface area" approach to security. This means the smart contracts used only execute the logic to route liquidity but do not hold liquidity themselves.

The swaps executed by Squid are only through trusted Automated Money Makers (AMMs) and no new exchange contracts are introduced. Routing is the only focus for Squid. Squid contracts and SDK do all the work of managing cross-chain logic, ensuring security standards are consistently applied and minimizing surface areas for human error.

On top of using the proof of stake validator set provided by Axelar, Squid also has audited contracts by Ackee Blockchain and are receiving a second audit from Consensys Diligence for an added layer of security.

Building Squid

/

Building a cross-chain protocol requires testing. Testing on the mainnets of each of the participating chains is not only costly but goes against all best practices. To set up a realistic testing environment for Squid, the team needed to fork the mainnet of 6 different chains as well as a local instance of Axelar.

This would be nearly impossible with the tools available to them. With the help of the team at Axelar, Axelar Local Development was born. Axelar-Local-Dev creates a local instance of the Axelar Gateways and allows developers to create contracts on mainnet forks of the supported chains and pass messages between them. This creates a local environment to properly test any cross-chain application using Axelar.

Axelar Local Development gave the team at Squid full control of their development environment. The time and cost of iterating on contracts and APIs that have been needed in building the project were cut significantly. Now the team can simulate and understand the behavior of other mainnet applications interacting with Squid.

Monitoring Squid

When working on multiple chains, being able to monitor the transactions across the chains is critical. This allows developers to understand the overall health of the protocol and bottlenecks in the network. For the team at Squid, monitoring is important for both their development of the protocol and for the developers who are integrating it.

The Axelarscan block explorer provides a user interface and API that has proven to be a very useful part of the toolset for the team at Squid. Axelarscan allows users to see the overall activity of the Axelar network as well as information on specific transactions and chains. Transaction details like the source, destination, asset and current status are found in the Transfers Explorer.

What's next for Squid

A major goal for Squid is the instant execution of cross-chain transactions. They are currently working with the team at Axelar on a new implementation of the Axelar Gateway to reach this goal. At the time of writing, cross-chain transactions always add latency. At a minimum, confirmation times on source, bridging protocol and destination chains must be respected. This leads to a need for new approaches in cross-chain architecture. However, development is taking place to enable cross-chain transactions to be executed immediately on the destination chain after proof is provided on the source chain. This level of transaction time will bring new capabilities to cross-chain applications.

The launch of Squid will be an accelerator for the Axelar ecosystem, as the sourcing of cross-chain liquidity becomes as simple as a simple API call. Developers will be able to build more complex apps on Axelar with ease and scale Web3 across-chain.

If you are interested in helping enable more developers to build cross-chain applications between EVM chains and the Cosmos, the team at Squid is hiring!

For more information and update on Squid, follow them on Twitter and join the Discord!