This design evolved from Design #1 along with feedback from Parity at the XCM workshop.
Summary
- Unordered messaging
- All messages routed through AH
- Off-chain fee estimation
- P→E Fee Asset: WETH
- E→P Fee Asset: ETH
- Relayer rewards for both directions paid out on AH in WETH
Polkadot→Ethereum
Given source parachain $S$, with native token $S^{'}$ and the initial xcm $x_0$ to be executed on $S$.
Step 1: User agent constructs initial XCM
The user agent constructs an initial XCM message $x_0$ that will be executed on S.
The fee amounts in this message should be high enough to enable dry-running, after which they will be lowered.
Step 2: User agent estimates fees
- Given source parachain $S$, with native token $S^{'}$ and the initial xcm $x_0$ to be executed on $S$.
- The native currency $P^{'}$of the Polkadot relay chain, and $E^{'}$ of Ethereum.
- Suppose that the user agent chooses relayer reward $r$ in $E^{'}$.
- Suppose that the exchange rates $K_{P^{'}/S^{'}}$ and $K_{E^{'}/S^{'}}$. The user agent chooses a multiplier to $\beta$ to cover volatility in these rates.