Skip to main content

Fraction

Type Alias Fraction 

Source
pub type Fraction = U68F60;
Expand description

Fixed-point type for _sf (scaled fraction) fields: 68 integer bits, 60 fractional bits.

All on-chain values ending in _sf (e.g. prev_aum_sf, pending_fees_sf) are stored as u128 / PodU128 bit patterns of this type. Convert with Fraction::from_bits(u128_value) and fraction.to_bits().

Aliased Type§

pub struct Fraction { /* private fields */ }