Module utils

Module utils 

Source
Expand description

Stellar relayer utility functions.

Generic helpers for ledger math, fee slippage, and other reusable logic shared across gas abstraction and related code.

Constants§

DEFAULT_SOROBAN_MAX_FEE_SLIPPAGE_BPS
Default slippage tolerance for max_fee_amount in basis points (500 = 5%). Allows fee fluctuation between quote and execution time.

Functions§

apply_max_fee_slippage
Apply default slippage to max_fee_amount (uses DEFAULT_SOROBAN_MAX_FEE_SLIPPAGE_BPS).
apply_max_fee_slippage_with_bps
Apply slippage tolerance to max_fee_amount for FeeForwarder.
get_expiration_ledger
Calculate the expiration ledger for authorization.