logo

How Stride Utilizes Interchain Accounts for Interchain Liquid Staking

avatar
Adi Ravi Raj
June 19, 2024
5 Min
article cover image

Released more than two years ago, Interchain Accounts (ICA) is an IBC application that allows a controller chain to control accounts on a host chain. As the first user of ICA, Stride leverages this feature to offer liquid staking services across multiple blockchains, making it a critical component of their product offering.

In this blog we’ll explore how Stride built an interchain liquid staking protocol leveraging ICA for various cross-chain use cases.

How Stride works

Stride is a blockchain built using the Cosmos SDK for its state machine and CometBFT for consensus. Via their application, users can stake tokens such as ATOM, TIA, OSMO, etc., and receive a liquid staked version, such as stATOM, stTIA, stOSMO, etc.

On the backend, Stride stakes the user's tokens on the respective native chain by virtue of Interchain Accounts (ICA). Stride acts as the controller chain while other chains where Stride stakes tokens on the user's behalf act as host chains. When users wish to redeem their stake, Stride burns their liquid tokens and returns the native tokens after the unbonding period on the host chain.

image-1.png
Figure 1: High-level depiction of how ICA works

From a user perspective, they visit the app, connect their wallet, click ‘liquid stake’, and immediately receive liquid tokens. But under the hood, there are multiple components at play.

Stride uses ICA to stake/unstake user tokens cross-chain

When Stride adds support for a new host chain, 4 new interchain accounts are created on that chain:

  • Delegation ICA
  • Withdrawal ICA
  • Redemption ICA
  • Fee ICA

Consider an example where a user wishes to liquid stake their ATOM. When the liquid stake request is made via the app, the ATOMs are first sent to Stride’s Deposit account, and a corresponding amount of stATOMs are minted and forwarded to the user. Under the hood, the ATOMs are transferred via IBC using an ICA SendTx message to the Delegation ICA account on the Cosmos Hub, aka the ‘host chain’.

Next, these tokens are delegated to the validator set of Cosmos Hub (according to a predetermined weight) using MsgDelegate packaged inside of an ICA ICA allows you to send a regular message (token transfer, stake/unstake, swap, etc.) inside of an ICA transaction[1].

image-2.png
Figure 1: Stride cross-chain staking flow

Staking rewards accumulate in real time. When new tokens are forwarded from Stride to the Delegation ICA account on Cosmos Hub for staking, previously accumulated rewards are withdrawn and sent to the Withdrawal ICA account.

Stride uses Interchain Queries (ICQ) to query the total amount of tokens in Withdrawal ICA every 6 hours. The goal is to know how much rewards have accumulated and to reinvest that amount into staking. To do so, the ICA WithdrawalBalanceCallback triggers two ICA transactions to:

  1. Reinvest 90% of tokens on Withdrawal ICA by forwarding them to the Delegation ICA account for staking.
  2. Send 10% (the fee charged by Stride) to the ICA Fee account.

Conversely, when a user wishes to redeem their staked tokens, Stride sends a MsgUndelegate inside of an ICA SendTx which undelegates the user's funds. Once the unbonding period elapses, tokens are forwarded to the Redemption ICA. Users can claim their unbonded tokens via ClaimUndelegatedToken, triggering an ICA transaction that forwards the tokens from Redemption ICA to the user’s account on the host chain.



Summary of ICA functions

Stride leverages ICA to perform the following actions remotely:

  • Stake and unstake user funds on a host chain
  • Reinvest staking rewards
  • Transfer funds to charge fees
  • Move undelegated tokens from Stride’s account to the user

By using ICA for these use cases, Stride has built an interchain liquid staking protocol that has enabled $140 million worth of liquid staked value, with more than 116k users.

Get started with Interchain Accounts

The launch of Interchain Accounts has been crucial in enabling complex cross-chain workflows. Today, it’s used for various cross-chain applications such as liquid staking, portfolio management, and lending and borrowing.

Check out our documentation to learn how you can integrate ICA on your chain.
ICA Documentation
avatar
Adi Ravi Raj
IBC Protocol analyst at ICF.
Adi Ravi Raj works at Interchain GmbH and is the protocol analyst for the IBC team.
Footnotes

1 ICA allows you to send a regular message (token transfer, stake/unstake, swap, etc.) inside of an ICA transaction.

Recent Articles

Cover for Getting Started With IBC: Understanding the Interchain Stack and the Main IBC ImplementationsGetting Started With IBC: Understanding the Interchain Stack and the Main IBC Implementations
This article aims to provide an overview of IBC and its main implementations, ibc-go and ibc-rs, as well as other components of the Interchain stack, namely CometBFT and the Cosmos SDK.
avatar
Adi Ravi Raj
October 16, 2023
5 Min
Cover for Winners of the IBC Ideathon, Ideahacker's Guide to IBCWinners of the IBC Ideathon, Ideahacker's Guide to IBC
Announcing the winners of the first-ever IBC Ideathon, Ideahacker's Guide to IBC!
avatar
IBC Protocol
November 15, 2024
4 Min
Head to our Github to begin.

Ready to get started?