Skip to main content

check_usury

Function check_usury 

Source
pub fn check_usury(
    projected_spend: u64,
    budget: u64,
    overage_percent: u64,
) -> Result<(), UsuryError>
Expand description

Gate a projected spend against the usury ceiling — Ok(()) while at/under the ceiling, Err(UsuryError) once it is breached. The fiduciary circuit-breaker an agent’s resource declaration is checked through before the spend is admitted.