You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Agreed. The weight parameter was designed when there was no way to specify it as unlimited. I think it's time to move on and make it an optional weight_limit. For most cases, front-end apps can pass none to indicate unlimited. In the case similar to limited_reserve_transfer_assets in pallet-xcm, some weight limit can be provided.
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 theweight
argument be optional, or to remove it altogether. If not supplied, the code would set the limit toUnlimited
.If anything, users may care about how many fees they pay. So we could consider adding an optional
max_fee
argument toxtokens::transfer
. Note that theBuyExecution
instruction takes both a max_fee and a max_weight argument. However, even the usemax_fee
is dubious. If the fee is insufficient, presumably the transferred tokens get trapped and the user can then recover them using aClaimAsset
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.
The text was updated successfully, but these errors were encountered: