Skip to content

Better delivery fees: PayFees #3434

Closed
@franciscoaguirre

Description

@franciscoaguirre

As you all know, there have been a lot of XCM related issues in Kusama lately. This is because of the new delivery fees not being integrated in the best way to the executor.

There are three problems I can identify:

  1. Getting delivery fees from holding during execution
  2. Estimating delivery fees
  3. Fixing delivery fees for multi-hop messages

For 1. we need a system that's similar to BuyExecution but for delivery fees. We could have an instruction BuyTransport that works in a similar way. You pay once for all delivery fees and can be certain the rest of the execution will succeed.

Something like BuyTransport would work, but I'd like to take this opportunity to not add more must-use instructions that make XCM harder to use. It's already hard enough when people forget a BuyExecution instruction. I think it's worthwhile to pay for these fees transparently.

Different xcm senders can charge different prices, and we can only identify them via calling validate_send, which calls a tuple and each element either returns the price or fails and it tries the next one. These senders validate using the destination. So we need to know the destination of all messages that will be sent beforehand.

My proposal is to gather all destinations beforehand, and buy enough delivery fees for sending whenever we pay for them, be it on a custom instruction or on the first instruction that loads the holding register.

The size of the message is also important, so I suggest we use a worst-case message in case it doesn't increase costs too much.

I'll leave the other two for other issues.

L.E.: XCM RFC for this polkadot-fellows/xcm-format#53

Metadata

Metadata

Labels

I5-enhancementAn additional feature request.T6-XCMThis PR/Issue is related to XCM.

Type

No type

Projects

Status

In-Progress

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions