Function apply_max_fee_slippage_with_bps

Source
pub fn apply_max_fee_slippage_with_bps(
    fee_in_token: u64,
    slippage_bps: u64,
) -> i128
Expand description

Apply slippage tolerance to max_fee_amount for FeeForwarder.

The FeeForwarder contract has separate fee_amount (what relayer charges at execution) and max_fee_amount (user’s authorized ceiling). Setting them equal means no room for fee fluctuation between quote and execution. This function applies a slippage buffer to allow for price movement.

§Arguments

§Returns

The max_fee_amount with slippage buffer applied as i128