6

Bitcoin Core displays the fee in a unit of BTC per kilobyte, at least for now. However, block explorers are showing the fee in sats/byte. How do I convert between the two units?

2 Answers 2

5

A transaction’s feerate is a quantity derived from transaction fee over transaction weight. The fee is simply an amount of bitcoin, while the weight indicates the amount of blockspace a transaction takes for confirmation. The transaction weight is usually expressed in vbytes in the context of feerates to align the magnitude of the values with feerates before the activation of segwit.

Feerates in the reference client were original specified in bitcoins per kilobyte [₿/kB]. Since then, the value of Bitcoin has dramatically appreciated and segwit activated replacing the block size limit with a block weight limit. Feerates are commonly expressed as satoshi per vbyte [sat/vB] today. Many Bitcoin Core RPCs use satoshi per kilovbyte for feerates to allow for a three decimal precision while only operating with whole numbers.

The three common feerate units can be easily converted, e.g. to go from [sat/vB] to [₿/kvB], you would calculate:

1 sat/vB
= 1 sat/vB × 1000 vB/kvB
= 1000 sat/kvB × 1/100'000'000 ₿/sat
= 103 × 10-8 ₿/kvB
= 10-5 ₿/kvB
= 1 / 100'000 ₿/kvB

The following table gives the factor to convert from row entry to column entry:

↓ from \ → to sat/vB sat/kvB ₿/kvB
sat/vB  103  10-5
sat/kvB 10–3 10-8
₿/kvB 105 108

The following table gives the operations to convert from row entry to column entry:

↓ from \ → to sat/vB sat/kvB ₿/kvB
sat/vB  × 1000  / 100'000
sat/kvB / 1000 / 100'000'000
₿/kvB × 100'000   × 100'000'000
4

Sats/byte means satoshis per byte and it was the canonical unit for writing transaction fees for a long time. When Segwit was deployed, its transactions used a new fee called sats/vbyte. This answer explains how to convert between bytes and vbytes.

Bitcoin Core uses BTC/kB, also called bitcoins per kilobyte, as a unit in some places. However, some parameters such as minrelaytxfee internally store the fee in sats/kB. To get the sats/kB fee rate, you can just divide the sats/byte value by 1000. One Kilobyte has 1000 bytes (there are other units that measure bytes in powers of 1024, but they are not used by Bitcoin clients).

Similarly, the above procedure can be used to convert sats/vbyte, also known as sats per virtual byte, to sats/vkB - sats per virtual kilobyte.

In order to get the rate in BTC/kB (BTC per kilobyte) from sats/byte, you need to divide the sats/byte value by 100000 (one hundred thousand), because one sat/byte is equal to 0.00001 BTC/kB according to this reddit post.

0

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.