GNSFeeTiers
Facet #3: Fee tiers
constructor
initializeFeeTiers
Parameters
_groupIndices
uint256[]
group indices (pairs storage fee index) to initialize
_groupVolumeMultipliers
uint256[]
corresponding group volume multipliers (1e3)
_feeTiersIndices
uint256[]
fee tiers indices to initialize
setGroupVolumeMultipliers
Updates groups volume multipliers
Parameters
_groupIndices
uint256[]
indices of groups to update
_groupVolumeMultipliers
uint256[]
corresponding new volume multipliers (1e3)
setFeeTiers
Updates fee tiers
Parameters
_feeTiersIndices
uint256[]
indices of fee tiers to update
setTradersFeeTiersEnrollment
Updates traders enrollment status in fee tiers
Parameters
_traders
address[]
group of traders
addTradersUnclaimedPoints
Credits points to traders
Parameters
_traders
address[]
traders addresses
_creditTypes
enum IFeeTiers.CreditType[]
types of credit (IMMEDIATE, CLAIMABLE)
_points
uint224[]
points to credit (1e18)
updateTraderPoints
Increases daily points from a new trade, re-calculate trailing points, and cache daily fee tier for a trader.
Parameters
_trader
address
trader address
_volumeUsd
uint256
trading volume in USD (1e18)
_pairIndex
uint256
pair index
calculateFeeAmount
Returns fee amount after applying the trader's active fee tier multiplier
Parameters
_trader
address
address of trader
_normalFeeAmountCollateral
uint256
base fee amount (collateral precision)
getFeeTiersCount
Returns the current number of active fee tiers
getFeeTier
Returns a fee tier's details (feeMultiplier, pointsThreshold)
Parameters
_feeTierIndex
uint256
fee tier index
getGroupVolumeMultiplier
Returns a group's volume multiplier
Parameters
_groupIndex
uint256
group index (pairs storage fee index)
getFeeTiersTraderInfo
Returns a trader's info (lastDayUpdated, trailingPoints)
Parameters
_trader
address
trader address
getFeeTiersTraderDailyInfo
Returns a trader's daily fee tier info (feeMultiplierCache, points)
Parameters
_trader
address
trader address
_day
uint32
day
getTraderFeeTiersEnrollment
Returns a trader's fee tiers enrollment status
Parameters
_trader
address
trader address
getTraderUnclaimedPoints
Returns a trader's unclaimed points, credited by Governance
Parameters
_trader
address
trader address
Last updated