Skip to content

Reconsider the XDM fee #3405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NingLin-P opened this issue Feb 25, 2025 · 5 comments
Open

Reconsider the XDM fee #3405

NingLin-P opened this issue Feb 25, 2025 · 5 comments

Comments

@NingLin-P
Copy link
Member

The XDM fee is charged from the sender who initiate the XDM on the src chain, the fee consist of:

  • XDM execution fees, the amount is calculated based on the weight used to execute the XDM request/response
  • XDM relay fees, the amount is defined by the channel's fee model, it is hardcoded to 1*SSC at the moment

The XDM execution fee and relay fee are charged for both the XDM request (to the src chain) and the XDM response (to the dst chain) from the sender, so the sender need to pay weight_to_fee * (xdm_req_weight + xdm_resp_weight) + relay_fee * 2 which is more than 2 * SSC per XDM. And the fees are distributed to the operator set of the src/dst chain or the farmer if the src/dst chain is the consensus chain.

Things that we may need to reconsider are:

  • The relay fee amount, 2 *SSC is way too much for an XDM
  • How to distribute the relay fee, currently the XDM is broadcasted and relayed by the consensus chain network, the operator is only responsible for constructing XDM so it seems unfair to give the relay fee to them.
@vedhavyas
Copy link
Contributor

The relay fee amount, 2 *SSC is way too much for an XDM

This will need to be updated. We just 1 SSC as an example but it can be much lower before we push to mainnet. I'll be compiling a list of constants we need to go through in preparation for mainnet hopefully next week.

How to distribute the relay fee, currently the XDM is broadcasted and relayed by the consensus chain network, the operator is only responsible for constructing XDM so it seems unfair to give the relay fee to them.

The fees are distributed to the Operators and on Consensus the block author. It seems fair to give them the rewards since they are the ones who monitored, created proofs and submitted XDM.

I dont see any other actor doing anything else apart from operator to deserve the relay fee.

Other option would to completely remove relay fee but it will not incentivises the the operators/farmers to submit XDMs anymore

open to other suggestions though

@NingLin-P
Copy link
Member Author

I dont see any other actor doing anything else apart from operator to deserve the relay fee.

It is the consensus node (not necessarily a farmer) in the consensus chain network that actually uses their bandwidth to relay the XDM.

@vedhavyas
Copy link
Contributor

My wording might be confusing, but I'm suggesting is the block author get the relay fee in that sense since we only have access to them and they are the ones who included the extrinsic in the block

@NingLin-P
Copy link
Member Author

IIUC in the current implementation, the consensus block author only gets the relay fee when the consensus chain is at one end of the XDM (either the src chain or the dst chain).

For domain -> domain XDM, it is also the consensus network that relays the XDM but the farmer doesn't get the relay fee.

@vedhavyas
Copy link
Contributor

For domain -> domain XDM, it is also the consensus network that relays the XDM but the farmer doesn't get the relay fee.

Fair point since we use consensus network but network itself is not usually owned and consensus nodes will skip them.
Let me think more see if we can have a better fee distribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants