Contract Details
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
getSwapFeeDataReturns 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
getSwapFeeReturns 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.
>>> 290getProtocolFee
getProtocolFeeReturns the protocol fee for a given pool.
Example Usage:
getFeeRecipient
getFeeRecipient Returns the current fee recipient address.
Example Usage:
getSwapFeeHook
getSwapFeeHookReturns the current swap fee hook address.
Example Usage:
Fee Registry V2
registerFee
registerFee Registers a new fee for a pool with additional data.
Example Usage:
getFee
getFeeReturns the fee amount for a given pool.
Example Usage:
updateFee
updateFeeUpdates the fee amount for a pool.
Example Usage:
getFeesByPool
getFeesByPoolReturns all fees associated with a given pool.
Example Usage:
Fee Recipient
notifyFees
notifyFeesNotifies the contract about a fee that needs to be recorded. Example Usage:
getEpochStart
getEpochStartReturns the start time of a given timestamp based on the epoch duration. Example Usage:
fees
feesReturns the total fees recorded for a specific token within a specific epoch. Example Usage: