The SyncSwap fee management system is an integral part of the SyncSwap ecosystem, responsible for managing and distributing fees across different pools.
The SyncSwap fee management system is an integral part of the SyncSwap ecosystem, responsible for managing and distributing fees across different pools. It ensures the fair distribution of rewards to liquidity providers and supports the protocol's operational costs. This document provides detailed instructions on using the SyncSwap Fee Manager, Fee Registry, and Fee Recipient contracts to query and manage various fees and rates.
Fee Manager
getSwapFeeData
Returns the swap fee data for a given pool, sender, and token pair.
Example Usage:
feeManager.getSwapFeeData(poolAddress, senderAddress, tokenInAddress, tokenOutAddress, data);// Returns the fee data for the given parameters.>>> FeeData {gamma:0, minFee:290, maxFee:290}
getSwapFee
Returns the swap fee for a given pool, sender, and token pair.
Example Usage:
feeManager.getSwapFee(poolAddress, senderAddress, tokenInAddress, tokenOutAddress, data);// Returns the swap fee for the given parameters.>>>290
getProtocolFee
Returns the protocol fee for a given pool.
Example Usage:
getFeeRecipient
Returns the current fee recipient address.
Example Usage:
getSwapFeeHook
Returns the current swap fee hook address.
Example Usage:
Fee Registry V2
registerFee
Registers a new fee for a pool with additional data.
Example Usage:
getFee
Returns the fee amount for a given pool.
Example Usage:
updateFee
Updates the fee amount for a pool.
Example Usage:
getFeesByPool
Returns all fees associated with a given pool.
Example Usage:
Fee Recipient
notifyFees
Notifies the contract about a fee that needs to be recorded. Example Usage:
getEpochStart
Returns the start time of a given timestamp based on the epoch duration. Example Usage:
fees
Returns the total fees recorded for a specific token within a specific epoch. Example Usage: