Facet #2: Referral system
Name | Type | Description |
---|---|---|
Updates allyFeeP
Name | Type | Description |
---|---|---|
Updates startReferrerFeeP
Updates targetVolumeUsd
Whitelists ally addresses
Unwhitelists ally addresses
Whitelists referrer addresses
Unwhitelists referrer addresses
Registers potential referrer for trader (only works if trader wasn't referred yet by someone else)
Distributes ally and referrer rewards
Claims pending GNS ally rewards of caller
Claims pending GNS referrer rewards of caller
Returns referrer fee % progress towards earning 100% based on his volume referred (1e10)
Returns last referrer of trader (whether referrer active or not)
Returns active referrer of trader
Returns referrers referred by ally
Returns traders referred by referrer
Returns ally fee % of total referral fee
Returns start referrer fee % of total referral fee when zero volume was referred
Returns target volume in usd to reach 100% of referral fee
Returns ally details
Returns referrer details
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 |
---|---|---|
_allyFeeP
uint256
% of total referral fee going to ally
_startReferrerFeeP
uint256
initial % of total referral fee earned when zero volume referred
_targetVolumeUsd
uint256
usd opening volume to refer to reach 100% of referral fee
_value
uint256
new ally fee %
_value
uint256
new start referrer fee %
_value
uint256
new target volume in usd
_allies
address[]
array of ally addresses
_allies
address[]
array of ally addresses
_referrers
address[]
array of referrer addresses
_allies
address[]
array of corresponding ally addresses
_referrers
address[]
array of referrer addresses
_trader
address
trader address
_referrer
address
_trader
address
trader address
_volumeUsd
uint256
trading volume in usd (1e18 precision)
_referrerFeeUsd
uint256
referrer fee in USD (1e18 precision)
_gnsPriceUsd
uint256
token price in usd (1e10 precision)
_referrer
address
referrer address
_trader
address
address of trader
_trader
address
address of trader
_ally
address
address of ally
_referrer
address
address of referrer
_ally
address
address of ally
_referrer
address
address of referrer