pub struct FeeDistributionConfig {
pub treasury_share_bps: u32,
pub burn_share_bps: u32,
pub staker_share_bps: u32,
}Expand description
Fee distribution configuration
Defines how network fees are split between treasury, burn, and staker rewards. All values are in basis points (bps) and must sum to 10000 (100%).
Fields§
Percentage of fees going to treasury (basis points)
Percentage of fees to burn (basis points)
Percentage of fees going to stakers (basis points)
Implementations§
Source§impl FeeDistributionConfig
impl FeeDistributionConfig
Sourcepub fn calculate_distribution(&self, total_fee: u128) -> FeeDistribution
pub fn calculate_distribution(&self, total_fee: u128) -> FeeDistribution
Calculates the distribution amounts for a given fee
Trait Implementations§
Source§impl Clone for FeeDistributionConfig
impl Clone for FeeDistributionConfig
Source§fn clone(&self) -> FeeDistributionConfig
fn clone(&self) -> FeeDistributionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FeeDistributionConfig
impl Debug for FeeDistributionConfig
Source§impl Default for FeeDistributionConfig
impl Default for FeeDistributionConfig
Source§impl<'de> Deserialize<'de> for FeeDistributionConfig
impl<'de> Deserialize<'de> for FeeDistributionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FeeDistributionConfig
impl RefUnwindSafe for FeeDistributionConfig
impl Send for FeeDistributionConfig
impl Sync for FeeDistributionConfig
impl Unpin for FeeDistributionConfig
impl UnsafeUnpin for FeeDistributionConfig
impl UnwindSafe for FeeDistributionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more