Skip to Content
Funding Messages

Paying Fees in Reactor

In Reactor, fees are paid on a per message basis by the sender of the message. The cost are designed to be fixed based on the destination of the message. For most chains, the target cost per message is set at $0.10 for most destination chains and message types.

Applications are required to pay the gas on the source chain as well as the Reactor messaging fee. The flat-rate pricing for messages allows for easier budgeting and ensures consistent prices while using Reactor. The Reactor Gateway takes care of determining the message fee, transferring the fee, and refunding the difference when neccessary. Message fees can be paid for using the chain’s native gas, a supported payment token on the chain, or the R Token.


Strategies for funding applications

  • Fees paid by end-user - The sending application transfers fees from the end-user to itself before calling the send function on the Reactor Gateway.

    1. Sending application calls the ReactorFeeManager’s getSendFee function to get current fee for messages.
    2. Current fee amount of native gas or payment token is transferred from the user to the sending application.
    3. Sending application calls ReactorGateway’s send function.
    4. If native gas was used to pay the message fee, any amount above the current fee amount is returned back to the sending application.
    5. Sending application then transfers any excess native gas back to the user.
  • Fees paid by sending application - The sending application holds a balance of the preferred payment option that gets used when the application calls the send function on the Reactor Gateway.

    1. Native gas or payment token is transferred to the sending application’s contract that makes the call to ReactorGateway’s send function.
    2. Sending application either forwards the fee amount of native gas or approves the ReactorGateway to transfer the fee amount of the payment token from the contract.
    3. Sending application calls ReactorGateway’s send function.
    4. If native gas was used to pay the message fee, any amount above the current fee amount is returned back to the sending application.
  • Fees paid by pre-funded account — Deposit R Token on the Reactor website. This is the only strategy supported for web-to-chain messages.

    1. Coming Soon

Last updated on