Skip to content

Leader Aware Tip & Fee Sizing

Every transaction Zephyr sends pays two things: a tip and a priority fee. Both affect whether you get included, but which one weighs more depends on the upcoming slot leader: some weigh the tip most, others weigh the priority fee most.

Leader aware sizing lets you lean your spend toward whichever lever the upcoming leader weighs most, per slot, instead of paying a flat tip and fee on every transaction.

It is off by default. Turn it on per direction with a [buy.leader_aware] and/or [sell.leader_aware] block.

Two kinds of leader

On every slot both the tip and the fee count toward getting included: a builder includes your transaction based on how profitable it is overall. What changes between leaders is which lever carries more weight.

  • A tip leader weighs the tip most for inclusion and ordering. The priority fee still counts, but it is the smaller factor, so a large fee there buys little.
  • A fee leader weighs the priority fee most. The tip still counts (it adds to the builder's profitability, which decides whether you get in), but it is the smaller factor.

So on a tip leader you lean harder on the tip and ease off the fee; on a fee leader you do the opposite. Neither lever goes to zero, you are just shifting weight toward the one the leader cares about more. Leader aware sizing applies a different multiplier to your tip and fee depending on which kind of leader is coming up.

When to use it

Use it to cut wasted spend without hurting your landing rate: ease the fee down on tip leader slots (where it is the smaller factor but is still paid on every attempt, most of which revert) and put that budget into the tip instead. If you would rather keep one flat tip and fee everywhere, leave it off.

Settings

toml
[buy.leader_aware]
enabled         = true
lookahead_slots = 2
fee_leader_fee_mult = 3.0   # fee leader: boost the fee (the main lever there)
fee_leader_tip_mult = 1.0   # fee leader: keep the tip near its floor
tip_leader_fee_mult = 0.2   # tip leader: ease the fee down (smaller factor here)
tip_leader_tip_mult = 1.5   # tip leader: boost the tip (the main lever there)

[sell.leader_aware]
enabled         = true
lookahead_slots = 2
fee_leader_fee_mult = 3.0
fee_leader_tip_mult = 1.0
tip_leader_fee_mult = 0.2
tip_leader_tip_mult = 1.5

Each multiplier scales your existing dynamic tip or fee. 1.0 means "leave it as is". The names read as <leader>_leader_<lever>_mult, so tip_leader_fee_mult is "on a tip leader, the fee multiplier".

SettingDefaultWhat it does
enabledfalseTurn the feature on for this direction.
lookahead_slots2How many upcoming slots to size for, 0 to 512. Higher reacts sooner, lower is more precise to the slot you land in. See Lookahead slots.
fee_leader_fee_mult1.0Fee on a fee leader. Raise it to compete where the fee weighs most.
fee_leader_tip_mult1.0Tip on a fee leader. Usually 1.0. Lower only if you are sure (see the caution below).
tip_leader_fee_mult1.0Fee on a tip leader. Lower it (below 1.0) to ease off a fee that is the smaller factor there.
tip_leader_tip_mult1.0Tip on a tip leader. Raise it to compete where the tip weighs most.

Buy and sell are tuned separately, so you can run an aggressive buy profile and a calmer sell profile, or only enable one direction.

Lookahead slots

This one is worth understanding, because it controls how well your sizing matches reality.

You do not choose which slot your transaction lands in. Zephyr sends attempts continuously across every builder at the cadence you set with your buy/sell delay (commonly 25 to 50 ms), and any one of them might land in the current slot or a slot or two later depending on propagation and builder timing. So when it sizes a transaction now, it is sizing for a range of slots it could land in, not a single known slot.

lookahead_slots is that range. Zephyr checks the current slot plus the next N, and if any of them is a tip leader, it sizes for a tip leader (boost the tip, ease off the fee). It is a precision versus coverage dial:

  • Higher prepares earlier for an upcoming tip leader, but is less specific to the imminent slot. If it sees a tip leader two slots out and trims the fee, but you actually land on the current fee leader slot, you can miss that fill.
  • Lower is tightly matched to the next slot, but if your transaction lands a slot later on a tip leader, you sized for the wrong one: you overpaid the fee that mattered less there and underpaid the tip that mattered more.

The default of 2 (current slot plus the next two) covers the realistic landing range of a fast fire and forget transaction without reaching into slots you probably will not hit. Tune it up if you find you are landing on tip leader slots you did not size for; tune it down if you are suppressing the fee and missing fee leader fills.

If the window runs past what Zephyr has data for, it falls back to baseline sizing rather than guessing, so a very large value buys you nothing past the cached range (it is capped at 512).

Usage profiles

Pick a starting point that matches your goal, then adjust.

Cost saver (recommended starting point). Keep your tip strong on tip leaders, ease off the fee where it weighs less there, and lean on the fee everywhere else.

toml
fee_leader_fee_mult = 3.0
fee_leader_tip_mult = 1.0
tip_leader_fee_mult = 0.2
tip_leader_tip_mult = 1.5

Conservative. Same idea, smaller spread. Good while you confirm your landing rate holds before pushing harder.

toml
fee_leader_fee_mult = 1.5
fee_leader_tip_mult = 1.0
tip_leader_fee_mult = 0.5
tip_leader_tip_mult = 1.2

Maximum aggression. Boost the dominant lever on each slot, ease off nothing. Lands more, costs more.

toml
fee_leader_fee_mult = 3.0
fee_leader_tip_mult = 1.0
tip_leader_fee_mult = 1.0
tip_leader_tip_mult = 2.0

A good way to tune: start conservative, then push tip_leader_fee_mult lower and fee_leader_fee_mult higher a step at a time, watching that your fills keep landing.

Good to know

  • Boosts can go above your fee_cap / tip_cap. A multiplier above 1.0 is a deliberate override for the slot where that lever wins, so it rides on top of your normal caps. A multiplier below 1.0 always stays under them.
  • Do not starve the tip on fee leader slots. Some builders drop a transaction whose tip is too small (Stellium and Falcon need at least 0.001 SOL). If you set fee_leader_tip_mult below 1.0, make sure your tip still clears those minimums, or you lose those send paths. Your tip_floor is the backstop.
  • It never makes a trade less safe. When Zephyr cannot tell what the upcoming leader is, it falls back to your normal tip and fee with no multiplier. At worst, leader aware does nothing.

Confirm it is working

With log_level = "trace" in [general], each send logs the leader and the multipliers it applied, for example leader jito, fee×0.20, tip×1.50. That line tells you exactly what was used on any trade. (This is a high-volume per-send line, so it lives at trace, not debug.)

Zephyr Docs

Enter the access code to continue.