Skip to content

Replace weight argument in xtokens::transfer with max_fee #838

Description

@sander2

Related to #656.

In practice, I believe people just put some arbitrary high amount for the weight in xtokens::transfer. To me it does make sense to have this as an argument at all. Users do not care how much weight is used on the destination chain - it is simply a representation of computation time on the remote chain. As such, it makes more sense to me to either have the weight argument be optional, or to remove it altogether. If not supplied, the code would set the limit to Unlimited.

If anything, users may care about how many fees they pay. So we could consider adding an optional max_fee argument to xtokens::transfer. Note that the BuyExecution instruction takes both a max_fee and a max_weight argument. However, even the use max_fee is dubious. If the fee is insufficient, presumably the transferred tokens get trapped and the user can then recover them using a ClaimAsset instruction. However, the user would still end up paying the fees to pay for execution of this new message..

Interested in hearing your thoughts about this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions