Key Features
Secure Fee Management
On-chain fee collection and distribution with support for both SPL tokens and Token-2022 tokens. Features precise mathematical calculations with overflow protection and immutable share configurations after initialization.
Multi-User Support
Support for 2-5 users per fee vault with configurable share allocations for each user. Includes individual claim tracking to prevent double claims and user-specific checkpoints for accurate fee distribution.
Flexible Fee Distribution
Real-time fee accumulation with pro-rata distribution based on share percentages. Uses lazy evaluation for gas efficiency and supports partial funding and claiming.
Core Components
- Fee Vault: The main account that stores user shares, accumulated fees, and distribution state
- Token Vault: A PDA-controlled token account that holds the actual fee tokens
- Fee Vault Authority: A PDA that controls the token vault for secure transfers