Paying Fees in Reactor
In Reactor, fees are paid on a per message basis by the sender of the message. The cost per message are designed to be fixed based on the destination of the message. For most destinations, the target cost per message is set at $0.10 for most destinations and message types. This price can be adjusted on a per chain basis and is subject to be changed in the future.
Applications are required to pay the gas on the source 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
sendfunction on the Reactor Gateway.- Sending application calls the
ReactorFeeManager’s getSendFee function to get current fee for messages. - Current fee amount of native gas or payment token is transferred from the user to the sending application.
- Sending application calls
ReactorGateway’s send function. - If native gas was used to pay the message fee, any amount above the current fee amount is returned back to the sending application.
- Sending application then transfers any excess native gas back to the user.
- Sending application calls the
-
Fees paid by sending application - The sending application holds a balance of the preferred payment option that gets used when the application calls the
sendfunction on the Reactor Gateway.- Native gas or payment token is transferred to the sending application’s contract that makes the call to
ReactorGateway’s send function. - Sending application either forwards the fee amount of native gas or approves the
ReactorGatewayto transfer the fee amount of the payment token from the contract. - Sending application calls
ReactorGateway’s send function. - If native gas was used to pay the message fee, any amount above the current fee amount is returned back to the sending application.
- Native gas or payment token is transferred to the sending application’s contract that makes the call to
-
Fees paid by pre-funded account — Deposit R Token on the Reactor website . This is the only strategy supported for web-to-chain messages.
- Coming Soon