unlock-protocol / unlock

Ʉnlock is a protocol for memberships built on a blockchain.
https://unlock-protocol.com
MIT License
845 stars 251 forks source link

Decouple referrer address and protocolReferrer #15032

Closed julien51 closed 1 week ago

julien51 commented 2 weeks ago

We currently use the referrer for 2 different purposes: distribute governance tokens as well as referrer fees (if applicable). It would be better to distinguish between the 2 as some platforms may want to keep the governance tokens for themselves but allow referral fees to go to users of their platform.

Now that we have a new purchase signature (with a Struct), we can distinguish between the 2 values between referrer (gets referrer fees) and protocolReferrer (gets governance tokens). They could obviously be the same as well if the implementer wants to!

add protocolReferrer that will receive UP in struct purchase args