Skip to main content

compute_token_pool_paid_shielded_fee

Function compute_token_pool_paid_shielded_fee 

Source
pub fn compute_token_pool_paid_shielded_fee(
    token_actions: usize,
    fee_actions: usize,
    extra_storage_bytes: u64,
    platform_version: &PlatformVersion,
) -> Result<Credits, ProtocolError>
Expand description

Computes the fee of an identity-less token pool transition (in credits): two bundles are verified and stored, so it is compute_minimum_shielded_fee of the fee bundle PLUS the same base for the token bundle, plus extra_storage_bytes of flat per-transition storage priced at the storage rate (the balance items the transition writes outside the pools).

The fee bundle’s value balance must equal this exactly (plus the agreed price for a purchase); the SDK builders and the minimum-fee validation both use it.