1 of 12

Market-Based Adjusting Cross-Chain Fee System

Wang Pengfei

2 of 12

Content Outline

Overview of the cross-chain fee mechanism

Introduce the current common cross-chain fee model and explain their importance.

Market-based �fee adjusting

�Describes the cross-chain fee design used by the Darwinia team, and the specific implementation strategy.

Combine the �cross-chain model with fee market

�The changes brought about by combining the fee-market mechanism with the cross-chain model.

3 of 12

Cross-Chain Message Model

Cross-chain �message process:

    • The user sends cross-chain transactions to the source chain �and pays a cross-chain fee. The fee �is calculated by the fee-calculator module of the source chain.
    • The bridge monitors the cross-chain message and sends a delivery transaction to the target chain with the cross-chain information.
    • Once the cross-chain message has been executed in the target chain, �the bridge needs to send a confirmation transaction to the source chain indicating that the transaction has crossed the chain successfully.

USER

BRIDGER

FEE CALCULATOR

MESSAGE QUOTE

EXECUTIVE ENGINE

Pay cross-chain fee

Send cross-chain message tx

source chain

target chain

delivery message

confirm message

FEE CALULATOR

Cross-chain fee = send message fee + delivery fee �+ confirm fee + bridger reward

4 of 12

Fee �Calculation

The fees paid by the user must include the bridger expenses:

    • The cost of delivering message at the target chain
    • The cost of confirming message at the target chain
    • Extra reward to incentive bridger at the source chain

Cross-chain fee contain 4 parts:

The cost of sending message

The cost of delivering message

The cost of confirming message

An extra reward to the bridger work

5 of 12

The Challenges

The fee-calculator should take into account the �token conversion between the source and target chains when calculating the cross-chain fees.

The fee-calculator needs to be able to quickly customize the way fees are calculated, since different chains calculate fees differently.

Using a simplified or general method to calculate cross-chain costs. Simplicity and general minimizes the chances of errors.

Design more motivating incentive schemes for bridges. �The better the incentive, the more bridgers will be running, and the more reliable the delivery service �will be.

6 of 12

Market-based �fee adjusting

7 of 12

Fee �Calculation

    • The fee-market module encapsulates the cross-chain fee calculation, and the user only needs to pay the fee generated by the fee-market module.

Cross-chain fee only 1 part:

The cost of sending message

The cost of delivering message

The cost of confirming message

An extra reward to the bridger work

The fee provided by the fee-market module

8 of 12

Fee �Calculation

Fee Market generate �its fees:

    • First, the bridgers lock its asset �and submit its own delivery message price(fees).
    • Fee market collects bridgers' delivery message prices(fees), then picks one based on specific rules.

Bridger1 ⇒ Price1

Bridger2 ⇒ Price2

Bridger3 ⇒ Price3

Bridger4 ⇒ Price4

Price

Rule 1

Or

Bridger1 ⇒ Price1

Bridger2 ⇒ Price2

Bridger3 ⇒ Price3

Bridger4 ⇒ Price4

Rule 2

Price

market_fee

Market fee generation

1. register

2. Submit price

bridger1

bridger2

…..

9 of 12

Darwinia�Tiered Quotation Market Rule

    • Collect fees from bridgers, at least 3, otherwise no market fee can be provided and wait for more bridger to participate.

    • Select the third one as the market fee.

    • Selected relayers are responsible for delivering message and will be penalized if failed.

Bridger1 ⇒ Price1

Bridger2 ⇒ Price2

Bridger3 ⇒ Price3

Bridger4 ⇒ Price4

That’s the current market fee

P4 < p3 < p2 < P1

Darwinia fee market rule

Choose the first 3 value

Sort

10 of 12

Combine the cross-chain model with �fee market

    • Replace fee-calculator with �Fee market.
    • The user pays the cross-chain �fees generated by the fee market.

USER

BRIDGER

FEE CALCULATOR

MESSAGE QUOTE

EXECUTIVE ENGINE

Pay cross-chain fee

1. Send cross-chain message tx

delivery message

confirm message

FEE MARKET

Cross-chain fee = market fee

Chain A

Chain B

11 of 12

The advantage

The cross-chain fees paid by users are regulated by the market. The bridgers and users constitute a secondary supply-and-demand market, where prices rise when supply is low and fall when supply is abundant.

More scalable, FeeMarket can be customized with more strategies to generate market fees.

Changing complex cross-chain cost calculations from on-chain to market behavior, without token conversion.

12 of 12

Thank you.