Ana içeriğe geç

IBC (Inter-Blockchain Communication)

Monolythium supports IBC, enabling trustless cross-chain communication with other Cosmos SDK chains. This allows transferring tokens and data between sovereign blockchains.

Overview

PropertyValue
IBC Versionibc-go v8
Transfer ModuleEnabled
SendEnabled
ReceiveEnabled

What is IBC?

Inter-Blockchain Communication (IBC) is a protocol that allows different blockchains to communicate and transfer tokens between each other in a trustless manner. It's the backbone of the Cosmos ecosystem, enabling interoperability between sovereign chains.

Key Features

  • Trustless: No centralized bridges or custodians
  • Permissionless: Anyone can open channels
  • Secure: Cryptographic verification via light clients
  • Instant Finality: Leverages LythiumBFT's deterministic finality

How IBC Works

Components

  1. Light Clients: Track the state of connected chains, enabling trustless verification of cross-chain messages

  2. Connections: Authenticated communication channels between two chains, built on top of light clients

  3. Channels: Application-specific pathways for transferring data (e.g., token transfers use the transfer port)

  4. Relayers: Off-chain processes that relay packets between chains

IBC Handshake

Establishing an IBC connection requires a multi-step handshake:

Chain A                           Chain B
| |
|-- CreateClient ---------------->|
| |-- CreateClient
|<--------------------------- ConnOpenInit
|-- ConnOpenTry ----------------->|
|<------------------------- ConnOpenAck
|-- ConnOpenConfirm ------------->|
| |
|<----------------------- ChanOpenInit
|-- ChanOpenTry ----------------->|
|<------------------------ ChanOpenAck
|-- ChanOpenConfirm ------------->|
| |
|====== Channel Ready ============|

Token Transfers

Sending Tokens

When you send LYTH to another chain via IBC:

  1. Tokens are locked/escrowed on Monolythium
  2. A packet is created with transfer details
  3. Relayer picks up the packet
  4. Receiving chain mints voucher tokens (e.g., ibc/ABC123...)

Receiving Tokens

When tokens are sent to Monolythium:

  1. Source chain locks/escrows the tokens
  2. Relayer delivers the packet
  3. Monolythium mints voucher tokens representing the original asset

IBC Denominations

IBC tokens have denominations in the format:

ibc/{hash}

Where {hash} is derived from the port and channel path. For example:

ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2

This represents a token that came through a specific channel/port combination.

Current Status

Active Connections

You can view active IBC connections on the Monoscan Explorer.

Establishing New Connections

To connect Monolythium with another chain:

  1. Deploy Light Clients: Create light clients on both chains
  2. Open Connection: Establish an IBC connection
  3. Open Channel: Create a transfer channel
  4. Run Relayer: Operate relayer software to relay packets

Relayer Software

Popular IBC relayers:

RelayerLanguageLink
HermesRustgithub.com/informalsystems/hermes
Go RelayerGogithub.com/cosmos/relayer

Technical Details

Timeouts

IBC transfers have timeout mechanisms:

  • Timeout Height: Block height after which the transfer expires
  • Timeout Timestamp: Unix timestamp after which the transfer expires

If a transfer times out, tokens are refunded to the sender.

Acknowledgements

After a packet is received:

  1. Receiving chain processes the transfer
  2. Acknowledgement packet is created (success or error)
  3. Relayer delivers ack to source chain
  4. Source chain finalizes or reverts the transfer

Security Considerations

  • Light clients must be kept updated
  • Frozen clients indicate potential misbehavior
  • Expired clients need governance proposals to update

API Endpoints

Query IBC state via REST API:

# List channels
GET /ibc/core/channel/v1/channels

# List connections
GET /ibc/core/connection/v1/connections

# List clients
GET /ibc/core/client/v1/client_states

# Transfer parameters
GET /ibc/apps/transfer/v1/params

Best Practices

For Users

  1. Verify Channel: Ensure you're using the correct channel for the destination chain
  2. Check Balances: IBC tokens appear with ibc/ prefix
  3. Allow Time: Transfers typically complete within 30 seconds but may take longer

For Relayer Operators

  1. Monitor Clients: Keep light clients updated
  2. Handle Stuck Packets: Implement retry logic
  3. Gas Management: Ensure sufficient gas on both chains

Troubleshooting

Transfer Stuck

If your transfer appears stuck:

  1. Check if the relayer is operational
  2. Verify the channel state is STATE_OPEN
  3. Check for timeout (refund should occur automatically)

Unknown Denom

If you receive tokens with an unfamiliar ibc/ denom:

  1. Query the denom trace to find the original asset
  2. Use the denom trace endpoint: /ibc/apps/transfer/v1/denom_traces/{hash}

Further Reading