Software Upgrade v15: Packet Forward Middleware (multi-hop IBC routing)

## TL;DR

Add **Packet Forward Middleware (PFM)** to Terra Classic so a single IBC transfer can route *through* our chain to a final destination automatically (e.g. `Chain A → Terra Classic → Chain B`). It’s standard infrastructure already run by Osmosis, Stride, Injective, Sei and most major Cosmos chains. The code is written, builds cleanly, and has been tested end-to-end on a live 3-chain network. It changes **no existing module parameters**, and the optional forwarding fee is left entirely to governance.

## The problem

Terra Classic speaks IBC, but today it can only move assets across the channels it holds **directly**. To reach a chain we have no direct channel with, a user has to do it in multiple manual steps — or it isn’t possible in a single flow at all. That’s friction for anyone moving LUNC (or assets bridged onto Terra Classic) around the wider ecosystem, and it’s a capability gap relative to essentially every other active IBC chain.

## The proposal

Integrate **Packet Forward Middleware** (`packet-forward-middleware/v10`) into our IBC transfer stack. PFM inspects a transfer’s `memo`: if it contains forwarding instructions, the receiving chain automatically relays the packet onward to the next hop, with proper refund and timeout handling if a later hop fails.

In plain terms: **Terra Classic becomes able to pass IBC traffic through itself**, and our own users can reach the entire IBC network in a single transaction by hopping through a connected chain.

## What it gives Terra Classic

- **Reach.** LUNC and bridged assets can move across the whole IBC network in one hop, without us having to open and maintain a direct channel to every counterparty.

- **It strengthens our interoperability roadmap.** As assets are bridged *onto* Terra Classic, PFM ensures they aren’t stranded here — they can flow onward across IBC. It makes the broader interop work more useful.

- **Composability with smart contracts.** PFM works alongside our existing IBC-hooks module, so a routed packet can also trigger a CosmWasm contract — a building block for cross-chain flows that touch Terra Classic.

- **A governance-controlled transit fee.** PFM includes a `fee_percentage` parameter that can take a small share of *forwarded* packets into the community pool. Whether that fee is zero or a set percentage is **entirely a governance decision**, adjustable at any time via a standard parameter change — this upgrade does not lock in a policy.

## What it does *not* do (so expectations are honest)

- It does **not** create demand or guarantee volume — it removes friction and adds a capability. Whether traffic flows depends on real usage.

- It does **not** turn Terra Classic into a major cross-chain “hub” overnight — the high-volume routing chains (Osmosis, the Hub, Noble) hold that ground. The main, realistic benefit is **our own assets’ reach** plus an optional, governance-set transit fee.

- It changes **no tokenomics and no existing module parameters.** This is infrastructure, not a monetary-policy change.

## How it works (technical)

- Adds the `packetforward` module to the transfer stack, ordered `channel → ibc-hooks → packet-forward → transfer` (the same ordering used by Osmosis and others).

- The forwarding fee (`fee_percentage`) is a standard module parameter, set and changed by governance.

- Delivered as a standard consensus upgrade (`v15`) applied at a governance-set block height via the normal Cosmovisor / coordinated binary-swap process.

**Dependency note (full transparency):** pulling PFM also bumps `ibc-go` from `v10.5.0` to `v10.6.0` — a minor patch release. It is part of this upgrade and compiles/tests cleanly.

## Risk & security

Low risk. This is a well-established component used chain-wide across Cosmos. It adds a module store (which is why it requires a coordinated upgrade at a set height), makes **no changes to existing module parameters**, and leaves ordinary (non-forwarded) IBC transfers completely unaffected.

## Testing (this isn’t just a concept)

The implementation already exists and has been verified:

- Builds cleanly (`go build ./…`) and the upgrade binary registers the module in genesis.

- A **live 3-chain integration test** (`gaia → Terra Classic → osmosis`, with a relayer) confirms Terra Classic correctly forwards a multi-hop transfer end-to-end — funds sent from gaia arrive on osmosis, routed through us. This is new test coverage that specifically exercises **Terra Classic as the forwarding hop** (existing PFM tests only used Osmosis as the hop).

Code, tests, and documentation are available for review here:

**Pull request:**
Feat/v15 packet forward middleware by TheAlchemist616 · Pull Request #665 · classic-terra/core

## Cost

No funding requested. This is a software upgrade. The only cost is the standard governance proposal deposit when it goes on-chain.

## Proposed next steps

  1. **Community discussion** on this thread (this post).

  2. **L1 Joint Task Force / maintainer review** and merge into the canonical release.

  3. **On-chain `MsgSoftwareUpgrade`** proposal with a concrete upgrade height, once a release is tagged.

## Feedback welcome

Specifically: any concerns about the `ibc-go` minor bump riding along, what the community thinks the forwarding fee (`fee_percentage`) should be, and thoughts on the target upgrade height. Thanks for reading.