stacks-archive / stacks-transactions-js

The JavaScript library for generating Stacks 2.0 transactions
19 stars 17 forks source link

Implement fee rate estimation #14

Closed yknl closed 4 years ago

yknl commented 4 years ago

Developers should be able to use this library to estimate transaction costs in order to set a fee rate. This should be accomplished using the fee estimate end point on a core node.

stackatron commented 4 years ago

@yknl can you please add some details, test cases, or todos here please.

stackatron commented 4 years ago

@kantai what are your plans for fees in phase 1?

kantai commented 4 years ago

The plan for fees in phase 1 is that transactions will need to just pay minimal fees -- essentially 1 microstack per byte of the transaction.

friedger commented 4 years ago

Why is this only an estimate? Isn't clarity deterministic?

kantai commented 4 years ago

Why is this only an estimate? Isn't clarity deterministic?

Miners are still ultimately deciding which transactions to include in a block based on fee markets. This requires estimation of an appropriate fee for block inclusion.