Referral program and widget
Last updated
Last updated
This is an additional piece of logic on eosdtcntract that allows for integrating EOSDT generation into your own web application or dApp — 50% of all NUT-based fees will be paid by stablecoin users.
Users must pay an admin fee in Equilibrium’s NUT in order to close an EOSDT position, and the referral program simply splits this fee in half — 50% of NUT tokens get burned, 50% goes to the referral partner.
Those who want to participate need to register on EOSDT’s smart contracts in order to make sure they can get paid. This only requires a separate NUT transfer to our smart contracts, granting partners a referral ID.
**There are new settings related to the referral program:
**New table ctrreferrals**:
This table lists all the referrals with their respective staked amounts of NUT.
New table positionrefs: This table connects positions with referrals so the system knows when and where to pay the fees.
**New actions related to referral program:
Action
deposit NUT to the eosdtcntract, specifying referral in memo.
Parameters
NUT amount memo: referral
Rejections
When input < referral_min_stake
**When missing the referral’s signature
Example
For frontend integrations you can use our widget, which has configurable color schemes (Check here). The widget comes in different forms and may be installed via npm, CDN, or IFrame. Check the widget repo for additional details.
parameter
type
description
referral_min_stake
asset **
The minimum NUT stake required to register as a referral. This is 2 NUT by default.
referral_ratio
float
The ratio of admin fees that go to referrals as a reward. By default this is 50%.
parameter
type
description
referral_id
int
referral id
referral
name
referral account name
staked_amount
asset
amount of NUT staked
parameter
type
description
referral_id
int
referral id
position_id
int
Id of the related position