feat: surface and document per-asset fee configuration - #345
Merged
MaryammAli merged 1 commit intoJul 23, 2026
Merged
Conversation
- Add comprehensive fee configuration section to README.md explaining: * Fee resolution priority (per-asset > oracle > global) * Global fee configuration with examples * Per-asset fee overrides and use cases * Arbiter splits (both legacy and explicit FeeRatio) * Collector rotation mechanism * Fee breakdown structure - Create FEE_CONFIGURATION_GUIDE.md with: * Detailed examples for all fee configuration patterns * Common use cases and patterns * Troubleshooting guide * FeeRatio validation rules - Enhance inline documentation in lib.rs: * Add detailed docstrings for set_fee_config() * Expand set_per_asset_fee() with priority order, fee distribution, and examples * Add clear documentation for get_per_asset_fee() - Enhance admin.rs documentation: * Document set_fee_config() with fallback priority * Document set_per_asset_fee() with fee split options and validation * Add comprehensive error cases This fully surfaces the per-asset fee override functionality that was previously declared in storage but not well-documented or easily discoverable. Fixes: Issue BlockDash-Studios#305 (Fee Router v2 - per-asset overrides now fully documented)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #333
Summary
This PR surfaces and fully documents the per-asset fee configuration that was previously declared in storage but not well-documented or easily discoverable.
Changes
📖 Documentation
README.md: Added comprehensive "Fee Configuration" section explaining:
FEE_CONFIGURATION_GUIDE.md (new): Detailed developer guide covering:
🔧 Code Documentation
lib.rs: Enhanced docstrings for:
set_fee_config()- With priority order and examplesset_per_asset_fee()- With fee distribution options and error casesget_per_asset_fee()- With query examplesadmin.rs: Added comprehensive documentation for:
set_fee_config()- Fallback priority explanationset_per_asset_fee()- Fee split options, validation, and errorsProblem Solved
Per-asset fee overrides were fully functional but:
Solution
✅ Minimal: No code changes (implementation already correct)
✅ Efficient: ~675 lines of documentation vs refactoring
✅ Comprehensive: Multiple documentation levels for different audiences
Files Changed
README.md- Added fee configuration sectionFEE_CONFIGURATION_GUIDE.md- New comprehensive guidecontracts/Folder/src/lib.rs- Enhanced entry point docscontracts/Folder/src/admin.rs- Enhanced admin function docsKey Features Now Documented
arbiter_bpssplitFeeRatiosplits with validationType of Change
Testing
Documentation quality review only (no code changes).
Fixes: Issue #305 (Fee Router v2 - per-asset overrides now fully documented)