XRPL Hooks Fees Overview
XRPL Hooks add smart contract functionality directly to the XRP Ledger at layer one. Unlike Ethereum's unpredictable gas fees, XRPL Hooks fees follow a deterministic model that keeps costs low and predictable for developers and users alike.
Hooks are small, efficient WebAssembly modules defined on an XRPL account, allowing custom logic to execute before and/or after XRPL transactions. The XRP Ledger is recognized for its transaction throughput, speed, and consistently low fees — and Hooks maintain this reputation by design.


The fee model for Hooks consists of three main components: execution fees charged per WebAssembly instruction, deployment fees for SetHook transactions, and emitted transaction fees for hooks that trigger automatic transfers. Each component is calculated deterministically, ensuring developers can accurately predict costs before submitting transactions to the ledger.
Hook execution fees are charged at 1 drop per WebAssembly instruction in the worst-case execution path, making costs transparent and predictable.
Because Hooks are deliberately not Turing-complete, the XRP Ledger can always calculate the maximum possible fee before execution. This guarantees that no Hook can run indefinitely or consume unbounded resources — a key advantage over gas-based systems where costs can spike unpredictably during network congestion.
All transactions involving Hooks should be run through the updated fee RPC call before submission to ensure accurate fee estimation. This is especially important for transactions that interact with accounts that have multiple Hooks installed.
