Dynamic Fee Adjustment
arb-assist implements sophisticated dynamic fee adjustment mechanisms to optimize transaction success rates while minimizing costs.
Overview
Dynamic fees automatically adjust based on:
Network congestion levels
Recent successful transaction fees
Competition for block space
Market volatility
Specific token competition
Priority Fee Sources
Helius API Integration
The most accurate fee estimation comes from Helius:
helius_key = "your-helius-api-key"
Benefits:
Real-time network statistics
Percentile-based recommendations
Historical success rates
Accurate congestion metrics
Transaction Parsing
Without Helius, arb-assist learns from the blockchain:
helius_key = "" # Empty = use transaction parsing
How it works:
Monitors successful arbitrage transactions
Extracts priority fees used
Builds statistical model
Applies to your transactions
Percentile-Based Fees
Configure fee percentiles for different strategies:
spam_levels = [
{
min_cu_percentile = 25, # 25th percentile (low fees)
max_cu_percentile = 50, # 50th percentile (medium fees)
}
]
Common percentile strategies:
0-25: Ultra low cost, may fail often
25-50: Budget conscious, moderate success
50-75: Balanced approach
75-95: High success rate
95-99: Maximum priority
Fee Strategies
Random Strategy
fee_strategy = "Random"
min_cu_price = 10_000
max_cu_price = 50_000
Characteristics:
Unpredictable to competitors
Good for avoiding detection
Natural variance in costs
Use when:
Testing fee ranges
Avoiding patterns
General arbitrage
Linear Strategy
fee_strategy = "Linear"
min_cu_price = 10_000
max_cu_price = 100_000
tx_count = 5
Characteristics:
Gradual fee increase
Predictable escalation
Even cost distribution
Example progression (5 transactions):
TX 1: 10,000
TX 2: 32,500
TX 3: 55,000
TX 4: 77,500
TX 5: 100,000
Use when:
Systematic testing
Gradual competition
Budget constraints
Exponential Strategy
fee_strategy = "Exponential"
min_cu_price = 10_000
max_cu_price = 1_000_000
Characteristics:
Rapid fee escalation
Aggressive competition
High final fees
Example progression:
TX 1: 10,000
TX 2: 31,623
TX 3: 100,000
TX 4: 316,227
TX 5: 1,000,000
Use when:
High-value opportunities
Extreme competition
Must-win scenarios
Dynamic Jito Tips
Tip Modes
dynamic_jito_tip_mode = "parsed" # Learn from chain
dynamic_jito_tip_mode = "tipstream" # Use API
dynamic_jito_tip_mode = "none" # Fixed tips
Parsed Mode
Learns optimal tips from successful bundles:
dynamic_jito_tip_mode = "parsed"
Process:
Monitors Jito bundle landings
Extracts tip amounts
Builds tip distribution
Applies percentiles
Benefits:
Self-adjusting
No external dependencies
Follows market dynamics
Tipstream Mode
Uses real-time tip floor data:
dynamic_jito_tip_mode = "tipstream"
jito_uuid = "your-uuid" # Optional tracking
Benefits:
Most accurate pricing
Instant updates
Official Jito data
Tip Percentiles
Configure tip ranges:
jito_levels = [
{
min_tip_percentile = 50, # 50th percentile floor
max_tip_percentile = 75, # 75th percentile ceiling
}
]
Multi-Tier Fee Configuration
Cascading Fee Levels
Different fees for different market conditions:
# Tier 0: Low competition
spam_levels = [
{
filter_level = 0,
min_cu_percentile = 10,
max_cu_percentile = 25,
min_cu_price = 1_000,
max_cu_price = 10_000,
}
]
# Tier 1: Medium competition
jito_levels = [
{
filter_level = 1,
min_tip_percentile = 50,
max_tip_percentile = 75,
min_tip = 5_000,
max_tip = 50_000,
}
]
# Tier 2: High competition
fast_levels = [
{
filter_level = 2,
min_tip = 100_000,
max_tip = 1_000_000,
}
]
Market-Based Activation
Fees adjust based on profitability:
filter_thresholds = [
{ min_profit = 1_000_000 }, # Low fees OK
{ min_profit = 10_000_000 }, # Medium fees needed
{ min_profit = 100_000_000 }, # High fees justified
]
Fee Optimization Strategies
Conservative Approach
Minimize costs, accept some failures:
# Low percentiles
min_cu_percentile = 10
max_cu_percentile = 30
# Tight ranges
min_cu_price = 5_000
max_cu_price = 20_000
# Random distribution
fee_strategy = "Random"
Balanced Approach
Good success rate, reasonable costs:
# Middle percentiles
min_cu_percentile = 40
max_cu_percentile = 60
# Moderate ranges
min_cu_price = 20_000
max_cu_price = 100_000
# Linear progression
fee_strategy = "Linear"
Aggressive Approach
Maximum success, cost is secondary:
# High percentiles
min_cu_percentile = 75
max_cu_percentile = 95
# Wide ranges
min_cu_price = 50_000
max_cu_price = 1_000_000
# Exponential growth
fee_strategy = "Exponential"
Real-World Examples
Token Launch Scenario
High competition, time-sensitive:
# Use Jito with high tips
dynamic_jito_tip_mode = "tipstream"
jito_levels = [{
min_tip_percentile = 90,
max_tip_percentile = 99,
no_failure_mode = true,
}]
Stable Market Arbitrage
Low competition, volume-based:
# Minimal fees
spam_levels = [{
min_cu_price = 1_000,
max_cu_price = 5_000,
fee_strategy = "Random",
}]
Volatile Market Swings
Rapid changes, mixed competition:
# Multiple strategies
spam_levels = [{
filter_level = 0,
bundle_groups = [1, 2],
min_cu_percentile = 25,
max_cu_percentile = 50,
}]
jito_levels = [{
filter_level = 1,
bundle_groups = [3, 4],
min_tip_percentile = 50,
max_tip_percentile = 75,
}]
Monitoring Fee Performance
Key Metrics
Track these metrics:
Success Rate by Fee Level
Average Cost per Success
ROI Impact of Fees
Competition Analysis
Log Analysis
Enable logging to track fees:
log_output = true
Analyze patterns:
# Extract fee data
grep "priority_fee" arb-assist.log | awk '{print $NF}' | sort -n | uniq -c
# Success rate by fee
grep -B1 "success\|failed" arb-assist.log | grep "priority_fee"
Fee Efficiency Calculation
Calculate optimal fee ranges:
Efficiency = (Successful Trades * Avg Profit) / Total Fees Paid
ROI = (Total Profit - Total Fees) / Total Fees
Advanced Fee Techniques
Time-Based Adjustments
Adjust fees by time of day:
# Conceptual - not directly configurable
Peak hours (9am-5pm EST): Higher fees
Off-peak (night/weekend): Lower fees
Epoch boundaries: Maximum fees
Token-Specific Fees
Different fees for different tokens:
# Use different bundle groups
mints_to_arb = [2, 2, 3] # 3 groups
# Group 1-2: Low-value tokens, low fees
spam_levels = [{
bundle_groups = [1, 2],
max_cu_price = 50_000,
}]
# Group 3: High-value tokens, high fees
jito_levels = [{
bundle_groups = [3],
min_tip = 100_000,
}]
Adaptive Learning
System continuously improves:
Initial: Use conservative estimates
Learning: Gather success/failure data
Optimization: Adjust ranges based on results
Maturity: Minimal fees for maximum success
Troubleshooting Fee Issues
Consistent Failures
If transactions consistently fail:
Increase minimum percentiles
Widen fee ranges
Switch to Jito bundles
Check RPC latency
Excessive Costs
If fees are too high:
Lower maximum percentiles
Tighten fee ranges
Use parsed mode instead of API
Filter for higher profit opportunities
Erratic Success Rates
If success is unpredictable:
Switch from Random to Linear strategy
Use longer time windows for percentiles
Check for network issues
Verify competition levels
Best Practices
Start Conservative: Begin with low fees and increase gradually
Monitor Constantly: Track success rates and adjust
Use Multiple Strategies: Different approaches for different scenarios
Set Limits: Always define maximum acceptable fees
Learn from Data: Let the system adapt to market conditions
Regular Reviews: Analyze fee performance weekly
Emergency Overrides: Have manual override capabilities
Integration with Strategies
Fees should align with overall strategy:
High-Frequency: Lower fees, accept some failures
High-Value: Higher fees, ensure success
Market Making: Consistent medium fees
Sniping: Maximum fees for critical moments
Remember: The goal is not the lowest fees, but the best ROI after fees.
Last updated