Skip to content
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

Snowbridge V2 - Rewards Pallet #6117

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

claravanstaden
Copy link
Contributor

Description

Adds a rewards pallet, where rewards for relayers will be accumulated. More details in the Snowbridge v2 design: https://github.com/paritytech/polkadot-sdk/blob/master/bridges/snowbridge/docs/v2.md#relayer-rewards

Integration

Since this is a new feature, so it does not affect integration.

Review Notes

TODOs:
[ ] Add deposit from Inbound and Outbound queue.
[ ] Test XCM
[ ] More tests, including integration.

@bkontur
Copy link
Contributor

bkontur commented Oct 18, 2024

We have a similar pallet here: https://github.com/paritytech/polkadot-sdk/tree/master/bridges/modules/relayers for registering relayers (deposits, slashing) and collecting rewards for relayer accounts.

I'm just curious if we could have a single generic pallet for relayers/rewards that could cover both the P/K bridge, the Eth bridge, or any other possible bridge. That would be cool. Essentially, we need to store the same things:

  • Relayer account
  • Reward identifier (for the P/K bridge, we use the kind of lane_id identifier for accumulating rewards; for ETH, I see it uses message_id)
  • Reward (the P/K bridge uses the native token (DOT/KSM), while the ETH bridge uses WETH)

Some good abstraction over the reward identifier to support both, and using xcm::Asset for the reward could potentially cover everything.

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

Successfully merging this pull request may close these issues.

2 participants