Fee Management
Fee management in DuckyDux is handled by the Fees contract, which is inherited by the SwapRouter. This contract is responsible for calculating and distributing router and referral fees.
Core Functions
_takeFee: An internal function that calculates and allocates the router and referral fees from a swap._withdrawFee: An internal function that allows the owner or a referral to withdraw their accrued fees.
Events
FeeChanged: Emitted when the router or referral fee is updated.FeeTaken: Emitted when a fee is taken from a swap.FeeWithdrawal: Emitted when fees are withdrawn.
The fee management system is designed to be transparent and flexible, allowing for the seamless distribution of fees to the platform and its affiliates.
Last updated on