Prioritization Fees
In the Solana network, blocks can only include a transactions up to a maximum limit of compute resources necessary to process. Submitted transactions can include a prioritization fee to enhance their chances of being included in a block. This is particularly beneficial in situations where network congestion is high or when transacting with highly sought-after account resources (e.g., during a popular NFT mint). Understanding and setting appropriate priority fees is essential due to the fluctuating nature of network conditions on Solana.
getPrioritizationFee
This is an RPC method designed to provide a more straightforward approach for developers and users to gauge the effective priority fee for their transactions based on recent network activity.
Parameters
writableAccounts: Accounts which are considered writable from the perspective of the transaction.
percentiles: The percentiles (0-100) at which to evaluate the prioritization fee. 100th percentile = maximum, 50th = median, etc.
lookbackSlots: The number of recent blocks to consider for calculating the percentile value. Defaults to a maximum value of 150 slots.
Example Json body:
{
"jsonrpc": "2.0",
"id": 1,
"method": "getPrioritizationFee",
"params": {
"writableAccounts": ["EabfmmUuZt9S7SRqquTxVy5drnh2Biy6AtENHCH6cyig",
"6eWQfY5UYWHAWTMWMwrMJutv2vtx62uvxG29awFCHqhu",
"8MGLs1sy6BjnrqrgjMFWRMwUE2CrT3xX6MwUK8A1PEJk",
"4K57AR7vQu9SXMqFLMPwPmq4idWCz1eQB2pSRr9eVKvy",
"ARDViSantp6z6oDcW3ZvciE8GEStcpgpQzRFhtV2XXU9",
"22drD3suAwf2MHW63brem8P1ZcsrHaSkud7mjSTerhDK",
"B1ogNbmMCMfeK7xGyaeQGs7RdiEgArFMe9xn6AzwKkCJ",
"5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1",
"7BTLKmZzTnqebLCNh5GxJoHUfuZ3d8TZGeGpQyeR2R6U",
"3BQNs3uyUMEh3ENnbjQ32XWr3qhLeSVnANtnS4EfXBeb",
"HajscijXiYZRLU6t11ymNCj9xxwN8gafEJFg99YwsHZu",
"GzhqSTtTTbXfGtUkBgVtJq8hSJ4j9v73aDFBDs9bKwKT",
"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX",
"9ueofRFvXGUE5rojbsrGmGEnT7nrS6Jad9SCY15reBCY",
"2u37VVRK4DMyydsS8e3bNYmfbTVa7qfJhHKVTQkon7wo",
"FJxYHvwoPvE5JRVC4dgEvDRpDXa2HAvbetsCuXJXF5SN"],
"percentiles": [0,25,50, 75, 95, 100],
"lookbackSlots": 100
}
}
Example response:
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"percentileToFee": {
"0": 0,
"25": 5,
"50": 55,
"75": 100,
"95": 2000,
"100": 14291,
}
}
}