No Channel Handshakes, New Packet Format and Encoding Support
- IBC v2 does not establish connection between applications with a channel handshake. Channel identifiers represent Client IDs and are included in the
Payload
- The source and destination port must be
"transfer"
- The channel IDs must be valid client IDs of the format
{clientID}-{sequence}
, e.g. 08-wasm-007
- The source and destination port must be
- The
Payload
contains theFungibleTokenPacketData
for a token transfer.
Payload
struct.
Payload
bytes for token transfer
Base Denoms cannot contain slashes
With the newDenom
struct, the base denom, i.e. uatom, is seperated from the trace - the path the token has travelled. The trace is presented as an array of Hop
s.
Because IBC v2 no longer uses channels, it is no longer possible to rely on a fixed format for an identifier so using a base denom that contains a ”/” is dissallowed.
Changes to the application module interface
Instead of implementing token transfer forport.IBCModule
, IBC v2 uses the new application interface api.IBCModule
. More information on the interface differences can be found in the application section.
MsgTransfer Entrypoint
TheMsgTransfer
entrypoint has been retained in order to retain support for the common entrypoint integrated in most existing frontends.
If MsgTransfer
is used with a clientID as the msg.SourceChannel
then the handler will automatically use the IBC v2 protocol. It will internally call the MsgSendPacket
endpoint so that the execution flow is the same in the state machine for all IBC v2 packets while still presenting the same endpoint for users.
Of course, we want to still retain support for sending v2 packets on existing channels. The denominations of tokens once they leave the origin chain are prefixed by the port and channel ID in IBC v1. Moreover, the transfer escrow accounts holding the original tokens are generated from the channel IDs. Thus, if we wish to interact these remote tokens using IBC v2, we must still use the v1 channel identifiers that they were originally sent with.
Thus, MsgTransfer
has an additional UseAliasing
boolean field to indicate that we wish to use IBC v2 protocol while still using the old v1 channel identifiers. This enables users to interact with the same tokens, DEX pools, and cross-chain DEFI protocols using the same denominations that they had previously with the IBC v2 protocol. To use the MsgTransfer
with aliasing we can submit the message like so: