IFeeTiersUtils
Last updated
Last updated
Interface for GNSFeeTiers facet (inherits types and also contains functions, events, and custom errors)
Name | Type | Description |
---|---|---|
Updates groups volume multipliers
Name | Type | Description |
---|---|---|
Updates fee tiers
Updates traders enrollment status in fee tiers
Credits points to traders
Increases daily points from a new trade, re-calculate trailing points, and cache daily fee tier for a trader.
Returns fee amount after applying the trader's active fee tier multiplier
Returns the current number of active fee tiers
Returns a fee tier's details (feeMultiplier, pointsThreshold)
Returns a group's volume multiplier
Returns a trader's info (lastDayUpdated, trailingPoints)
Returns a trader's daily fee tier info (feeMultiplierCache, points)
Returns a trader's fee tiers enrollment status
Returns a trader's unclaimed points, credited by Governance
Emitted when group volume multipliers are updated
Emitted when fee tiers are updated
Emitted when a trader's daily points are updated
Emitted when a trader info is updated for the first time
Emitted when a trader's trailing points are updated
Emitted when a trader's info is updated
Emitted when a trader's cached fee multiplier is updated (this is the one used in fee calculations)
Emitted when a trader's enrollment status is updated
Emitted when a trader is credited points by governance
Emitted when a trader's unclaimed points are claimed
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_groupIndices
uint256[]
group indices (pairs storage fee index) to initialize
_groupVolumeMultipliers
uint256[]
corresponding group volume multipliers (1e3)
_feeTiersIndices
uint256[]
fee tiers indices to initialize
_feeTiers
fee tiers values to initialize (feeMultiplier, pointsThreshold)
_groupIndices
uint256[]
indices of groups to update
_groupVolumeMultipliers
uint256[]
corresponding new volume multipliers (1e3)
_feeTiersIndices
uint256[]
indices of fee tiers to update
_feeTiers
new fee tiers values (feeMultiplier, pointsThreshold)
_traders
address[]
group of traders
_values
corresponding enrollment values
_traders
address[]
traders addresses
_creditTypes
enum IFeeTiers.CreditType[]
types of credit (IMMEDIATE, CLAIMABLE)
_points
uint224[]
points to credit (1e18)
_trader
address
trader address
_volumeUsd
uint256
trading volume in USD (1e18)
_pairIndex
uint256
pair index
_trader
address
address of trader
_normalFeeAmountCollateral
uint256
base fee amount (collateral precision)
_feeTierIndex
uint256
fee tier index
_groupIndex
uint256
group index (pairs storage fee index)
_trader
address
trader address
_trader
address
trader address
_day
uint32
day
_trader
address
trader address
_trader
address
trader address
groupIndices
uint256[]
indices of updated groups
groupVolumeMultipliers
uint256[]
new corresponding volume multipliers (1e3)
feeTiersIndices
uint256[]
indices of updated fee tiers
feeTiers
struct IFeeTiers.FeeTier[]
new corresponding fee tiers values (feeMultiplier, pointsThreshold)
trader
address
trader address
day
uint32
day
points
uint224
points added (1e18 precision)
trader
address
address of trader
day
uint32
day
trader
address
trader address
fromDay
uint32
from day
toDay
uint32
to day
expiredPoints
uint224
expired points amount (1e18 precision)
trader
address
address of trader
traderInfo
struct IFeeTiers.TraderInfo
new trader info value (lastDayUpdated, trailingPoints)
trader
address
address of trader
day
uint32
day
feeMultiplier
uint32
new fee multiplier (1e3 precision)
trader
address
address of trader
enrollment
struct IFeeTiers.TraderEnrollment
trader's new enrollment status
trader
address
trader address
day
uint32
day the points were credited on, may be different from the day the points were claimed
creditType
enum IFeeTiers.CreditType
credit type (IMMEDIATE, CLAIMABLE)
points
uint224
points added (1e18 precision)
trader
address
trader address
day
uint32
day of claim
points
uint224
points added (1e18 precision)