2

The .env file of the Bundler i am setting up has a weird way to set up priorization fees.

I'm used to the Compute_unit_limit and Compute_unit_price variables, setting those up to, lets say, For example, if you send a transaction with a single instruction, which has a compute unit limit of 200,000 and you set your compute unit price to 2.8 lamports per unit. Then you will end up paying a priority fee of 560000 lamports which is (560000 * 10^(-9) =) 0.00056 SOL.

However in the config i am setting up, those 2 variables are named Compute_Limit_Price and Compute_Unit. And in the example provided by the Dapp Dev, those values are set to 1000000 and 2000000, which would give a priorization fee of 20 sols..... What am i missing and what should i put in those variables to have a reasonable priorization fee?

Thanks in advance for your help.

1 Answer 1

1

The unit price is set in micro lamports and 1 lamport = 1e6 micro lamports.
I assume the example value in your env file might be in micro lamport which it will be 0.002 SOL in total.

If you're using Helius shared RPC, you can set minimum total priority fee to 10,000 lamports, or 10,000,000,000 micro lamports to get use of staked connection which is just fine in general.
You can calculate microLamports needed by 10000000000 / [compute_units_required].
Please don't forget to round up the result because floats are not accepted for microLamports param in setComputeUnitPrice instruction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.