README.md
1.23 Kb ยท 57 lines
Protocol Fee
Fee collection and distribution for protocol operations.
Overview
Protocol Fee contract collects fees from various protocol operations and distributes them to xGNS holders and DevOps.
Configuration
- Router Fee: 0.15% of swap amount
- Pool Creation Fee: 100 GNS
- Withdrawal Fee: 1% of LP fees claimed
- Unstaking Fee: 1% of staking rewards
- Distribution: 100% to xGNS holders (default)
Fee Sources
- Swaps: 0.15% fee on all trades
- Pool Creation: 100 GNS per new pool
- LP Withdrawals: 1% of collected fees
- Staking Claims: 1% of rewards
Key Functions
DistributeProtocolFee
Distributes accumulated fees to recipients.
SetDevOpsPct
Sets DevOps funding percentage.
SetGovStakerPct
Sets xGNS holder percentage.
AddToProtocolFee
Adds fees to distribution queue.
Usage
1// Distribute accumulated fees
2tokenAmounts := DistributeProtocolFee()
3
4// Configure distribution
5SetDevOpsPct(2000) // 20% to DevOps
6SetGovStakerPct(8000) // 80% to xGNS holders
7
8// View accumulated fees
9GetAmountOfToken(tokenPath)
Security
- Admin-only configuration changes
- Automatic fee accumulation
- Multi-token support
- Transparent distribution tracking