polkadot-fellows / runtimes

The various runtimes which make up the core subsystems of networks for which the Fellowship is represented.
GNU General Public License v3.0
133 stars 85 forks source link

[bridges][AHs] Include ExportMessage fees in XCM message from AH to BH #392

Open acatangiu opened 1 month ago

acatangiu commented 1 month ago

XCM execution on Bridge Hub for messages coming from Asset Hub is being paid from AHs sovereign account, requiring periodic top-up of said sovereign account.

We can improve that by including the execution fees in the message (teleport DOT alongside ExportMessage).

vgeddes commented 1 month ago

I think we will do something like this for the Ethereum->BridgeHub flow, mainly so that we don't have to manually rebalance the collected fees.

Specifically:

  1. On Ethereum, user pays ETH along with their message
  2. ETH is locked into SA for AH
  3. Fee is included in message
  4. When delivered to BridgeHub, an XCM is sent to AH to mint the WETH to an SA controlled by the bridge
  5. A mechanism will be added to BridgeHub to allow relayers to claim their WETH reward on AssetHub

Then relayers can use AssetHub DEX to convert the WETH back into DOT if they wish.

With this approach, along with the big refactor we discussed on Element, there won't be a need for this SA rebalancing.

acatangiu commented 1 month ago

Yeah, that sounds good. And this works even for new bridge lanes dedicated to other parachains. Relayer rewards are always minted on AH and claimed through BH (by providing some beneficiary AH address to be credited or similar).