Referrers per docs: "Referrers' LOT rewards act as an incentive for people to promote the Wenwin Lottery by getting paid in LOT to do so."
Frontend operators per docs: Wenwin is committed to complete decentralization and utilizes independent frontends to handle ticket sales. These frontends directly interact with the Wenwin Lottery smart contracts.
If a user buys a lottery ticket and refers to himself in both the referral fee and operator fee, the protocol will be negatively impacted because of the unnecessary discount of the ticket. This behavior should be analyzed more in depth and consider a scenario of a facade/front website that it's only purpose is to serve lottery buyers by providing more rebates (player, referrer, and frontend reward).
Lines of code
https://github.com/code-423n4/2023-03-wenwin/blob/91b89482aaedf8b8feb73c771d11c257eed997e8/src/Lottery.sol#L110-L131
Vulnerability details
Impact
If a user buys a lottery ticket and refers to himself in both the referral fee and operator fee, the protocol will be negatively impacted because of the unnecessary discount of the ticket. This behavior should be analyzed more in depth and consider a scenario of a facade/front website that it's only purpose is to serve lottery buyers by providing more rebates (player, referrer, and frontend reward).
Proof of Concept
Recommended Mitigation Steps