Files
lnflow/examples/basic_policy.conf
Aljaz Ceru 8b6fd8b89d 🎉 Initial commit: Lightning Policy Manager
Advanced Lightning Network channel fee optimization system with:

 Intelligent inbound fee strategies (beyond charge-lnd)
 Automatic rollback protection for safety
 Machine learning optimization from historical data
 High-performance gRPC + REST API support
 Enterprise-grade security with method whitelisting
 Complete charge-lnd compatibility

Features:
- Policy-based fee management with advanced strategies
- Balance-based and flow-based optimization algorithms
- Revenue maximization focus vs simple rule-based approaches
- Comprehensive security analysis and hardening
- Professional repository structure with proper documentation
- Full test coverage and example configurations

Architecture:
- Modern Python project structure with pyproject.toml
- Secure gRPC integration with REST API fallback
- Modular design: API clients, policy engine, strategies
- SQLite database for experiment tracking
- Shell script automation for common tasks

Security:
- Method whitelisting for LND operations
- Runtime validation of all gRPC calls
- No fund movement capabilities - fee management only
- Comprehensive security audit completed
- Production-ready with enterprise standards

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 16:32:00 +02:00

51 lines
1.1 KiB
Plaintext

# Basic Policy Configuration - Compatible with charge-lnd but with inbound fees
# This configuration demonstrates a simple setup for most Lightning nodes
[default]
# Default settings for all channels (non-final policy)
final = false
base_fee_msat = 1000
fee_ppm = 1000
time_lock_delta = 80
strategy = static
[balance-drain]
# Channels with too much local balance (>80%) - encourage outbound routing
chan.min_ratio = 0.8
strategy = balance_based
fee_ppm = 500
inbound_fee_ppm = -100
inbound_base_fee_msat = -500
priority = 10
[balance-preserve]
# Channels with low local balance (<20%) - preserve liquidity
chan.max_ratio = 0.2
strategy = balance_based
fee_ppm = 2000
inbound_fee_ppm = 25
priority = 10
[high-capacity]
# Large channels get premium treatment
chan.min_capacity = 5000000
strategy = static
fee_ppm = 1500
inbound_fee_ppm = -25
priority = 20
[inactive-channels]
# Wake up dormant channels with attractive rates
activity.level = inactive
strategy = static
fee_ppm = 200
inbound_fee_ppm = -150
max_fee_ppm = 500
priority = 30
[catch-all]
# Final policy for any remaining channels
strategy = static
fee_ppm = 1000
inbound_fee_ppm = 0
priority = 100