FeeTiersUtils
_GNSFeeTiers facet internal library
This is a library to apply fee tiers to trading fees based on a trailing point system._
initializeFeeTiers
Check IFeeTiersUtils interface for documentation
setGroupVolumeMultipliers
Check IFeeTiersUtils interface for documentation
setFeeTiers
Check IFeeTiersUtils interface for documentation
setTradersFeeTiersEnrollment
Check IFeeTiersUtils interface for documentation
addTradersUnclaimedPoints
Check IFeeTiersUtils interface for documentation
updateTraderPoints
Check IFeeTiersUtils interface for documentation
calculateFeeAmount
Check IFeeTiersUtils interface for documentation
getFeeTiersCount
Check IFeeTiersUtils interface for documentation
getFeeTier
Check IFeeTiersUtils interface for documentation
getGroupVolumeMultiplier
Check IFeeTiersUtils interface for documentation
getFeeTiersTraderInfo
Check IFeeTiersUtils interface for documentation
getTraderFeeTiersEnrollment
Check IFeeTiersUtils interface for documentation
getTraderUnclaimedPoints
Check IFeeTiersUtils interface for documentation
getFeeTiersTraderDailyInfo
Check IFeeTiersUtils interface for documentation
_getSlot
Returns storage slot to use when fetching storage relevant to library
_getStorage
Returns storage pointer for storage struct in diamond contract, at defined slot
_checkFeeTierUpdateValid
Checks validity of a single fee tier update (feeMultiplier: descending, pointsThreshold: ascending, no gap)
Parameters
_index
uint256
index of the fee tier that was updated
_feeTier
fee tier new value
_feeTiers
all fee tiers
_getCurrentDay
Get current day (index of mapping traderDailyInfo)
_claimUnclaimedPoints
Claims unclaimed points for a trader and adds them to the daily points for the current day. In the event that it's the first points update for the trader, backdates points to yesterday so the tier discount becomes immediate.
Parameters
_trader
address
trader address
Last updated