Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hermes ft-transfer accepts mismatching arguments #869

Closed
5 tasks done
adizere opened this issue Apr 28, 2021 · 0 comments · Fixed by #870
Closed
5 tasks done

Hermes ft-transfer accepts mismatching arguments #869

adizere opened this issue Apr 28, 2021 · 0 comments · Fixed by #870
Assignees
Labels
A: bug Admin: something isn't working E: gravity External: related to Gravity DEX I: CLI Internal: related to the relayer's CLI
Milestone

Comments

@adizere
Copy link
Member

adizere commented Apr 28, 2021

Many thanks to Jeseon Lee for reporting this bug!

Crate

ibc-relayer-cli

Summary of Bug

The command hermes tx raw ft-transfer ibc-2 ibc-0 transfer channel-0 9999 10000 -n1 -d stake never verifies that the arguments are coherent, and blindly constructs a PacketRecv even if the arguments mismatch. Concretely, the channel-port tuple transfer channel-0 which is supposedly hosted on chain ibc-0 should provide a path to chain ibc-2, but this is never verified. The channel channel-0 might be serving a path to another chain.

Version

0.2.0

Steps to Reproduce

./scripts/dev-env ~/.hermes/config.toml ibc-0 ibc-1 ibc-2
hermes create channel ibc-0 ibc-1 --port-a transfer --port-b transfer
hermes create channel ibc-0 ibc-2 --port-a transfer --port-b transfer
hermes create channel ibc-1 ibc-2 --port-a transfer --port-b transfer


# Now in order to transfer from source chain ibc-0 to dest. ibc-2 
# we should specify channel-1 on source chain. If we give channel-0 the 
# command shouldn't work because this channel is a path to ibc-1 (not ibc-2).
hermes tx raw ft-transfer ibc-2 ibc-0 transfer channel-0 9999 10000 -n1 -d stake
# The above command produces a PacketRecv destined to chain ibc-1 instead of ibc-2

Acceptance Criteria

Error should be returned in case of mismatching ft-transfer arguments.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere adizere added A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI labels Apr 28, 2021
@adizere adizere added this to the 04.2021 milestone Apr 28, 2021
@adizere adizere self-assigned this Apr 28, 2021
@romac romac added the E: gravity External: related to Gravity DEX label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working E: gravity External: related to Gravity DEX I: CLI Internal: related to the relayer's CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants