Skip to main content

IFeeReferral

IFeeReferral

Addresses

ChainAddress

Functions

domFiPerp

function domFiPerp() external view returns (contract IDomFiPerp)

referrerOf

Get the registered referrer of an account.

function referrerOf(address account) external view returns (address referrer)

Parameters

NameTypeDescription
accountaddressAddress that registered a referrer

Return Values

NameTypeDescription
referreraddressAddress that referred account to Domination Finance, or 0x0 if no referrer has been registered

setReferrer

Register an address as user's referrer. The caller must either be user or their manager as returned by DomFiPerp.isManagerFor. Reverts if user's referrer has already been set.

function setReferrer(address user, address referrer) external
Dev note

Only the administrator can reset a fee referral that has already been set.

Parameters

NameTypeDescription
useraddressThe user who wishes to redeem someone's referral code
referreraddressAn address that referred them to Domination Finance

getReferrerRedirect

Get the fraction of fees that should be redirected to referrer from everyone they've referred.

function getReferrerRedirect(address referrer) external view returns (FPUnsigned referrerRedirect)
Dev note

Used by FeeDistributor when distributing trade fees. Applies to whatever fees remain after the discount.

Parameters

NameTypeDescription
referreraddressAddress that referred another user

Return Values

NameTypeDescription
referrerRedirectFPUnsignedFraction of user fees referrer is entitled to. [0,1)[0,1)

getReferrerDiscount

Get the fee discount applied to everyone who signed up using referrer's code.

function getReferrerDiscount(address referrer) external view returns (FPUnsigned referrerDiscount)
Dev note

Used by FeeCalculator to compute fees. Applies before any redirect.

Parameters

NameTypeDescription
referreraddressAddress that referred another user

Return Values

NameTypeDescription
referrerDiscountFPUnsignedReduction in trade fees for users who set set referrer as their referrer. [0,1)[0,1)