1. Context
The referral fee was initially designed to encourage anyone to create their own User Interface on top of Ref Finance.
By re routing users to the liquidity of the smart contract, UI builders can claim their own referral fee.
Today, any developers can charge the referral fee. They don’t need Ref approval. In other words, the ‘feature’ is live and any third-party UI (i.e. Skyward) can use it.
2. Problem
As recently highlighted by one of our community members, the referral fee can be claimed by the same user that executes the swap. The current feature does not check if the user that signed the transaction is the same as the account ID specified for the referral fee parameter.
The referral fee can be ‘circular’, allowing developers to claim the fee. In this case, it is clear that the feature is not intended to bring new users / source demand, but rather to pay less by earning a portion of the pool shares (LP tokens).
Therefore, it must be amended.
3. Solution
If the community has no objection, the solution will be executed in two phases.
1- The referral fee will be set to 0 by either the DAO or one of the Guardians immediately
2- Only whitelisted accounts will be allowed to claim the referral fee
For 2, the team will create a procedure to allow any UI builders to apply for the referral fee whitelist. Current interfaces like Skyward and Rubic (multichain aggregator) will obviously be added.