cumulus icon indicating copy to clipboard operation
cumulus copied to clipboard

Burning fee allowed for system parachain?

Open xlc opened this issue 2 years ago • 3 comments

https://github.com/paritytech/cumulus/blob/66887505e6c5ef89ce9f88fc4ec368eb858b1b92/parachains/runtimes/assets/statemint/src/xcm_config.rs#L314

To my understanding, this will burn all XCM fees.

Two questions:

  • Shouldn't fee be sent to collator?
  • Can system parachain allowed to burn relaychain tokens (without notifying relaychain)? Wouldn't this cause imbalances? i.e. balance mismatch between relaychain's checking account and parachain's total issuance.

xlc avatar Mar 15 '23 00:03 xlc

Yes, I agree

joepetrowski avatar Mar 16 '23 12:03 joepetrowski

Yes, when FeeManager is used, they would be better sent to a proper account.

gavofyork avatar Mar 21 '23 13:03 gavofyork

Talking with Gav, it's best if the fees get accrued in the chain's treasury / a holding account rather than it going to collators. He said the only real question is the degree of aggregation:

  1. No aggregation: use AssetTransactor directly in FeeManager.

  2. Aggregate over XCVM execution: accrue in an XCVM MultiAssets (Holding-like) register and use AssetTransactor to disperse assets at the end of the XCVM execution.

  3. Aggregate over block: accrue in a temporary MultiAssets storage item in pallet-xcm and place assets into accounts via a permissionless transaction (a "task", in the new lexicon) and AssetTransactor.

  4. Aggregate indefinitely: accrue in a permanent MultiAssets storage item in pallet-xcm and allow a specific XCM origin to call ClaimAsset to claim them.

Option 1 is the easiest to implement, so we will do that initially but the others should be implemented eventually.

gilescope avatar Mar 21 '23 13:03 gilescope