Description
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:
- Getting delivery fees from holding during execution
- Estimating delivery fees
- 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
Assignees
Type
Projects
Status
Status