XRPL Hook Execution Fee
Hook execution fees are the most fundamental cost component of running smart contract logic on the XRP Ledger. These fees are charged at a rate of 1 drop per WebAssembly instruction in the worst-case execution of the hook function — or callback (cbak) in the case of a Hook callback.
This means a small Hook that contains a lot of looping logic may end up attracting higher runtime fees than a Hook with more complex branching that terminates early. The worst-case execution path is always used for fee calculation to ensure the XRP Ledger can guarantee completion without resource exhaustion.


When Hooks are strongly executed, the originating transaction must pay for all Strong Executions as part of the transaction fee. There may be as many as 4 strong Hooks on the sending account and 4 on the receiving account, meaning a single transaction could trigger up to 8 Hook executions — all paid by the transaction originator.
Strong hook executions must be paid for by the transaction originator — up to 4 hooks on the sender and 4 on the receiver, totaling 8 potential executions per transaction.
For developers building on XRPL, it is highly recommended that all transactions be run through the updated fee RPC call before submission. This RPC call computes the exact fee required based on the specific Hooks installed on all accounts involved in the transaction, ensuring no transaction fails due to insufficient fees.
To use the fee estimation RPC, open a WebSocket connection to a Hooks-enabled node, compose the serialized transaction with an empty signing key, then submit it to the fee endpoint. The response provides the precise base fee including all Hook execution costs.
