Skip to main content
Priority fees affect when a trade executes, not how it executes. They are additional fees paid to Solana validators to increase the likelihood that a transaction is included quickly during periods of network congestion. Higher priority fees improve execution speed. Lower fees reduce cost but may delay execution. Priority fees do not change routing, slippage checks, or trade semantics. They only influence transaction ordering.

How DFlow Handles Priority Fees

DFlow supports two ways to set priority fees:
  • Max Priority Fee
  • Exact Priority Fee
Choose between them based on whether you prefer cost predictability or adaptive execution speed.

Max Priority Fee

Use the Max Priority Fee to allow DFlow to dynamically choose an optimal priority fee, capped at a pre-defined maximum. This approach balances execution speed with cost. DFlow reacts to current network conditions but never exceeds the maximum you set.

How It Works

Specify:
  • A priority level (medium, high, veryHigh).
  • A maximum fee (maxLamports).
DFlow selects the lowest fee likely to achieve the requested priority, capped by your maximum. If no priority fee parameters are provided, DFlow defaults to automatic priority fees capped at 0.005 SOL.

When Max Priority Fee Makes Sense

Use Max Priority Fee when:
  • Execution speed matters.
  • Network conditions are unpredictable.
  • You want protection against overpaying during congestion.
This is the recommended default for most user-facing trading flows.

Exact Priority Fee

Exact Priority Fee uses a fixed fee amount for every trade. DFlow applies the specified fee regardless of network conditions. No adjustments are made.

How It Works

Provide a fixed priority fee in lamports. That fee is always used. When using intent-based endpoints, builders must include the base processing fee (10,000 lamports) in addition to the desired priority fee. If the network requires higher fees than the amount specified, the trade may be delayed or fail.

When Exact Priority Fee Makes Sense

Use Exact Priority Fees when:
  • Cost predictability is critical.
  • Fees must be strictly budgeted.
  • Delayed execution is acceptable.
This mode is best suited for automation, testing, or environments with strict fee constraints.

What Priority Fees Do Not Affect

Priority fees do not:
  • Change routing decisions.
  • Bypass slippage checks.
  • Alter trade execution logic.
  • Guarantee execution success.
They only influence how quickly a transaction is considered for inclusion.

Code Recipes