5

Previously, one could use the Fees Sysvar, however this has been deprecated since 1.9. What is the current best practice for getting the current cost of a tx on-chain without an external oracle?

1 Answer 1

2

The Fees sysvar was deprecated because transaction fees will not be deterministic anymore. Originally they were calculated based on the amount of signatures required to complete the transaction.

Now transaction fees are based on signatures provided + an additional fee provided in the transaction for prioritization on the cluster.

They may also include write-lock fees in the future, making the fees non-deterministic which cannot be accessed on-chain.

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.