Fees' calculation on the TON Blockchain
The Daily TONFees
storage_fees
storage_fees = ceil((account.bits * bit_price + account.cells * cell_price) * period / 2 ^ 16)
in_fwd_fees, out_fwd_fees
msg_fwd_fees = (lump_price + ceil((bit_price * msg.bits + cell_price * msg.cells)/2^16))
ihr_fwd_fees = ceil((msg_fwd_fees * ihr_price_factor)/2^16)
// bits in the root cell of a message are not included in msg.bits (lump_price pays for them)
action_fees
action_fees = sum(out_ext_msg_fwd_fee) + sum(int_msg_mine_fee)
Config file
All fees are nominated in a certain gas amount and may be changed: The config file represents the current fee's cost.
A direct link to the config file
storage_fees = p18