Over the last weeks, we’ve seen a bunch of xcm-related bugs on Kusama and Polkadot because of the addition of delivery fees.
Discussions have been going around for integrating delivery fees better in the XCM format itself, making sure these types of issues are fixed once and for all.
In the spirit of Improve XCM development and release process , I opened an RFC in the XCM format repository where we can discuss a solution.
paritytech:master
← franciscoaguirre:pay-fees-instruction
opened 04:42PM - 01 Mar 24 UTC
XCM already handles execution fees in an effective and efficient manner using th… e `BuyExecution` instruction.
However, other types of fees are not handled as effectively -- for example, delivery fees.
Fees exist that can't be measured using `Weight` -- as execution fees can -- so a new method should be thought up for those cases.
This RFC proposes making the fee handling system simpler and more general, by doing two things:
- Adding a `fees` register
- Replacing `BuyExecution` with a new instruction `PayFees` with new semantics
This new instruction only takes the amount of fees that the XCVM can use from the holding register.
The XCVM implementation is free to use these fees to pay for execution fees, transport fees, or any other type of fee that might be necessary.
This moves the specifics of fees further away from the XCM standard, and more into the actual underlying XCVM implementation, which is a good thing.
I invite everyone to participate.
4 Likes