# SetFee

[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/Change.cpp)

A `SetFee` [pseudo-transaction](/docs/references/protocol/transactions/pseudo-transaction-types) marks a change in [transaction cost](/docs/concepts/transactions/transaction-cost) or [reserve requirements](/docs/concepts/accounts/reserves) as a result of [fee voting](/docs/concepts/consensus-protocol/fee-voting).

You cannot send a pseudo-transaction, but you may find one when processing ledgers.

## Example  JSON

This transaction has two formats, depending on whether the [XRPFees amendment](/resources/known-amendments#xrpfees) was enabled at the time:

Current Format

```json
{
    "Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
    "BaseFeeDrops": "10",
    "Fee": "0",
    "LedgerSequence": 92508417,
    "ReserveBaseDrops": "1000000",
    "ReserveIncrementDrops": "200000",
    "Sequence": 0,
    "SigningPubKey": "",
    "TransactionType": "SetFee",
    "date": 786494751,
    "ledger_index": 92508417
}
```

Legacy Format

```json
{
    "Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
    "BaseFee": "000000000000000A",
    "Fee": "0",
    "ReferenceFeeUnits": 10,
    "ReserveBase": 20000000,
    "ReserveIncrement": 5000000,
    "Sequence": 0,
    "SigningPubKey": "",
    "TransactionType": "SetFee",
    "date": 439578860,
    "hash": "1C15FEA3E1D50F96B6598607FC773FF1F6E0125F30160144BE0C5CBC52F5151B",
    "ledger_index": 3721729,
}
```

##  Fields

In addition to the [common fields](/docs/references/protocol/transactions/pseudo-transaction-types),  pseudo-transactions use the following fields:

##  Fields

The fields of a SetFee pseudo-transaction depend on whether the [XRPFees amendment](/resources/known-amendments#xrpfees) was enabled at the time. In addition to the [common fields](/docs/references/protocol/transactions/pseudo-transaction-types), they can use the following:

Current Format
| Field | JSON Type | [Internal Type](/docs/references/protocol/binary-format) | Description |
|  --- | --- | --- | --- |
| `BaseFeeDrops` | String | Amount | The charge, in drops of XRP, for the reference transaction. (This is the [transaction cost](/docs/concepts/transactions/transaction-cost) before scaling for load.) |
| `ReserveBaseDrops` | String | Amount | The base reserve, in drops. |
| `ReserveIncrementDrops` | String | Amount | The incremental reserve, in drops. |
| `LedgerSequence` | Number | UInt32 | *(Omitted for some historical `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. |


Legacy Format
| Field | JSON Type | [Internal Type](/docs/references/protocol/binary-format) | Description |
|  --- | --- | --- | --- |
| `BaseFee` | String | UInt64 | The charge, in drops of XRP, for the reference transaction, as hex. (This is the [transaction cost](/docs/concepts/transactions/transaction-cost) before scaling for load.) |
| `ReferenceFeeUnits` | Number | UInt32 | The cost, in fee units, of the reference transaction. |
| `ReserveBase` | Number | UInt32 | The base reserve, in drops. |
| `ReserveIncrement` | Number | UInt32 | The incremental reserve, in drops |
| `LedgerSequence` | Number | UInt32 | *(Omitted for some historical `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. |


Note
In the full history of the XRP Ledger, there is an exception to the rule that transaction hashes are unique. Two early [SetFee pseudo-transactions](/docs/references/protocol/transactions/pseudo-transaction-types/setfee) had the exact same fields, resulting in the same hash, `1C15FEA3E1D50F96B6598607FC773FF1F6E0125F30160144BE0C5CBC52F5151B`. The first of these transactions appears [in ledger 3715073](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs2.ripple.com%2F&req=%7B%22id%22%3A%22setfee_nonunique_hash_1%22%2C%22command%22%3A%22transaction_entry%22%2C%22tx_hash%22%3A%221C15FEA3E1D50F96B6598607FC773FF1F6E0125F30160144BE0C5CBC52F5151B%22%2C%22ledger_index%22%3A3715073%7D) and the second is [in ledger 3721729](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs2.ripple.com%2F&req=%7B%22id%22%3A%22setfee_nonunique_hash_1%22%2C%22command%22%3A%22transaction_entry%22%2C%22tx_hash%22%3A%221C15FEA3E1D50F96B6598607FC773FF1F6E0125F30160144BE0C5CBC52F5151B%22%2C%22ledger_index%22%3A3721729%7D). Newer SetFee pseudo-transactions include a `LedgerSequence` field so that they are guaranteed to be unique.