Referrals
Every transaction that includes a transfer of value between a purchaser and the Public Lock smart contracts includes a referrer
parameter:
The referrer can optionally receive a share of the price paid by the purchaser.
Setting a referrer fee
A lock manager can call the setReferrerFee
function on the Public Lock contract to set a specific referrer fee for a given address. This function takes 2 arguments. The first one is the address of a referrer
and the second one is the referrer fee percentage, expressed in basis points.
As such, the lock manager can set multiple referrer fees for various referrers. For example a given referrer could receive 10% of the price paid, while another one could receive 30%.
Finally, if the lock manager sets a referrer fee for the 0x0
address (the zero address), then the referrer fee will apply to any referrer address.
It is possible to query a contract to identity the referrer fee set for a specific address by querying the referrerFees
function.
Examples
This presentation includes multiple of examples of how the referrer fees can be used to reward platforms,