{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["source-link","admonition","tabs","tab","partial","amendment-disclaimer"]},"type":"markdown"},"seo":{"title":"SetFee","siteUrl":"https://opensource.ripple.com","meta":[{"name":"google-site-verification","content":"bLwyBi1imklcIuQxZ7JeI_kRF5Mg7yfr6arpEQV2nsE"}],"description":"Change global reserve and transaction cost settings."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"setfee","__idx":0},"children":["SetFee"]},{"$$mdtype":"Tag","name":"SourceLink","attributes":{"path":"src/libxrpl/tx/transactors/system/Change.cpp","xrpld_release":"release/3.4.x"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SetFee"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/pseudo-transaction-types"},"children":["pseudo-transaction"]}," marks a change in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/concepts/transactions/transaction-cost"},"children":["transaction cost"]}," or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/concepts/accounts/reserves"},"children":["reserve requirements"]}," as a result of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/xls-100-smart-escrows/concepts/fee-voting"},"children":["fee voting"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":["You cannot send a pseudo-transaction, but you may find one when processing ledgers."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-setfee-json","__idx":1},"children":["Example ","SetFee"," JSON"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This transaction has two formats, depending on whether the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/resources/known-amendments#xrpfees"},"children":["XRPFees amendment"]}," was enabled at the time:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Current Format","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"Account\": \"rrrrrrrrrrrrrrrrrrrrrhoLvTp\",\n    \"BaseFeeDrops\": \"10\",\n    \"Fee\": \"0\",\n    \"LedgerSequence\": 92508417,\n    \"ReserveBaseDrops\": \"1000000\",\n    \"ReserveIncrementDrops\": \"200000\",\n    \"Sequence\": 0,\n    \"SigningPubKey\": \"\",\n    \"TransactionType\": \"SetFee\",\n    \"date\": 786494751,\n    \"ledger_index\": 92508417\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Legacy Format","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"Account\": \"rrrrrrrrrrrrrrrrrrrrrhoLvTp\",\n    \"BaseFee\": \"000000000000000A\",\n    \"Fee\": \"0\",\n    \"ReferenceFeeUnits\": 10,\n    \"ReserveBase\": 20000000,\n    \"ReserveIncrement\": 5000000,\n    \"Sequence\": 0,\n    \"SigningPubKey\": \"\",\n    \"TransactionType\": \"SetFee\",\n    \"date\": 439578860,\n    \"hash\": \"1C15FEA3E1D50F96B6598607FC773FF1F6E0125F30160144BE0C5CBC52F5151B\",\n    \"ledger_index\": 3721729,\n}\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setfee-fields","__idx":2},"children":["SetFee"," Fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/pseudo-transaction-types"},"children":["common fields"]},", ","SetFee"," pseudo-transactions use the following fields:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setfee-fields-1","__idx":3},"children":["SetFee"," Fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The fields of a SetFee pseudo-transaction depend on whether the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/resources/known-amendments#xrpfees"},"children":["XRPFees amendment"]}," was enabled at the time. In addition to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/references/protocol/transactions/pseudo-transaction-types"},"children":["common fields"]},", they can use the following:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Current Format","disable":false},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"JSON Type"},"children":["JSON Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Internal Type"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/references/protocol/binary-format/"},"children":["Internal Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BaseFeeDrops"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Amount"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The charge, in drops of XRP, for the reference transaction. (This is the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/concepts/transactions/transaction-cost"},"children":["transaction cost"]}," before scaling for load.)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BytecodeSizeLimit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(Omitted from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SetFee"]}," pseudo-transactions before the SmartEscrow amendment)"]}," The maximum size, in bytes, of a WASM smart function, such as the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bytecode"]}," field of a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/xls-100-smart-escrows/concepts/programmability"},"children":["smart escrow"]},". ",{"$$mdtype":"Tag","name":"AmendmentDisclaimer","attributes":{"name":"SmartEscrow","compact":false,"statusOnly":false,"mode":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GasLimit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(Omitted from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SetFee"]}," pseudo-transactions before the SmartEscrow amendment)"]}," The maximum amount of gas that can be consumed by ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/xls-100-smart-escrows/concepts/programmability"},"children":["smart functions"]}," in a single transaction. Gas is a measure of the resources (including CPU and memory) used by smart function code, defined by the WASM engine. ",{"$$mdtype":"Tag","name":"AmendmentDisclaimer","attributes":{"name":"SmartEscrow","compact":false,"statusOnly":false,"mode":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GasPrice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(Omitted from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SetFee"]}," pseudo-transactions before the SmartEscrow amendment)"]},"  The cost of gas, in millionths of a drop of XRP per 1 gas. In other words, a value of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000000"]}," (1 million) means that 1 gas costs 0.000001 decimal XRP. ",{"$$mdtype":"Tag","name":"AmendmentDisclaimer","attributes":{"name":"SmartEscrow","compact":false,"statusOnly":false,"mode":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LedgerSequence"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(Omitted for some historical ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SetFee"]}," pseudo-transactions)"]}," The index of the ledger version where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReserveBaseDrops"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Amount"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The base reserve, in drops."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReserveIncrementDrops"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Amount"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The incremental reserve, in drops."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Legacy Format","disable":false},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"JSON Type"},"children":["JSON Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Internal Type"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/references/protocol/binary-format/"},"children":["Internal Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BaseFee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt64"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The charge, in drops of XRP, for the reference transaction, as hex. (This is the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://xrpl.org/docs/concepts/transactions/transaction-cost"},"children":["transaction cost"]}," before scaling for load.)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReferenceFeeUnits"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The cost, in fee units, of the reference transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReserveBase"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The base reserve, in drops."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReserveIncrement"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The incremental reserve, in drops"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LedgerSequence"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["UInt32"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(Omitted for some historical ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SetFee"]}," pseudo-transactions)"]}," The index of the ledger version where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change."]}]}]}]}]}]}]}]},"headings":[{"value":"SetFee","id":"setfee","depth":1},{"value":"Example SetFee JSON","id":"example-setfee-json","depth":2},{"value":"SetFee Fields","id":"setfee-fields","depth":2},{"value":"SetFee Fields","id":"setfee-fields-1","depth":2}],"frontmatter":{"seo":{"description":"Change global reserve and transaction cost settings.","title":"SetFee"},"labels":["Fees"]},"editPage":{"to":"https://github.com/ripple/opensource.ripple.com/tree/main/docs/xls-100-smart-escrows/references/setfee.md"},"lastModified":"2026-09-25T18:36:46.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/xls-100-smart-escrows/references/setfee","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}