Channel Upgradability and Fee Middleware: A Closer Look at Relayer Costs and Incentivisation

IBC Protocol
The Interchain Foundation
7 min readJul 21, 2023

--

Channel Upgradability and Fee Middleware

Relayers serve as the backbone of IBC. They ensure liveness of the system by transporting data packets between chains.

IBC relaying is permissionless. It can be performed by anyone willing to run full nodes of the chains that they wish to relay on. However, doing so incurs costs. And prior to the release of fee middleware in ibc-go v4, there was no in-protocol method to incentivise relayers.

Even though fee middleware was a step forward in the right direction, it had one major limitation: it could only incentivise new IBC channels and not existing ones.

To solve this problem, our team at Interchain GmbH has been working on channel upgradability. This feature enables existing channels to upgrade in order to leverage new features — such as fee middleware.

This blog post aims to provide insights into the on-chain costs involved in relaying and highlight the effectiveness of fee middleware, complemented by channel upgradability, in assisting relayers with cost coverage. We’ll briefly revisit what fee middleware is, and how channel upgradability has been the missing piece for its widespread adoption.

Relayer costs

As previously mentioned, relayers are required to operate full nodes for the chains they intend to relay on. They monitor chains for cross-chain events, create data packets containing messages, and submits them to a counterparty chain.

By doing so, relayers incur two types of costs: 1) Infrastructure costs of running full nodes, and 2) Gas costs for submitting messages.

Due to the infrastructure requirements involved in relaying packets, the majority of relayers today are operated by validators associated with those chains (since validators also run full nodes). Therefore, one of the methods adopted by chains to fund their relayers is by delegating to their validators. Other methods through which relayers are funded today include:

  • Relayer pools: A certain percentage of assets from a chain’s community pool is used to pay for relayers.
  • Direct funding: Chains directly fund relayer wallets.
  • Fee grant: The fee grant module within the Cosmos SDK can be used by a ‘granter’ (a chain for instance) to cover the gas costs incurred by a ‘grantee’ (relayer).
  • Off-chain contracts: Chains hire companies that offer relayer-as-a-service.

Based on anecdotal evidence, the infrastructure costs for relayers typically reach an upper bound of approximately $1,000 per month, per chain. This cost can vary depending on the level of activity/usage on a chain. While we won’t discuss the details of infrastructure costs in this piece, below we take a look at the transaction fees associated with relaying.

On-chain relayer costs

This analysis utilises data extracted from IOBScan OpenAPI to examine the on-chain relayer fees paid for MsgRecvPacket, MsgAcknowledgement, and MsgTimeout on 7 chains: Osmosis, Cosmos Hub, Juno, Axelar, Stride, Umee, and Stargaze. Click here to explore the full dashboard.

Figure 1 below shows the cumulative amount of tokens (by chains’ native coin) paid by relayers as fees (OSMO paid on Osmosis as fees, STARS paid on Stargaze, etc.). This metric serves as a proxy for measuring the level of IBC usage on individual chains — the more tokens expended by relayers, the more activity on those chains.

Given that different tokens are valued at different price points, comparing token amounts across chains does not yield meaningful insights in this context. Instead, analyzing the percentage growth offers valuable information regarding chain usage. For instance, relayer token fee amounts over the past 6 months on Umee has grown at an average rate of 63% month-over-month (MoM). Similarly, the same variable on Axelar has grown at an average rate of 16% MoM.

Figure 1: Total amount in native tokens paid by IBC relayers as fees
Figure 1: Total amount in native tokens paid by relayers as fees

Figure 2 illustrates the USD value associated with these token fee amounts. From August 2022 till May 2023, the Cosmos Hub (depicted in green) recorded the highest fee payments, averaging $3,205 per month.

Following the Cosmos Hub, Osmosis and Juno accounted for the highest amount of fees paid with a monthly average of $1,309 and $462, respectively.

Figure 2: USD value of fees paid by IBC relayers on various chains
Figure 2: USD value of fees paid by relayers on various chains

Table 1 shows the USD value of the total amount of fees paid on various chains over different time intervals.

+=============+================================+=======================+
| Chain | USD value of relayer fees paid | Timeline |
+=============+================================+=======================+
| Cosmos Hub | $138,690 | July 2021 - July 2023 |
+-------------+--------------------------------+-----------------------+
| Osmosis | $62,305 | July 2021 - July 2023 |
+-------------+--------------------------------+-----------------------+
| Juno | $55,884 | July 2021 - July 2023 |
+-------------+--------------------------------+-----------------------+
| Evmos | $11,932 | July 2022 - July 2023 |
+-------------+--------------------------------+-----------------------+
| Stride | $1,685 | Jan - July 2023 |
+-------------+--------------------------------+-----------------------+

Table 1: USD value of fees paid by relayers on different chains

As shown in the table, IBC relayers paid a total of $138,690 on the Cosmos Hub over the past two years. Similarly, on Osmosis, the USD value of relayer fees paid over the past two years was $62,305.

While these costs may seem modest in comparison to the amount of value being transferred over IBC, it’s worth noting that relayers also incur additional infrastructure costs for performing these vital services for the networks they support.

Channel upgradability and fee middleware

As mentioned earlier, relayers are funded through various mechanisms such as delegations, relayer pools, direct funding, etc. It is worth noting that some relayers even operate altruistically!

However, the existing funding mechanisms do not scale well as the interchain grows by an order of magnitude or more. And as highlighted in the previous section, the fees paid by relayers, sometimes even from their own pockets, are not insignificant, especially when added on top of their infrastructure costs.

To address these challenges, we need a scalable and sustainable solution that incentivises relayers in-protocol. This is precisely what ICS-29 fee middleware is intended to do.

The fee middleware (spec, implementation) is an IBC middleware designed to facilitate relayer fee payments for any IBC application. We’ve previously written extensively on how the fee middleware works, which you can find here and here. You can refer to our documentation to learn how to integrate the fee middleware on your chain to start incentivising relayers! You can also check out our wiki to see a sample usage of ICS-20 token transfers with fee middleware.

However, one of the known limitations of fee middleware is that it can only be used to incentivise new IBC channels and not existing ones. But existing channels contain significant accumulated state and associated network effects (for eg, channel 141 <> channel 0 between the Hub and Osmosis). Having to abandon existing state and open an entirely new channel to leverage a feature is poor UX. To tackle this problem, our team at Interchain GmbH are actively working on channel upgradability as a solution.

This feature will allow chains to upgrade their existing channels to utilise new features — such as fee middleware.

Channel upgradability, when combined with fee middleware, establishes the groundwork for a scalable and sustainable interchain. As a result, relayers will no longer bear the burden of paying out of their own pockets, fostering an ecosystem that incentivises and supports relayers effectively.

Over the past two years, relayers on the Cosmos Hub, Osmosis, Evmos, and Juno collectively paid a total of $271,974 in fees. Once channel upgradability goes live, relayer fees can be covered using fee middleware.

We are targeting the end of this quarter for the final release of channel upgradability. To follow the progress on this feature, you can track our alpha milestone here. We will also release a series of blog posts on channel upgradability in the coming months, so stay tuned!

Conclusion

With the anticipated launch of channel upgradability later this quarter, chains will have the ability to upgrade their existing IBC channels to utilise new and innovative features. Among these features is fee middleware, which unlocks on-chain fee incentivisation for relayer operators.

As the network of IBC-connected chains continues to expand, the utilisation of these two features will be critical in fostering an ecosystem where relayers are compensated for their service, ensuring a robust and sustainable interchain for years to come.

About the Author

Adi Ravi Raj works at Interchain GmbH and is the Protocol Analyst for the IBC team.

Thank you to Carlos Rodriguez, Susannah Evans, and Abra for the feedback and review.

--

--

IBC Protocol
The Interchain Foundation

IBC is a blockchain interoperability protocol used by 100+ chains. It enables secure, permissionless, feature-rich cross-chain interactions.