Skip to main content

minimum_policy_fee

Function minimum_policy_fee 

Source
pub fn minimum_policy_fee(
    virtual_size: PolicyVirtualSize,
    rate: FeeRate,
) -> Result<Dollarydoos, FeePolicyError>
Expand description

Calculate HSD’s minimum policy fee for a virtual size and fee rate.

The multiplication is divided by 1,000 with floor rounding. HSD’s unusual low-value rule is preserved exactly: for nonzero size and rate, a zero quotient returns the entire rate rather than one dollarydoo. Zero size or a zero rate returns zero.