Skip to content

[Question] where does the fund of the rewards_account comes from? #2113

@boundless-forest

Description

@boundless-forest
pub struct PayRewardFromAccount<T, Relayer>(PhantomData<(T, Relayer)>);

impl<T, Relayer> PayRewardFromAccount<T, Relayer>
where
	Relayer: Decode + Encode,
{
	/// Return account that pays rewards based on the provided parameters.
	pub fn rewards_account(params: RewardsAccountParams) -> Relayer {
		params.into_sub_account_truncating(b"rewards-account")  // here
	}
}

There was a relayer_acount which was very similar to the rewards_account in the latest version. The user pays the cross-chain message fee to the relayer account when sending a message, after the message delivery proof is submitted to the source chain, this account pays the rewards to the message relayer and the confirmation relayer.

In the current code, I find that the repayer pallet are responsible for paying rewards with the rewards_account, this is the same with previous version. but I did not find where the fund of this account comes from. I guess the cross-chain fee might could be charged in the XCM layer or executor. If so, the rewards_account should be injected or configured in somewhere at runtime, but I have not found it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions