At the moment there is no way to figure out average fees via RPC call to land transactions. Without it it is really hard to land transactions and its easy to over or underpay without that information.
The getRecentPrioritizationFees is not sufficient. For the loaded program for example it returns
{ prioritizationFee: 0, slot: 298150993 },
but even with 10k micro lamports per CU most of the transactions do not land.
Proposed Solution
Add an RPC that takes a parameter low, average, high and returns the average of the last few blocks.
Problem
At the moment there is no way to figure out average fees via RPC call to land transactions. Without it it is really hard to land transactions and its easy to over or underpay without that information.
The getRecentPrioritizationFees is not sufficient. For the loaded program for example it returns { prioritizationFee: 0, slot: 298150993 }, but even with 10k micro lamports per CU most of the transactions do not land.
Proposed Solution
Add an RPC that takes a parameter low, average, high and returns the average of the last few blocks.
There are some APIs from helius and quick node for example which could be used as reference. https://marketplace.quicknode.com/add-on/solana-priority-fee https://docs.helius.dev/solana-rpc-nodes/priority-fee-api