hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
246 stars 279 forks source link

Epic: Non-Native Token IGP Payments #3060

Open yorhodes opened 7 months ago

yorhodes commented 7 months ago

Problem

Currently, the relayer accepts a single native fee asset for interchain gas payment

The (EVM) IGP only supports native value payments. The (EVM) hook interface only supports native value quotes. Any warp route which does not collateralize a native asset implies two different fees associated with a transfer.

The warp route UI also makes this assumption in balance checking and transaction signing

For multihop flows (eg Skip routing) and an improved user experience we would like to modularize this such that one of many whitelisted assets, including eg the one being warped, can be used as the fee asset

Solution

Instead of modifying the hook interface to support token quotes (CW supports this) and handling token approvals to some other IGP contract address, we could modify warp routes to deduct the IGP fee from transfers.

Nice to have

If the new warp routes comply with the existing IGP event interface, Relayers could simply be configured with the warp route address as the IGP and begin to service these warp routes

Also, Warp UI enumerates list of supported fee assets and checks if user holds a sufficient amount of any

### Tasks
- [ ] https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/3437
lazyfuhrer commented 6 months ago

Hey @yorhodes , Can I work on this ?

avious00 commented 4 months ago

@nambrot does https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/2485 fit here?

nambrot commented 4 months ago

Related, but wouldn't say that relevant.