Fees and weight

Status: on Arctic. A flat fee for every payment is planned.

Weight

A block is bounded by its weight, not its size. A kept byte weighs 16 and a witness byte weighs 1, and a block weighs at most 32,000,000. So a block keeps at most 2 MB, however much witness it carries, and its raw size is at most 32 MB. Only Styx transactions have witness bytes. Any other transaction weighs 16 times its size, so for blocks without Styx the weight limit is the old size limit.

A transaction's virtual size, vsize, is its weight divided by 16, rounded up. Fees and node policy count vsize, so a witness byte costs a sixteenth of a kept byte.

The fee

A Styx transaction pays

\[ \text{fee} = \text{5,000} \times \max\left(2,\ \text{logical actions},\ \left\lceil \frac{\text{vsize}}{700} \right\rceil\right) \text{ zatoshis}, \]

where the logical actions are ZIP 317's, counted on the transparent parts, plus the Zuring bundle's actions. It's ZIP 317's rule with a byte term, so first contacts and backups pay for their bytes. A node's mempool refuses a Styx transaction that pays less.

For the three common payments:

PaymentvsizeUnitsFee, in zatoshis
On an open channel1,334210,000
Opening a channel2,424420,000
Opening a channel, with a backup3,481525,000

A payment on an open channel pays for its two actions. A first contact's 1,090 kept bytes push the byte term past the action count.

A flat fee (planned)

With one shape for every payment, every payment would weigh the same and pay one fee, all of it checked by consensus. It isn't built.