unlock-protocol / unlock

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

When global referrer fee is set, buying without referrer address should not take the referrer fee #11983

Open pradel opened 1 year ago

pradel commented 1 year ago

Is your feature request related to a problem? Please describe.

I created a lock of 29 USDC, set the referrer fee to 25%, and then created a checkout URL without setting up the referrer address. I sent the checkout URL to my customer and then saw that I had only 21.75 USDC in the lock contract. There is no mention of this behaviour in the description of the field so it was really confusing and I lost 7.25 USDC in the process. Hopefully, I noticed this behaviour early on with my first customer.

Describe the solution you'd like

If I send a direct link to one of my customers (without a referrer set) I would expect to receive the full payment in the contract, the referrer fee should only be applied if that field is set.

Describe alternatives you've considered

For now, I am setting up the referer address to my wallet.

julien51 commented 1 year ago

Would you be able to send us the transaction hash that was used please?

pradel commented 1 year ago

@julien51 0x5af5ed221c4122d5c0fb29fb9d5936c01270d09524e533ca5f40882004cae1ce

julien51 commented 7 months ago

@clemsos Let's make sure that a referrer fee us never paid to the 0x0 address, even if a fee has been set for any address (using the 0x0 address)

clemsos commented 7 months ago

@julien51 0x5af5ed221c4122d5c0fb29fb9d5936c01270d09524e533ca5f40882004cae1ce

Looking into this. Do you remember on which chain was the tx ?

pradel commented 7 months ago

@clemsos iirc it was polygon