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

docs: Path unwinding and forwarding requirements #6027

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

womensrights
Copy link
Contributor

@womensrights womensrights commented Mar 20, 2024

Description

This pr details the token path unwinding and token forwarding requirements document


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

Summary by CodeRabbit

  • New Features
    • Enhanced fungible token transfers by implementing path unwinding and token forwarding in the context of inter-blockchain communication (IBC), automating route determination and enabling token forwarding to other chains to simplify processes for end users.

Copy link
Contributor

coderabbitai bot commented Mar 20, 2024

Walkthrough

The recent update enhances the inter-blockchain communication (IBC) system by automating path unwinding and token forwarding for fungible tokens. This streamlines token transfers across blockchains, automatically finding optimal routes and enabling token forwarding to improve user experience.

Changes

File Path Change Summary
docs/requirements/path-unwinding-forwarding -requirements.md Introduces path unwinding and token forwarding for fungible tokens in cross-chain transfers. Simplifies token transfers by automating route determination and enabling token forwarding to enhance user experience.

"In the world of chains and blocks so vast,
A rabbit hopped, making paths unsurpassed.
🌟 From chain to chain, it danced with glee,
Unwinding paths, setting tokens free.
Forwarding on, without a pause or rest,
Ensuring your tokens find the best nest.
🚀 To the moon, with ease, we now can hop,
Thanks to the rabbit, we won't stop."
🐰💫


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9276186 and 50e4663.
Files selected for processing (1)
  • docs/requirements/path-unwinding-forwarding -requirements.md (1 hunks)
Files not reviewed due to errors (1)
  • docs/requirements/path-unwinding-forwarding-requirements.md (no review received)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e69a833 and f7fd161.
Files selected for processing (1)
  • docs/requirements/path-unwinding-forwarding -requirements.md (1 hunks)
Files not reviewed due to errors (1)
  • docs/requirements/path-unwinding-forwarding-requirements.md (no review received)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f7fd161 and b741e49.
Files selected for processing (1)
  • docs/requirements/path-unwinding-forwarding -requirements.md (1 hunks)
Files not reviewed due to errors (1)
  • docs/requirements/path-unwinding-forwarding-requirements.md (no review received)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b741e49 and 9276186.
Files selected for processing (1)
  • docs/requirements/path-unwinding-forwarding -requirements.md (1 hunks)
Files not reviewed due to errors (1)
  • docs/requirements/path-unwinding-forwarding-requirements.md (no review received)

3. The feature will have no impact on the existing function of a typical ICS-20 transfer where a native token is sent to another chain.
4. Fees will be treated the same as with other IBC applications.
5. The functionality to enable a specific action before forwarding is not in scope of these requirements.
6. If a transfer contains multiple unique tokens, the unwinding functionality only needs to support a single denom, i.e. if there is a transfer containing a native token and 1 hop denom being sent from source to destination, unwinding should support unwinding the 1 hop denom and sending the native token directly to the destination. Support for transfer and unwind for native token and 2+ 1 hop denoms is not required.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking if I understood this correctly:

  • If the transfer contains more than one denom (native and/or with >1 hops) and the user wants to do unwinding + forwarding, should we return an error and let the user know that the transfer should include only one denom?
  • If the transfer contains more than one denom (native and/or with >1 hops) and the user wants to do forwarding, should we just forward all denoms through the same forwarding path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies for the delay, completely missed the notification

My thinking is that we want to be able to support the use case of transfer + supply liquidity and typically pools are 2 sided, maybe we could stretch to 3 asset pools but I think 2 asset pools should be sufficient to support initially. Therefore what I was hoping is that if you are on chain A, with token A and token C going to chain B, you would be able to send A and C to B, but C will route back from A -> C -> B so when it arrives it is still a 1 hop denom. I was hoping that you would be able to specify the forwarding path for up to 2 denoms but more its likely getting quite chaotic and messy I would assume and you only really need 2 typically for transfer + supply liquidity.

so in case 1, it should be ok with up to 2 different denoms.
case 2, the forwarding path should be specified per denom

happy to make some changes to clarify this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants