FeeratePerKw

Companion:
class
Source:
Feerates.scala
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
Source:
Mirror.scala

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

Value members

Concrete methods

def apply(feeratePerKB: FeeratePerKB): FeeratePerKw
def apply(feeratePerByte: FeeratePerByte): FeeratePerKw

Concrete fields

Why 253 and not 250 since feerate-per-kw should be feerate-per-kvb / 4 and the minimum relay fee rate is 1000 satoshi/kvb (see MinimumRelayFeeRate)?

Why 253 and not 250 since feerate-per-kw should be feerate-per-kvb / 4 and the minimum relay fee rate is 1000 satoshi/kvb (see MinimumRelayFeeRate)?

Because Bitcoin Core uses neither the actual tx size in bytes nor the tx weight to check fees, but a "virtual size" which is (3 + weight) / 4. So we want: fee > 1000 * virtual size feerate-per-kw * weight > 1000 * (3 + weight / 4) feerate-per-kw > 250 + 3000 / (4 * weight)

With a conservative minimum weight of 400, assuming the result of the division may be rounded up and using strict inequality to err on the side of safety, we get: feerate-per-kw > 252 hence feerate-per-kw >= 253

See also https://github.com/ElementsProject/lightning/pull/1251

Source:
Feerates.scala

Minimum relay fee rate in satoshi per kilo-vbyte (taken from Bitcoin Core). Note that Bitcoin Core uses a virtual size and not the actual size in bytes: see MinimumFeeratePerKw below.

Minimum relay fee rate in satoshi per kilo-vbyte (taken from Bitcoin Core). Note that Bitcoin Core uses a virtual size and not the actual size in bytes: see MinimumFeeratePerKw below.

Source:
Feerates.scala